public ActionResult WenyizashiHomeMenu() { SiteMenuBll smBll = new SiteMenuBll(); IEnumerable <SiteMenu> siteMenuList = smBll.GetPageMenuByCategory("wenyizazhidaohang"); return(View(siteMenuList)); }
// GET: Partinal public ActionResult HomePageMenu() { SiteMenuBll smBll = new SiteMenuBll(); IEnumerable <SiteMenu> siteMenuList = smBll.GetPageMenuByCategory("shouyetop"); return(View(siteMenuList)); }
// GET: SiteMenu public ActionResult Index() { SiteMenuBll siteMenuBll = new SiteMenuBll(); var menuList = siteMenuBll.SelectAllMenu(); return(View(menuList)); }
public ActionResult Add(SiteMenu sm) { ViewBag.MenuFather = GetAllMenuFatherForDLL(sm.menu_father_id).AsEnumerable(); SiteMenuBll smBll = new SiteMenuBll(); smBll.AddSiteMenu(sm); return(Redirect("index")); }
public ActionResult Edit(SiteMenu sm) { SiteMenuBll smBll = new SiteMenuBll(); ViewBag.MenuFather = GetAllMenuFatherForDLL().AsEnumerable(); SiteMenuBll funBll = new SiteMenuBll(); smBll.UpdateSiteMenu(sm); return(Redirect("Index")); }
public ActionResult HomePageCategoryMenu() { SiteMenuBll smBll = new SiteMenuBll(); List <SiteMenuViewModel> siteMenuModelList = new List <SiteMenuViewModel>(); IEnumerable <SiteMenu> siteMenuList = smBll.GetPageMenuByCategory("3"); foreach (var item in siteMenuList) { SiteMenuViewModel smvm = new SiteMenuViewModel(); smvm.menu_name = item.menu_name; smvm.siteMenuList = smBll.GetPageMenuByCategory(item.menu_code); siteMenuModelList.Add(smvm); } return(View(siteMenuModelList)); }
public ActionResult Edit(int id) { if (id == null || id == 0) { return(View("Index")); } SiteMenuBll smBll = new SiteMenuBll(); SiteMenu sm = new SiteMenu(); sm.menu_id = id; sm = smBll.GetOneMenu(sm); sm.menu_id = id; ViewBag.MenuFather = GetAllMenuFatherForDLL(sm.menu_father_id).AsEnumerable(); return(View(sm)); }
private SelectList GetAllMenuFatherForDLL(int selectValue = 0) { var smBll = new SiteMenuBll(); //List<SelectListItem> ddlDPList = new List<SelectListItem>(); SelectList ddlDPList; var dpList = smBll.GetAllMenuFather(); if (selectValue == 0) { ddlDPList = new SelectList(dpList, "menu_id", "menu_name"); } else { ddlDPList = new SelectList(dpList, "menu_id", "menu_name", selectValue); } return(ddlDPList); }