using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
///
/// Summary description for MovingNewsUtility
///
public class MovingNewsUtility
{
public MovingNewsUtility()
{
//
// TODO: Add constructor logic here
//
}
public static string GetNewsTitles()
{
DALUtilities dl = new DALUtilities();
dl.strCommand = "(select ID,en_title,en_path from news where marquee = yes) union (select ID,en_title,en_path from publications where marquee = yes)";
DataSet newsDS = dl.ExcuteQuery();
string newsText = "";
for (int i = 0; i < newsDS.Tables[0].Rows.Count; i++)
{
if(i != newsDS.Tables[0].Rows.Count-1)
newsText += "" + newsDS.Tables[0].Rows[i]["en_title"].ToString() + " ";
else
newsText += "" + newsDS.Tables[0].Rows[i]["en_title"].ToString() + "";
newsText += "
";
}
return newsText;
}
public static string GetNewsTitlesForArabic()
{
DALUtilities dl = new DALUtilities();
dl.strCommand = "(select ID,ar_title,ar_path from news where marquee = yes) union (select ID,ar_title,ar_path from publications where marquee = yes)";
DataSet newsDS = dl.ExcuteQuery();
string newsText = "";
for (int i = 0; i < newsDS.Tables[0].Rows.Count; i++)
{
if(i != newsDS.Tables[0].Rows.Count-1)
newsText += "" + newsDS.Tables[0].Rows[i]["ar_title"].ToString() + " ";
else
newsText += "" + newsDS.Tables[0].Rows[i]["ar_title"].ToString() + "";
}
return newsText;
}
}