Esempio n. 1
0
        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));
        }
Esempio n. 2
0
 public ActionResult DetailNewsArticles()
 {
     try
     {
         if (SessionData.CurrentUser == null)
         {
             return(Redirect("/"));
         }
         decimal pIDArticles = 0;
         int     Status      = 0;
         if (RouteData.Values.ContainsKey("id"))
         {
             pIDArticles = CommonFuc.ConvertToDecimal(RouteData.Values["id"]);
         }
         if (RouteData.Values.ContainsKey("id2"))
         {
             Status = CommonFuc.ConvertToInt(RouteData.Values["id2"]);
         }
         ViewBag.Status = Status;
         var objNewsBL = new NewsBL();
         ViewBag.lstCategory = WebApps.CommonFunction.AppsCommon.AllCode_GetBy_CdTypeCdName("ARTICLES", "CATEGORIES");
         string language   = AppsCommon.GetCurrentLang();
         var    objNewInfo = objNewsBL.ArticlesGetById(pIDArticles, language);
         return(View("~/Areas/Articles/Views/ArticlesNews/_PartialviewView.cshtml", objNewInfo));
     }
     catch (Exception ex)
     {
         Logger.LogException(ex);
         return(View());
     }
 }
Esempio n. 3
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));
        }
Esempio n. 4
0
        public ActionResult EditNewsArticles()
        {
            try
            {
                if (SessionData.CurrentUser == null)
                {
                    return(Redirect("/"));
                }
                decimal pIDArticles = 0;
                int     Status      = 0;
                if (RouteData.Values.ContainsKey("id"))
                {
                    pIDArticles = CommonFuc.ConvertToDecimal(RouteData.Values["id"]);
                }
                if (RouteData.Values.ContainsKey("id2"))
                {
                    Status = CommonFuc.ConvertToInt(RouteData.Values["id2"]);
                }
                ViewBag.Status = Status;
                var objNewsBL = new NewsBL();
                ViewBag.lstCategory = WebApps.CommonFunction.AppsCommon.AllCode_GetBy_CdTypeCdName("ARTICLES", "CATEGORIES");
                string language   = AppsCommon.GetCurrentLang();
                var    objNewInfo = objNewsBL.ArticlesGetById(pIDArticles, language);

                if (SessionData.CurrentUser != null && SessionData.CurrentUser.Type != (decimal)CommonEnums.UserType.Customer)
                {
                    B_Todos_BL   _B_Todos_BL   = new B_Todos_BL();
                    B_Todos_Info _B_Todos_Info = _B_Todos_BL.Todo_GetByCaseCode(objNewInfo.Case_Code, SessionData.CurrentUser.Username);
                    if (_B_Todos_Info != null)
                    {
                        ViewBag.B_Todos_Info = _B_Todos_Info;
                    }
                }

                return(View("~/Areas/Articles/Views/ArticlesNews/_PartialviewEdit.cshtml", objNewInfo));
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
                return(View());
            }
        }
Esempio n. 5
0
 public ActionResult NewsDetailPortal()
 {
     try
     {
         decimal pIDArticles = 0;
         //int Status = 7;
         if (RouteData.Values.ContainsKey("id"))
         {
             pIDArticles = CommonFuc.ConvertToDecimal(RouteData.Values["id"]);
         }
         var    objNewsBL  = new NewsBL();
         string language   = AppsCommon.GetCurrentLang();
         var    objNewInfo = objNewsBL.ArticlesGetById(pIDArticles, language);
         ViewBag.objNewInfo = objNewInfo;
         return(View("~/Areas/Articles/Views/ArticlesNews/_HomeDetailNews.cshtml"));
     }
     catch (Exception ex)
     {
         Logger.LogException(ex);
         return(View());
     }
 }
Esempio n. 6
0
        public ActionResult GetListArticles()
        {
            try
            {
                decimal pStatus = 0;
                if (SessionData.CurrentUser == null)
                {
                    return(Redirect("/"));
                }
                if (RouteData.Values.ContainsKey("id"))
                {
                    pStatus = CommonFuc.ConvertToDecimal(RouteData.Values["id"]);
                }
                ViewBag.Status = pStatus;


                decimal         _total_record = 0;
                NewsBL          objBL         = new NewsBL();
                string          _status       = "ALL";
                string          language      = AppsCommon.GetCurrentLang();
                string          _category     = "ALL";
                string          _title        = "ALL";
                string          _keySearch    = _status + "|ALL|" + language + "|" + _category + "|" + _title + "|" + SessionData.CurrentUser.Username;
                List <NewsInfo> _lst          = objBL.ArticleHomeSearch(_keySearch, ref _total_record);
                string          htmlPaging    = WebApps.CommonFunction.AppsCommon.Get_HtmlPaging <NewsInfo>((int)_total_record, 1, "Tin");
                ViewBag.listArticles = _lst;
                ViewBag.Paging       = htmlPaging;
                ViewBag.Status       = pStatus;
                ViewBag.SumRecord    = _total_record;
                ViewBag.lstCategory  = WebApps.CommonFunction.AppsCommon.AllCode_GetBy_CdTypeCdName("ARTICLES", "CATEGORIES");

                return(View("~/Areas/Articles/Views/ArticlesNews/GetListArticles.cshtml"));
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
                return(View());
            }
        }
Esempio n. 7
0
        public ActionResult Detail_Page()
        {
            try
            {
                if (SessionData.CurrentUser == null)
                {
                    return(Redirect("/"));
                }
                decimal _id = 0;
                if (RouteData.Values.ContainsKey("id"))
                {
                    _id = CommonFuc.ConvertToDecimal(RouteData.Values["id"]);
                }

                var objNewsBL = new Sys_Pages_BL();
                var objPage   = objNewsBL.Sys_Pages_GetById(_id);
                return(View("~/Areas/Sys_Pages/Views/SysPages/_PartialviewView.cshtml", objPage));
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
                return(View());
            }
        }