public XmlDocument Get_News_Posts_XML(string CategoryID, string News_Status, string SortOrder, string Orientation, int TotalNumber) { MySQL_DataConn myDP = new MySQL_DataConn(ConfigurationManager.ConnectionStrings["e2CMS"].ConnectionString); DataSet myDS = myDP.Get_News_Posts(CategoryID, News_Status, SortOrder, Orientation, TotalNumber); XmlDocument myXmlDocument = new XmlDocument(); myXmlDocument.LoadXml(myDS.GetXml()); return(myXmlDocument); }
public List <News_Post> Get_News_Posts(string CategoryID, string News_Status, string SortOrder, string Orientation, int TotalNumber, string NewsDetail_URL) { MySQL_DataConn myDP = new MySQL_DataConn(ConfigurationManager.ConnectionStrings["e2CMS"].ConnectionString); DataSet myDS = myDP.Get_News_Posts(CategoryID, News_Status, SortOrder, Orientation, TotalNumber); List <News_Post> list = new List <News_Post>(); foreach (DataRow myDR in myDS.Tables[0].Rows) { list.Add(new News_Post(myDR, NewsDetail_URL)); } return(list); }