public ActionResult Create(CreateDerLayoutViewModel viewModel) { var request = new CreateOrUpdateDerLayoutRequest(); request.Id = viewModel.Id; request.IsActive = viewModel.IsActive; request.Title = viewModel.Title; var response = _derService.CreateOrUpdateDerLayout(request); if (response.IsSuccess) { return RedirectToAction("Index"); } return View(viewModel); }
public ActionResult Edit(int id) { var viewModel = new CreateDerLayoutViewModel(); var response = _derService.GetDerLayout(id); viewModel.Id = response.Id; viewModel.Title = response.Title; viewModel.IsActive = response.IsActive; return View(viewModel); }
public ActionResult Create() { var viewModel = new CreateDerLayoutViewModel(); return View(viewModel); }