public ActionResult Edit_Pages(Sys_Pages_Info p_Sys_Pages_Info) { try { if (p_Sys_Pages_Info == null) { return(Json(new { status = -99 })); } string language = AppsCommon.GetCurrentLang(); var ModifiedBy = SessionData.CurrentUser.Username; var ModifiedDate = CommonFuc.CurrentDate(); if (p_Sys_Pages_Info.pfileLogo != null) { p_Sys_Pages_Info.Imageheader = AppLoadHelpers.PushFileToServer(p_Sys_Pages_Info.pfileLogo, AppUpload.Logo); } p_Sys_Pages_Info.Modified_By = SessionData.CurrentUser.Username; var objBL = new Sys_Pages_BL(); decimal preturn = objBL.Sys_Pages_Update(p_Sys_Pages_Info); if (preturn >= 0) { MemoryData.Load_Sys_page(); } return(Json(new { status = preturn })); } catch (Exception ex) { Logger.LogException(ex); return(View()); } }
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()); } }
public ActionResult Del_Pages(decimal p_id) { try { decimal preturn = 0; if (SessionData.CurrentUser == null) { return(Redirect("/")); } var objBL = new Sys_Pages_BL(); Sys_Pages_Info _Info = new Sys_Pages_Info(); var ModifiedBy = SessionData.CurrentUser.Username; _Info.Id = p_id; _Info.Modified_By = ModifiedBy; preturn = objBL.Sys_Pages_Deleted(_Info); if (preturn >= 0) { MemoryData.Load_Sys_page(); } return(Json(new { status = preturn })); } catch (Exception ex) { Logger.LogException(ex); return(View()); } }
public ActionResult ContactDisplay() { var objBL = new Sys_Pages_BL(); string language = AppsCommon.GetCurrentLang(); Sys_Pages_Info _pageInfo = objBL.Sys_Pages_GetBy_Code("abot"); ViewBag.objNewInfo = _pageInfo; return(View("~/Areas/Contact/Views/Contact/ContactDisplay.cshtml")); }
public static void Load_Sys_page() { try { Sys_Pages_BL _bl = new Sys_Pages_BL(); List <Sys_Pages_Info> _lst = _bl.Sys_Pages_GetAll(); foreach (Sys_Pages_Info item in _lst) { c_dic_Sys_Pages[item.Code.ToUpper()] = item; } } catch (Exception ex) { Logger.LogException(ex); } }
public ActionResult NewsDetailmembership() { try { string _code = ""; if (RouteData.Values.ContainsKey("id")) { _code = CommonFuc.ConvertToString(RouteData.Values["id"]); } var objBL = new Sys_Pages_BL(); string language = AppsCommon.GetCurrentLang(); Sys_Pages_Info _pageInfo = objBL.Sys_Pages_GetBy_Code(_code); ViewBag.objNewInfo = _pageInfo; return(View("~/Areas/Sys_Pages/Views/SysPages/NewsDetail_By_Home.cshtml")); //string pCategory = ""; //if (RouteData.Values.ContainsKey("id")) //{ // pCategory = CommonFuc.ConvertToString(RouteData.Values["id"]); //} //var objNewsBL = new NewsBL(); //string language = AppsCommon.GetCurrentLang(); //List<NewsInfo> lstNews = objNewsBL.NewsStatic(language); //ViewBag.objNewInfo = new NewsInfo(); //if (lstNews.Count > 0) //{ // foreach (var item in lstNews) // { // if (item.Categories_Id.ToUpper() == pCategory.ToUpper()) // { // ViewBag.objNewInfo = item; // return View("~/Areas/Articles/Views/ArticlesNews/NewsDetailByCategory.cshtml"); // } // } //} //return View("~/Areas/Articles/Views/ArticlesNews/NewsDetailByCategory.cshtml"); } catch (Exception ex) { Logger.LogException(ex); return(View()); } }
public ActionResult NewsDetail_Page() { try { string _code = ""; if (RouteData.Values.ContainsKey("id")) { _code = CommonFuc.ConvertToString(RouteData.Values["id"]); } var objBL = new Sys_Pages_BL(); string language = AppsCommon.GetCurrentLang(); Sys_Pages_Info _pageInfo = objBL.Sys_Pages_GetBy_Code(_code); ViewBag.objNewInfo = _pageInfo; return(View("~/Areas/Sys_Pages/Views/SysPages/NewsDetail_By_Home.cshtml")); } catch (Exception ex) { Logger.LogException(ex); return(View()); } }
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()); } }
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()); } }