public ActionResult AddWidgetPopup(string btnId, string formId, BannerWidgetzoneModel model) { var bannerRecord = new IkBannerWidgetzone(); bannerRecord.WidgetZone = model.Widgetzone; bannerRecord.IsStatic = model.IsStatic; _bannerService.InsertBannerWidgetzone(bannerRecord); ViewBag.RefreshPage = true; ViewBag.btnId = btnId; ViewBag.formId = formId; return(View("~/Plugins/Widgets.IkBanner/Views/WidgetsBanner/AddWidgetPopup.cshtml", model)); }
//edit public ActionResult EditWidgetPopup(int id) { var sbw = _bannerService.GetBannerWidgetzoneById(id); if (sbw == null) { //No record found with the specified id return(RedirectToAction("Configure")); } var model = new BannerWidgetzoneModel() { Id = sbw.Id, Widgetzone = sbw.WidgetZone, IsStatic = sbw.IsStatic, }; return(View("~/Plugins/Widgets.IkBanner/Views/WidgetsBanner/EditWidgetPopup.cshtml", model)); }
public ActionResult EditWidgetPopup(string btnId, string formId, BannerWidgetzoneModel model) { var sbw = _bannerService.GetBannerWidgetzoneById(model.Id); if (sbw == null) { //No record found with the specified id return(RedirectToAction("Configure")); } sbw.WidgetZone = model.Widgetzone; sbw.IsStatic = model.IsStatic; _bannerService.UpdateBannerWidgetzone(sbw); ViewBag.RefreshPage = true; ViewBag.btnId = btnId; ViewBag.formId = formId; return(View("~/Plugins/Widgets.IkBanner/Views/WidgetsBanner/EditWidgetPopup.cshtml", model)); }
public ActionResult BannerWidgetzoneList(DataSourceRequest command) { var records = _bannerService.GetAllBannerWidgetzones(command.Page - 1, command.PageSize); var sbwModel = records.Select(x => { var m = new BannerWidgetzoneModel() { Id = x.Id, Widgetzone = x.WidgetZone, IsStatic = x.IsStatic, }; return(m); }) .ToList(); var gridModel = new DataSourceResult { Data = sbwModel, Total = records.Count }; return(Json(gridModel)); }
//add public ActionResult AddWidgetPopup() { var model = new BannerWidgetzoneModel(); return(View("~/Plugins/Widgets.IkBanner/Views/WidgetsBanner/AddWidgetPopup.cshtml", model)); }