public ActionResult lienhePOST(FormCollection form) { ICB.Business.Access.SystemConfigProvider systemConfigProvider = new SystemConfigProvider(); ViewData["INFO"] = systemConfigProvider.Get(); string name = form["Name"]; string tel = form["Tel"]; string email = form["Email"]; string caption = form["Caption"]; string message = form["Message"]; ICB.Business.Access.FeedbackProvider feedbackProvider = new FeedbackProvider(); Feedback feedback = new Feedback { CreateTime = DateTime.Now, Content = message, Answered = false, Email = email, Name = name, PhoneNumber = tel, Theme = caption, Status = 0, UserID = null }; var result = feedbackProvider.Insert(feedback); if (result == NDK.ApplicationCore.Extensions.ResponseResults.AccessEntityStatusCode.OK) { ViewBag.Status = true; } else { ViewBag.Status = false; } return(View("lienhe")); }
public async Task <JsonResult> Update_HOSO_Description(string Caption, string Description) { SystemConfigProvider systemConfigProvider = new SystemConfigProvider(); var result = await systemConfigProvider.INSERTorUPDATE_HOSO_Description(Caption, Description); return(Json(new { Status = result.Item1, data = result.Item2 })); }
public async Task <JsonResult> Update_HOSO(string url) { SystemConfigProvider systemConfigProvider = new SystemConfigProvider(); var result = await systemConfigProvider.INSERTorUPDATE_HOSO(url); return(Json(new { Status = result.Item1, data = result.Item2 })); }
public ActionResult AboutUs() { SystemConfigProvider systemConfigProvider = new SystemConfigProvider(); var about = systemConfigProvider.GetGioiThieu(); ViewData["model"] = about == null ? "" : about.Content; ViewData["name"] = about == null ? "" : about.Name; return(View(about)); }
public ActionResult Index() { SystemConfigProvider systemConfigProvider = new SystemConfigProvider(); ViewData["BANNER"] = systemConfigProvider.GetBanner(); var hoso = systemConfigProvider.GetHOSONANGLUC(); ViewBag.HOSONANGLUC = hoso == null ? "" : hoso.Name; ViewBag.Caption = hoso == null ? "" : hoso.Caption; ViewBag.Description = hoso == null ? "" : hoso.Description; return(View(systemConfigProvider.Get())); }
public async Task <JsonResult> EditBanner(int id, string src) { if (string.IsNullOrEmpty(src) || string.IsNullOrWhiteSpace(src)) { return(Json(new { result = AccessEntityStatusCode.ModelFailed })); } else { SystemConfigProvider systemConfigProvider = new SystemConfigProvider(); var result = await systemConfigProvider.EditBanner(id, src); return(Json(new { result = result.Item1, data = result.Item2 })); } }
public async Task <JsonResult> RemoveBanner(int id) { SystemConfigProvider systemConfigProvider = new SystemConfigProvider(); var model = systemConfigProvider.GetByID(id); if (model == null) { return(Json(new { result = AccessEntityStatusCode.NotFound })); } else { var result = await systemConfigProvider.DeleteAsync(id); return(Json(new { result = result })); } }
public async Task <JsonResult> InsertOrUpdate(SystemConfig model) { if (ModelState.IsValid) { SystemConfigProvider systemConfigProvider = new SystemConfigProvider(); var result = await systemConfigProvider.InsertOrUpdateAsync(model); return(Json(result)); } else { return(Json(new AccessEntityResult { Status = AccessEntityStatusCode.ModelFailed, Message = MessageManager.GetErrorMessage(ModuleType.Base, MessageType.ModelFailed) })); } }
public async Task <ActionResult> AboutUsPOST(SystemConfig model) { model.Status = 1; model.Category = (int)WebsiteCategory.GioiThieu; SystemConfigProvider systemConfigProvider = new SystemConfigProvider(); var result = await systemConfigProvider.INSERTorUPDATE_GIOITHIEU(model.Name, model.Content); if (result.Item1 == AccessEntityStatusCode.OK) { TempData["message"] = "Chỉnh sửa thông tin thành công"; return(RedirectToAction("AboutUs")); } else { TempData["message"] = "Không chỉnh sửa được thông tin giới thiệu"; return(View("AboutUs")); } }
public ActionResult lienhe() { ICB.Business.Access.SystemConfigProvider systemConfigProvider = new SystemConfigProvider(); ViewData["INFO"] = systemConfigProvider.Get(); return(View(systemConfigProvider.Get())); }
public async Task <ActionResult> gioithieu() { SystemConfigProvider systemConfigProvider = new SystemConfigProvider(); return(View((await systemConfigProvider.GetGioiThieuAsync()))); }
public async Task <JsonResult> GetInfo() { SystemConfigProvider systemConfigProvider = new SystemConfigProvider(); return(Json(await systemConfigProvider.GetAsync(), JsonRequestBehavior.AllowGet)); }