public ActionResult ViewDoc() { 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"]); } try { _ObjInfo = _WikiDoc_BL.WikiDoc_GetById(_docid); } catch (Exception ex) { Logger.LogException(ex); } int _crrstatus = 0; if (RouteData.Values.ContainsKey("id1")) { _crrstatus = CommonFuc.ConvertToInt(RouteData.Values["id1"]); } ViewBag.CurrStatus = _crrstatus; return(PartialView("~/Areas/Wiki/Views/WikiDoc/_PartialDocView.cshtml", _ObjInfo)); }
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)); }