Beispiel #1
0
        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));
        }
Beispiel #2
0
        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));
        }
Beispiel #3
0
 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 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 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));
        }
Beispiel #6
0
        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));
        }
Beispiel #7
0
        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));
        }