public ActionResult CatalougeSearch(string keysSearch, string options) { var lstOjects = new List <WikiCatalogues_Info>(); try { WikiCatalogue_BL _CatalogueBL = new WikiCatalogue_BL(); lstOjects = _CatalogueBL.Portal_Catalogue_Search(keysSearch + "|" + AppsCommon.GetCurrentLang(), options); ViewBag.Paging = _CatalogueBL.GetPagingHtml(); string _Cataid = ""; WikiCatalogues_Info _parentinfo = new WikiCatalogues_Info(); if (keysSearch != "" && keysSearch.Split('|').Length > 1) { _Cataid = keysSearch.Split('|')[2]; } if (_Cataid != "0") { _parentinfo = _CatalogueBL.WikiCatalogue_GetByID(Convert.ToDecimal(_Cataid)); } else { _Cataid = _parentinfo.ID.ToString(); } ViewBag.Parentinfo = _parentinfo; } catch (Exception ex) { Logger.LogException(ex); } ViewBag.ListObject = lstOjects; return(PartialView("/Areas/Home/Views/Wiki/_PartialListChilCataByParent.cshtml")); }
public ActionResult ViewCata() { try { WikiCatalogue_BL _CatalogueBL = new WikiCatalogue_BL(); string _Cataid = ""; if (RouteData.Values["id"] != null) { _Cataid = RouteData.Values["id"].ToString(); } WikiCatalogues_Info _parentinfo = new WikiCatalogues_Info(); List <WikiCatalogues_Info> _ListCataMenu = new List <WikiCatalogues_Info>(); _ListCataMenu = _CatalogueBL.Portal_CataGetAll(); List <WikiCatalogues_Info> _ListCata = new List <WikiCatalogues_Info>(); foreach (var item in _ListCataMenu) { if (item.ID != 0) { _parentinfo = item; break; } } if (_Cataid != "0") { _parentinfo = _CatalogueBL.WikiCatalogue_GetByID(Convert.ToDecimal(_Cataid)); } else { ViewBag.DefaultPage = 1; _Cataid = _parentinfo.ID.ToString(); } _ListCata = _CatalogueBL.Portal_Catalogue_Search("ALL|ALL|" + _Cataid.ToString() + "|" + AppsCommon.GetCurrentLang()); ViewBag.Paging = _CatalogueBL.GetPagingHtml(); ViewBag.ListObject = _ListCata; ViewBag.Parentinfo = _parentinfo; ViewBag.ListCatalogue = _ListCataMenu; // lấy thằng đầu tiên ViewBag.CurrCata = _parentinfo.ID; } catch (Exception ex) { Logger.LogException(ex); } return(View("/Areas/Home/Views/Wiki/ViewCatalogue.cshtml")); }
public ActionResult FindOjectCatalouge(string keysSearch, string options) { var lstOjects = new List <WikiCatalogues_Info>(); try { var ObjBL = new WikiCatalogue_BL(); lstOjects = ObjBL.WikiCata_Search(keysSearch, options); ViewBag.Paging = ObjBL.GetPagingHtml(); } catch (Exception ex) { Logger.LogException(ex); } return(PartialView("/Areas/Wiki/Views/Catalogue/_PartialCatalogueData.cshtml", lstOjects)); }
public ActionResult CatalogueList() { if (SessionData.CurrentUser == null) { return(Redirect("/account/dang-xuat")); } List <WikiCatalogues_Info> lstObj = new List <WikiCatalogues_Info>(); try { var ObjBL = new WikiCatalogue_BL(); lstObj = ObjBL.WikiCata_Search(); ViewBag.Paging = ObjBL.GetPagingHtml(); List <WikiCatalogues_Info> lstOjects = ObjBL.WikiCatalogueGetAll(); ViewBag.ListCata = lstOjects; } catch (Exception ex) { Logger.LogException(ex); } return(PartialView("/Areas/Wiki/Views/Catalogue/CatalogueList.cshtml", lstObj)); }