예제 #1
0
        public ActionResult Sys_Pages_Display()
        {
            try
            {
                if (SessionData.CurrentUser == null)
                {
                    return(Redirect("/"));
                }

                decimal               _total_record = 0;
                Sys_Pages_BL          objBL         = new Sys_Pages_BL();
                string                _keySearch    = "ALL";
                List <Sys_Pages_Info> _lst          = objBL.Sys_Pages_Search(_keySearch, ref _total_record);
                string                htmlPaging    = WebApps.CommonFunction.AppsCommon.Get_HtmlPaging <Sys_Pages_Info>((int)_total_record, 1, "bản ghi");
                ViewBag.listArticles = _lst;
                ViewBag.Paging       = htmlPaging;
                ViewBag.SumRecord    = _total_record;
                return(View("~/Areas/Sys_Pages/Views/SysPages/Sys_Pages_Display.cshtml"));
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
                return(View());
            }
        }
예제 #2
0
        public ActionResult Search_Pages(string p_keySearch, int pPage)
        {
            try
            {
                string p_to   = "";
                string p_from = CommonFuc.Get_From_To_Page(pPage, ref p_to);

                decimal               _total_record = 0;
                Sys_Pages_BL          objBL         = new Sys_Pages_BL();
                string                language      = AppsCommon.GetCurrentLang();
                List <Sys_Pages_Info> _lst          = objBL.Sys_Pages_Search(p_keySearch, ref _total_record, p_from, p_to);
                string                htmlPaging    = WebApps.CommonFunction.AppsCommon.Get_HtmlPaging <NewsInfo>((int)_total_record, pPage, "Tin");
                ViewBag.listArticles = _lst;
                ViewBag.Paging       = htmlPaging;
                ViewBag.SumRecord    = _total_record;

                return(PartialView("~/Areas/Sys_Pages/Views/SysPages/_PartialView_List.cshtml"));
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
                return(View());
            }
        }