public ActionResult Add() { var model = new Category { isTrash = false, categoryId = 0, languageId = 1 }; ViewBag.Chuyenmuc = "active"; ViewBag.languageId = _toolAdmin.LanguageSelectList(); ViewBag.parentId = _toolAdmin.CategorySelectList(null, null, model.languageId); return(View(model)); }
public ActionResult Add() { var model = new Post { createBy = User.Identity.Name, createTime = DateTime.Now, updateTime = DateTime.Now, isTrash = false, postView = 0, languageId = 1 }; ViewBag.categoryId = _toolAdmin.CategorySelectList(null, null, model.languageId); ViewBag.languageId = _toolAdmin.LanguageSelectList(); ViewBag.Quanlybaiviet = "active"; return(View(model)); }
public ActionResult Index() { ViewBag.Caidathethong = "active"; var model = new SettingModel(); model.Box1 = _service.GetByName("Box1")?.configBody ?? null; model.Box2 = _service.GetByName("Box2")?.configBody ?? null; model.Box3 = _service.GetByName("Box3")?.configBody ?? null; model.GioiThieuTacPham = _service.GetByName("GioiThieuTacPham")?.configBody ?? null; model.Footer = _service.GetByName("Footer")?.configBody ?? null; model.MainMenu = _service.GetByName("MainMenu")?.configBody ?? null; model.RightMenu = _service.GetByName("RightMenu")?.configBody ?? null; model.RightMenu2 = _service.GetByName("RightMenu2")?.configBody ?? null; model.RightMenu3 = _service.GetByName("RightMenu3")?.configBody ?? null; model.RightMenu4 = _service.GetByName("RightMenu4")?.configBody ?? null; model.LienKetWebsite = _service.GetByName("LienKetWebsite")?.configBody ?? null; model.Banner = _service.GetByName("Banner")?.configBody ?? null; model.BoxRight3 = _service.GetByName("BoxRight3")?.configBody ?? null; model.BoxRight4 = _service.GetByName("BoxRight4")?.configBody ?? null; ViewBag.Box1 = _toolAdmin.CategorySelectList(null, null, 1); ViewBag.Box2 = _toolAdmin.CategorySelectList(null, null, 1); ViewBag.Box3 = _toolAdmin.CategorySelectList(null, null, 1); ViewBag.GioiThieuTacPham = _toolAdmin.SlideDropdown(_sildeService); ViewBag.BoxRight3 = _toolAdmin.SlideDropdown(_sildeService); ViewBag.MainMenu = _toolAdmin.MenuDropdown(_menuService, 1); ViewBag.RightMenu = _toolAdmin.MenuDropdown(_menuService, 1); ViewBag.RightMenu2 = _toolAdmin.MenuDropdown(_menuService, 1); ViewBag.RightMenu3 = _toolAdmin.MenuDropdown(_menuService, 1); ViewBag.RightMenu4 = _toolAdmin.MenuDropdown(_menuService, 1); ViewBag.LienKetWebsite = _toolAdmin.MenuDropdown(_menuService, 1); return(View(model)); }