Beispiel #1
0
        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);
        }
Beispiel #2
0
 public ActionResult Create()
 {
     var viewModel = new CreatePeriodeViewModel();
     viewModel.IsActive = true;
     return View(viewModel);
 }