Beispiel #1
0
        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;
        }
Beispiel #2
0
        public static IList<MenuItem> GetAllBySearchandPublishedforAdmin(int catid, string keyword, int menuID)
        {
            MenuItemDataMapper objCaller = new MenuItemDataMapper();

            return objCaller.GetAllPublishedSearchforAdmin(keyword, catid, menuID);
        }
Beispiel #3
0
        public static IList<MenuItem> GetAllofLangauge()
        {
            MenuItemDataMapper objCaller = new MenuItemDataMapper();

            return objCaller.GetAllforLang();
        }
Beispiel #4
0
        public static IList<MenuItem> GetAll()
        {
            MenuItemDataMapper objCaller = new MenuItemDataMapper();

            return objCaller.GetAll();
        }
Beispiel #5
0
        public static void Update(MenuItem obj)
        {
            MenuItemDataMapper objCaller = new MenuItemDataMapper();

            objCaller.Update(obj);
        }
Beispiel #6
0
        public static MenuItem GetByID(int ID)
        {
            MenuItemDataMapper objCaller = new MenuItemDataMapper();

            return objCaller.GetByID(ID);
        }
Beispiel #7
0
        public static int Add(MenuItem obj)
        {
            MenuItemDataMapper objCaller = new MenuItemDataMapper();

            return objCaller.Add(obj);
        }
Beispiel #8
0
        public static void Delete(int ID)
        {
            MenuItemDataMapper objCaller = new MenuItemDataMapper();

            objCaller.Delete(ID);
        }
Beispiel #9
0
        public static IList<MenuItem> Search(string keyword)
        {
            MenuItemDataMapper objCaller = new MenuItemDataMapper();

            return objCaller.Search(keyword);
        }
Beispiel #10
0
        public static IList<MenuItem> GetAllByCategoryandLang(int langid, string hash)
        {
            MenuItemDataMapper objCaller = new MenuItemDataMapper();

            return objCaller.GetAllByCategoryandLang(hash, langid);
        }
Beispiel #11
0
        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);
        }