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 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 WikiDocAdd() { try { if (SessionData.CurrentUser == null) { return(Redirect("/account/dang-xuat")); } decimal _Cataid = 0; if (RouteData.Values.ContainsKey("id") && RouteData.Values["id"].ToString() != "0") { _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; } ViewBag.Cataid = _Cataid; if (SessionData.CurrentUser == null) { return(Redirect("/")); } var _WikiCataBL = new WikiCatalogue_BL(); List <WikiCatalogues_Info> lstOjects = _WikiCataBL.WikiCatalogueGetAll(); ViewBag.ListCata = lstOjects; } catch (Exception ex) { Logger.LogException(ex); } return(PartialView("/Areas/Wiki/Views/WikiDoc/_PartialDocAdd.cshtml")); }
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 AddNew() { var ObjBL = new WikiCatalogue_BL(); List <WikiCatalogues_Info> lstOjects = ObjBL.WikiCatalogueGetAll(); ViewBag.ListCata = lstOjects; return(PartialView("~/Areas/Wiki/Views/Catalogue/_PartialCatalogueAdd.cshtml")); }
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 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 ViewDetailCatalogue(decimal p_id) { var _ObjectInfo = new WikiCatalogues_Info(); var _ObjBL = new WikiCatalogue_BL(); try { _ObjectInfo = _ObjBL.WikiCatalogue_GetByID(p_id); } catch (Exception ex) { Logger.LogException(ex); } return(PartialView("~/Areas/Wiki/Views/Catalogue/_PartialCatalogueDetail.cshtml", _ObjectInfo)); }
public ActionResult DoDeleteCatalogue(int p_id) { decimal _result = 0; var _ObjBL = new WikiCatalogue_BL(); try { // var modifiedBy = SessionData.CurrentUser.Username; _result = _ObjBL.WikiCatalogue_Delete(p_id); } catch (Exception ex) { Logger.LogException(ex); } return(Json(new { result = _result })); }
public ActionResult GetViewToEditClass(decimal p_id) { var _ObjectInfo = new WikiCatalogues_Info(); var _ObjBL = new WikiCatalogue_BL(); try { _ObjectInfo = _ObjBL.WikiCatalogue_GetByID(p_id); } catch (Exception ex) { Logger.LogException(ex); } List <WikiCatalogues_Info> lstOjects = _ObjBL.WikiCatalogueGetAll(); ViewBag.ListCata = lstOjects; return(PartialView("~/Areas/Wiki/Views/Catalogue/_PartialCatalogueEdit.cshtml", _ObjectInfo)); }
public ActionResult DoAddCatalogue(WikiCatalogues_Info _ObjectInfo) { decimal _rel = 0; try { var _ObjBL = new WikiCatalogue_BL(); _ObjectInfo.CREATED_BY = SessionData.CurrentUser.Username; _ObjectInfo.CREATED_DATE = DateTime.Now; _rel = _ObjBL.WikiCatalogue_Insert(_ObjectInfo); } catch (Exception ex) { Logger.LogException(ex); } return(Json(new { result = _rel })); }
public ActionResult DoEditObject(WikiCatalogues_Info _ObjectInfo) { decimal _result = 0; try { var _ObjBL = new WikiCatalogue_BL(); _ObjectInfo.MODIFIED_BY = SessionData.CurrentUser.Username; _ObjectInfo.MODIFIED_DATE = DateTime.Now; _result = _ObjBL.WikiCatalogue_Update(_ObjectInfo); } catch (Exception ex) { Logger.LogException(ex); } return(Json(new { result = _result })); }
public ActionResult ViewEdit() { if (SessionData.CurrentUser == null) { return(Redirect("/account/dang-xuat")); } var _WikiDoc_BL = new WikiDoc_BL(); WikiDoc_Info _ObjInfo = new WikiDoc_Info(); decimal _docid = 0; if (RouteData.Values.ContainsKey("id")) { _docid = CommonFuc.ConvertToDecimal(RouteData.Values["id"]); } int _crrstatus = 0; if (RouteData.Values.ContainsKey("id1")) { _crrstatus = CommonFuc.ConvertToInt(RouteData.Values["id1"]); } try { _ObjInfo = _WikiDoc_BL.WikiDoc_GetById(_docid); var _WikiCataBL = new WikiCatalogue_BL(); List <WikiCatalogues_Info> lstOjects = _WikiCataBL.WikiCatalogueGetAll(); ViewBag.ListCata = lstOjects; // bỏ hết hashtag nvshashtag đi _ObjInfo.CONTENT = _ObjInfo.CONTENT.Replace("<nvshashtag>", "").Replace("</nvshashtag>", ""); var _ObjectInfo = new WikiCatalogues_Info(); var _WikiCatalogue_BL = new WikiCatalogue_BL(); _ObjectInfo = _WikiCatalogue_BL.WikiCatalogue_GetByID(_ObjInfo.CATA_ID); ViewBag.CataInfo = _ObjectInfo; } catch (Exception ex) { Logger.LogException(ex); } ViewBag.CurrStatus = _crrstatus; return(PartialView("~/Areas/Wiki/Views/WikiDoc/_PartialDocEdit.cshtml", _ObjInfo)); }
public ActionResult SearchChildCatalogue(string p_parentid) { var _App_Class_BL = new App_Class_BL(); App_Class_Info _appclassinfo = new App_Class_Info(); List <WikiCatalogues_Info> lstOjects = new List <WikiCatalogues_Info>(); try { var _WikiCataBL = new WikiCatalogue_BL(); lstOjects = _WikiCataBL.WikiCatalogueGetAll(); if (!string.IsNullOrEmpty(p_parentid)) { lstOjects = lstOjects.FindAll(m => m.PARENT_ID.ToString().Equals(p_parentid)); } } catch (Exception ex) { Logger.LogException(ex); } return(PartialView("~/Areas/Wiki/Views/Shared/_PartialCatalogue.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)); }
public ActionResult GetListdocByCataid(decimal p_id) { try { WikiCatalogue_BL _CatalogueBL = new WikiCatalogue_BL(); WikiDoc_BL _WikiBL = new WikiDoc_BL(); List <WikiDoc_Info> _ListDocSearch = new List <WikiDoc_Info>(); // lấy ds tin theo danh mục _ListDocSearch = _WikiBL.WikiDoc_GetBy_CataID(p_id); ViewBag.ListDocSearch = _ListDocSearch; WikiCatalogue_BL _Catabl = new WikiCatalogue_BL(); WikiCatalogues_Info _Catainfo = new WikiCatalogues_Info(); _Catainfo = _Catabl.WikiCatalogue_GetByID(p_id); ViewBag.CatalogueInfo = _Catainfo; } catch (Exception ex) { Logger.LogException(ex); } return(PartialView("/Areas/Home/Views/Wiki/_PartialListDocByCata.cshtml")); }
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")); }