Ejemplo n.º 1
0
        public PartialViewResult UpdatePagesModal(string id)
        {
            var pageId = Convert.ToInt32(id);
            var oModel = new InsertUpdatePageModle();

            var getLstType = _db.Pages.Where(x => x.TypeId != 3).ToList();

            if (getLstType.Count > 0)
            {
                oModel.LstParent = getLstType;
            }

            var getPageCategory = _db.PagesCategories.ToList();

            if (getPageCategory.Count > 0)
            {
                oModel.LstPageCategory = getPageCategory;
            }

            //oModel.lstModules = DAL.Account.Modules.GetModules(null).Results;

            if (pageId > 0)
            {
                var getPage = _db.Pages.First(x => x.Id == pageId);
                if (getPage != null)
                {
                    oModel.OPage = getPage;
                }
            }

            return(PartialView("PageParts/_PagesUpdateModal", oModel));
        }
Ejemplo n.º 2
0
        public PartialViewResult InsertPagesModal()
        {
            var oModel = new InsertUpdatePageModle();

            var getLstType = _db.Pages.Where(x => x.ParentId == 0 && x.TypeId != 3).ToList();

            if (getLstType.Count > 0)
            {
                oModel.LstParent = getLstType;
            }

            var getPageCategory = _db.PagesCategories.ToList();

            if (getPageCategory.Count > 0)
            {
                oModel.LstPageCategory = getPageCategory;
            }

            //oModel.lstModules = DAL.Account.Modules.GetModules(null).Results;

            return(PartialView("PageParts/_PagesInsertModal", oModel));
        }