public ActionResult Create(CreatePeriodeViewModel viewModel) { var request = viewModel.MapTo<CreatePeriodeRequest>(); var response = _periodeService.Create(request); TempData["IsSuccess"] = response.IsSuccess; TempData["Message"] = response.Message; if (response.IsSuccess) { return RedirectToAction("Index"); } return View("Create", viewModel); }
public ActionResult Create() { var viewModel = new CreatePeriodeViewModel(); viewModel.IsActive = true; return View(viewModel); }