public ActionResult ChildCatalogue() { try { WikiCatalogue_BL _CatalogueBL = new WikiCatalogue_BL(); WikiDoc_BL _WikiBL = new WikiDoc_BL(); decimal _Cataid = 0; if (RouteData.Values["id"] != null) { _Cataid = Convert.ToDecimal(RouteData.Values["id"]); } List <WikiCatalogues_Info> _ListCata = new List <WikiCatalogues_Info>(); _ListCata = _CatalogueBL.Portal_CataGetAll(); List <WikiDoc_Info> _ListDocSearch = new List <WikiDoc_Info>(); if (_Cataid > 0) { // lấy ds tin theo danh mục _ListDocSearch = _WikiBL.PortalWikiDoc_Search("3|" + _Cataid.ToString() + "|ALL|" + AppsCommon.GetCurrentLang()); ViewBag.Paging = _WikiBL.GetPagingHtml(); ViewBag.ListDocSearch = _ListDocSearch; WikiCatalogue_BL _Catabl = new WikiCatalogue_BL(); WikiCatalogues_Info _Catainfo = new WikiCatalogues_Info(); _Catainfo = _Catabl.WikiCatalogue_GetByID(_Cataid); ViewBag.CatalogueInfo = _Catainfo; } else { // lấy thằng đầu tiên WikiCatalogues_Info _firstCata = new WikiCatalogues_Info(); foreach (var item in _ListCata) { if (item.PARENT_ID != 0) { _firstCata = item; break; } } _ListDocSearch = _WikiBL.PortalWikiDoc_Search("3|" + _firstCata.ID.ToString() + "|ALL|" + AppsCommon.GetCurrentLang()); ViewBag.Paging = _WikiBL.GetPagingHtml(); ViewBag.ListDocSearch = _ListDocSearch; ViewBag.CatalogueInfo = _firstCata; } ViewBag.ListCatalogue = _ListCata; ViewBag.CurrCata = _Cataid; } catch (Exception ex) { Logger.LogException(ex); } return(View("~/Areas/Home/Views/Wiki/ChildCatalogue.cshtml")); }
public ActionResult WikihomefindObjects(string keysSearch, string _sortype, int _reconpage, int p_CurrentPage) { decimal _total_record = 0; string p_to = ""; string p_from = CommonFuc.Get_From_To_Page(p_CurrentPage, ref p_to, _reconpage); _sortype = " ORDER BY " + _sortype; if (string.IsNullOrEmpty(_sortype) || _sortype.Trim() == "ORDER BY") { _sortype = "ALL"; } string htmlPaging = ""; try { var _WikiDoc_BL = new WikiDoc_BL(); keysSearch = "3|" + "ALL|ALL|" + SessionData.CurrentUser.Language; List <WikiDoc_Info> _lst = _WikiDoc_BL.HomeWikiDoc_Search(keysSearch, ref _total_record, p_from, p_to, _sortype); ViewBag.Paging = _WikiDoc_BL.GetPagingHtml(); htmlPaging = WebApps.CommonFunction.AppsCommon.Get_HtmlPaging <WikiDoc_Info>((int)_total_record, p_CurrentPage, "Bài viết", _reconpage, "WikihomejsPaging"); ViewBag.Paging = htmlPaging; ViewBag.Obj = _lst; ViewBag.SumRecord = _total_record; return(PartialView("~/Areas/Home/Views/Shared/_WikiHomeData.cshtml")); } catch (Exception ex) { Logger.LogException(ex); } return(null); }
public ActionResult WikiDocListByCatalogue() { if (SessionData.CurrentUser == null) { return(Redirect("/")); } List <WikiDoc_Info> lstObj = new List <WikiDoc_Info>(); decimal _Cataid = 0; if (RouteData.Values.ContainsKey("id")) { _Cataid = Convert.ToInt32(RouteData.Values["id"]); var _ObjectInfo = new WikiCatalogues_Info(); var _WikiCatalogue_BL = new WikiCatalogue_BL(); _ObjectInfo = _WikiCatalogue_BL.WikiCatalogue_GetByID(_Cataid); ViewBag.CataInfo = _ObjectInfo; } try { var _WikiCataBL = new WikiCatalogue_BL(); var ObjBL = new WikiDoc_BL(); lstObj = ObjBL.WikiDoc_Search(CommonWiki.Stt_daduyet.ToString() + "|" + _Cataid.ToString() + "|" + "|" + SessionData.CurrentUser.Username); ViewBag.Paging = ObjBL.GetPagingHtml(); List <WikiCatalogues_Info> lstOjects = _WikiCataBL.WikiCatalogueGetAll(); ViewBag.ListCata = lstOjects; } catch (Exception ex) { Logger.LogException(ex); } return(PartialView("/Areas/Wiki/Views/WikiDoc/WikiListByCatalogue.cshtml", lstObj)); }
public ActionResult WikiDocListAllStatus() { if (SessionData.CurrentUser == null) { return(Redirect("/account/dang-xuat")); } List <WikiDoc_Info> lstObj = new List <WikiDoc_Info>(); int _Status = 0; if (RouteData.Values.ContainsKey("id")) { _Status = Convert.ToInt32(RouteData.Values["id"]); ViewBag.CurrStatus = _Status; } try { var _WikiCataBL = new WikiCatalogue_BL(); var ObjBL = new WikiDoc_BL(); lstObj = ObjBL.WikiDoc_Search("ALL|ALL|ALL" + "|" + SessionData.CurrentUser.Username); ViewBag.Paging = ObjBL.GetPagingHtml(); List <WikiCatalogues_Info> lstOjects = _WikiCataBL.WikiCatalogueGetAll(); ViewBag.ListCata = lstOjects; } catch (Exception ex) { Logger.LogException(ex); } return(PartialView("/Areas/Wiki/Views/WikiDoc/ListDicAllStatus.cshtml", lstObj)); }
public ActionResult FindOject(string keysSearch, string options) { var lstOjects = new List <WikiDoc_Info>(); try { var _WikiDoc_BL = new WikiDoc_BL(); lstOjects = _WikiDoc_BL.WikiDoc_Search(keysSearch + "|" + SessionData.CurrentUser.Username, options); ViewBag.Paging = _WikiDoc_BL.GetPagingHtml(); } catch (Exception ex) { Logger.LogException(ex); } return(PartialView("~/Areas/Wiki/Views/WikiDoc/_PartialDocData.cshtml", lstOjects)); }
public ActionResult WikiDocSearch(string keysSearch, string options) { var lstOjects = new List <WikiDoc_Info>(); try { var _WikiDoc_BL = new WikiDoc_BL(); lstOjects = _WikiDoc_BL.PortalWikiDoc_Search(keysSearch + "|" + AppsCommon.GetCurrentLang(), options); ViewBag.Paging = _WikiDoc_BL.GetPagingHtml(); if (keysSearch.Split('|').Length > 2 && keysSearch.Split('|')[1] != "ALL" && keysSearch.Split('|')[1] != "") { WikiCatalogue_BL _Catabl = new WikiCatalogue_BL(); WikiCatalogues_Info _Catainfo = new WikiCatalogues_Info(); _Catainfo = _Catabl.WikiCatalogue_GetByID(Convert.ToDecimal((keysSearch.Split('|')[1]))); ViewBag.CatalogueInfo = _Catainfo; } } catch (Exception ex) { Logger.LogException(ex); } ViewBag.ListDocSearch = lstOjects; return(PartialView("/Areas/Home/Views/Wiki/_PartialListDocByCata.cshtml")); }