Example #1
0
 public ActionResult Remove(ColorEditViewModel model, int colorIdx)
 {
     ModelState.Clear();
     model.NavigationModel = HomeIndexViewModelLoader.Create(model.NavigationModel.Page.PageNavigation.Id, _service);
     model.Colors.RemoveAt(colorIdx);
     return View("Edit",  model);
 }
Example #2
0
 public ActionResult Add(ColorEditViewModel model)
 {
     ModelState.Clear();
     model.NavigationModel = HomeIndexViewModelLoader.Create(model.NavigationModel.Page.PageNavigation.Id, _service);
     model.Colors.Add(new EKContent.web.Models.Entities.Color {});
     return View("Edit", model);
 }
Example #3
0
 public ActionResult Edit(ColorEditViewModel model)
 {
     _service.Dal.ColorProvider.Set(model.Colors);
     TempData["message"] = "Color settings have been set";
     return RedirectToAction("Edit", new {id = model.NavigationModel.Page.PageNavigation.Id});
 }
Example #4
0
 public ActionResult Edit(int id)
 {
     var model = new ColorEditViewModel { Colors = _service.Dal.ColorProvider.Get() };
     model.NavigationModel = HomeIndexViewModelLoader.Create(id, _service);
     return View(model);
 }