public ActionResult Create(PageManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _pageServices.SavePageManageModel(model); if (response.Success) { var pageId = (int)response.Data; SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return RedirectToAction("Index"); default: return RedirectToAction("Edit", new { id = pageId }); } } SetErrorMessage(response.Message); } model.Parents = _pageTemplateServices.GetPossibleParents(); model.Positions = EnumUtilities.GetSelectListFromEnum<PageEnums.PositionEnums>(); model.RelativePages = _pageServices.GetRelativePages(model.Id, model.ParentId); model.StatusList = _pageServices.GetStatus(); model.PageTemplates = _pageTemplateServices.GetPageTemplateSelectList(model.PageTemplateId); return View(model); }
public ActionResult Create(PageManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _pageServices.SavePageManageModel(model); if (response.Success) { var pageId = (int)response.Data; SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return(RedirectToAction("Index")); default: return(RedirectToAction("Edit", new { id = pageId })); } } SetErrorMessage(response.Message); } model.Parents = _pageTemplateServices.GetPossibleParents(); model.Positions = EnumUtilities.GetSelectListFromEnum <PageEnums.PositionEnums>(); model.RelativePages = _pageServices.GetRelativePages(model.Id, model.ParentId); model.StatusList = _pageServices.GetStatus(); model.PageTemplates = _pageTemplateServices.GetPageTemplateSelectList(model.PageTemplateId); return(View(model)); }
public ActionResult Edit(EmailAccountManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _emailAccountServices.SaveEmailAccount(model); if (response.Success) { SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return RedirectToAction("Index"); default: return RedirectToAction("Edit", new { id = model.Id }); } } SetErrorMessage(response.Message); } return View(model); }
public ActionResult EditSettings(GroupManageSettingModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _rotatingImageGroupServices.SaveGroupSettings(model); if (response.Success) { SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return RedirectToAction("Index"); default: return RedirectToAction("EditSettings", new { id = model.Id }); } } SetErrorMessage(response.Message); } return View(model); }
public ActionResult Edit(ServiceManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _serviceServices.SaveServiceManageModel(model); if (response.Success) { SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return RedirectToAction("Index"); default: return RedirectToAction("Edit", new { id = model.Id }); } } SetErrorMessage(response.Message); } model.StatusList = _serviceServices.GetStatus(); return View(model); }
public ActionResult Edit(TemplateManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _templateServices.SaveTemplateManageModel(model); if (response.Success) { SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return(RedirectToAction("Index")); default: return(RedirectToAction("Edit", new { id = model.Id })); } } SetErrorMessage(response.Message); } return(View(model)); }
public ActionResult Edit(ClientMenuManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _clientMenuServices.SaveClientMenuManageModel(model); if (response.Success) { SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return RedirectToAction("Index"); default: return RedirectToAction("Edit", new { id = model.Id }); } } SetErrorMessage(response.Message); } model.Parents = _clientMenuServices.GetPossibleParents(); return View(model); }
public ActionResult Edit(SiteSettingManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _settingServices.SaveSettingManageModel(model, Request.Form); if (response.Success) { var templateId = model.Id; SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return RedirectToAction("Index"); default: return RedirectToAction("Edit", new { id = templateId }); } } SetErrorMessage(response.Message); } return View(model); }
public ActionResult Create(TemplateManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _templateServices.SaveTemplateManageModel(model); if (response.Success) { var templateId = (int)response.Data; SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return RedirectToAction("Index"); default: return RedirectToAction("Edit", new { id = templateId }); } } SetErrorMessage(response.Message); } return View(model); }
public ActionResult EditSettings(GroupManageSettingModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _rotatingImageGroupServices.SaveGroupSettings(model); if (response.Success) { SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return(RedirectToAction("Index")); default: return(RedirectToAction("EditSettings", new { id = model.Id })); } } SetErrorMessage(response.Message); } return(View(model)); }
public ActionResult Create(RotatingImageManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _rotatingImageServices.SaveRotatingImage(model); if (response.Success) { var rotatingImageId = (int)response.Data; SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return RedirectToAction("Index"); default: return RedirectToAction("Edit", new { id = rotatingImageId }); } } SetErrorMessage(response.Message); } model.Groups = _rotatingImageGroupServices.GetRotatingImageGroups(); return View(model); }
public ActionResult Edit(FileTemplateManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _fileTemplateServices.SaveFileTemplate(model); if (response.Success) { SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return RedirectToAction("Index"); default: return RedirectToAction("Edit", new { id = model.Id }); } } SetErrorMessage(response.Message); } model.PageTemplates = _pageTemplateServices.GetPageTemplateSelectListForFileTemplate(model.Id); model.Parents = _fileTemplateServices.GetPossibleParents(model.Id); return View(model); }
public ActionResult Edit(ClientMenuManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _clientMenuServices.SaveClientMenuManageModel(model); if (response.Success) { SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return(RedirectToAction("Index")); default: return(RedirectToAction("Edit", new { id = model.Id })); } } SetErrorMessage(response.Message); } model.Parents = _clientMenuServices.GetPossibleParents(); return(View(model)); }
public ActionResult Create(EmailAccountManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _emailAccountServices.SaveEmailAccount(model); if (response.Success) { var emailAccountId = (int)response.Data; SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return(RedirectToAction("Index")); default: return(RedirectToAction("Edit", new { id = emailAccountId })); } } SetErrorMessage(response.Message); } return(View(model)); }
public ActionResult Create(PageTemplateManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _pageTemplateServices.SavePageTemplate(model); if (response.Success) { var templateId = (int)response.Data; SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return(RedirectToAction("Index")); default: return(RedirectToAction("Edit", new { id = templateId })); } } SetErrorMessage(response.Message); } model.Parents = _pageTemplateServices.GetPossibleParents(); return(View(model)); }
public ActionResult Create(NewsManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _newsServices.SaveNewsManageModel(model); if (response.Success) { var templateId = (int)response.Data; SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return RedirectToAction("Index"); default: return RedirectToAction("Edit", new { id = templateId }); } } SetErrorMessage(response.Message); } model.StatusList = _newsServices.GetStatus(); model.NewsCategories = _newsCategoryServices.GetNewsCategories(); return View(model); }
public ActionResult Edit(NewsManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _newsServices.SaveNewsManageModel(model); if (response.Success) { SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return(RedirectToAction("Index")); default: return(RedirectToAction("Edit", new { id = model.Id })); } } SetErrorMessage(response.Message); } model.StatusList = _newsServices.GetStatus(); model.NewsCategories = _newsCategoryServices.GetNewsCategories(model.Id); return(View(model)); }
public ActionResult Edit(FileTemplateManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _fileTemplateServices.SaveFileTemplate(model); if (response.Success) { SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return(RedirectToAction("Index")); default: return(RedirectToAction("Edit", new { id = model.Id })); } } SetErrorMessage(response.Message); } model.PageTemplates = _pageTemplateServices.GetPageTemplateSelectListForFileTemplate(model.Id); model.Parents = _fileTemplateServices.GetPossibleParents(model.Id); return(View(model)); }
public ActionResult Create(RotatingImageManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _rotatingImageServices.SaveRotatingImage(model); if (response.Success) { var rotatingImageId = (int)response.Data; SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return(RedirectToAction("Index")); default: return(RedirectToAction("Edit", new { id = rotatingImageId })); } } SetErrorMessage(response.Message); } model.Groups = _rotatingImageGroupServices.GetRotatingImageGroups(); return(View(model)); }
public ActionResult Create(ServiceManageModel model, SubmitTypeEnums submit) { if (ModelState.IsValid) { var response = _serviceServices.SaveServiceManageModel(model); if (response.Success) { var serviceId = (int)response.Data; SetSuccessMessage(response.Message); switch (submit) { case SubmitTypeEnums.Save: return(RedirectToAction("Index")); default: return(RedirectToAction("Edit", new { id = serviceId })); } } SetErrorMessage(response.Message); } model.StatusList = _serviceServices.GetStatus(); return(View(model)); }