public static XmlDocument GetByIDasXml(int ID) { MenuItemDataMapper objCaller = new MenuItemDataMapper(); MenuItem _news = objCaller.GetByID(ID); if (null == _news) return null; XmlDocument xdoc = new XmlDocument(); XmlElement xroot = xdoc.CreateElement("Data"); XmlElement xitem = xdoc.CreateElement("MenuItems"); xdoc.AppendChild(xroot); xroot.AppendChild(xitem); XmlAttribute xName, xDesc, xId, xDetails, xUrl, xCreationdate, xImage; xName = xdoc.CreateAttribute("NAME"); xDesc = xdoc.CreateAttribute("DESCRIPTION"); xDetails = xdoc.CreateAttribute("DETAILS"); xUrl = xdoc.CreateAttribute("URL"); xCreationdate = xdoc.CreateAttribute("CREATION_DATE"); xImage = xdoc.CreateAttribute("IMAGE"); xId = xdoc.CreateAttribute("ID"); xName.Value = _news.Name; xDesc.Value = _news.Description; xDetails.Value = _news.Details; xUrl.Value = _news.Url; xCreationdate.Value = _news.CreationDate; xImage.Value = _news.Image; xId.Value = _news.ID.ToString(); xitem.Attributes.Append(xName); xitem.Attributes.Append(xDesc); xitem.Attributes.Append(xDetails); xitem.Attributes.Append(xUrl); xitem.Attributes.Append(xCreationdate); xitem.Attributes.Append(xImage); xitem.Attributes.Append(xId); return xdoc; }
public static IList<MenuItem> GetAllBySearchandPublishedforAdmin(int catid, string keyword, int menuID) { MenuItemDataMapper objCaller = new MenuItemDataMapper(); return objCaller.GetAllPublishedSearchforAdmin(keyword, catid, menuID); }
public static IList<MenuItem> GetAllofLangauge() { MenuItemDataMapper objCaller = new MenuItemDataMapper(); return objCaller.GetAllforLang(); }
public static IList<MenuItem> GetAll() { MenuItemDataMapper objCaller = new MenuItemDataMapper(); return objCaller.GetAll(); }
public static void Update(MenuItem obj) { MenuItemDataMapper objCaller = new MenuItemDataMapper(); objCaller.Update(obj); }
public static MenuItem GetByID(int ID) { MenuItemDataMapper objCaller = new MenuItemDataMapper(); return objCaller.GetByID(ID); }
public static int Add(MenuItem obj) { MenuItemDataMapper objCaller = new MenuItemDataMapper(); return objCaller.Add(obj); }
public static void Delete(int ID) { MenuItemDataMapper objCaller = new MenuItemDataMapper(); objCaller.Delete(ID); }
public static IList<MenuItem> Search(string keyword) { MenuItemDataMapper objCaller = new MenuItemDataMapper(); return objCaller.Search(keyword); }
public static IList<MenuItem> GetAllByCategoryandLang(int langid, string hash) { MenuItemDataMapper objCaller = new MenuItemDataMapper(); return objCaller.GetAllByCategoryandLang(hash, langid); }
public static IList<MenuItem> GetAllPagingSearch(int from, int to, ref int totalRows, string keyword) { MenuItemDataMapper objCaller = new MenuItemDataMapper(); return objCaller.GetAllPaging(from, to, ref totalRows, keyword); }