예제 #1
0
        public async Task <IActionResult> Create(ScadenzaCreateInputModel inputModel)
        {
            inputModel.Beneficiario = service.GetBeneficiarioById(inputModel.IDBeneficiario);
            if (ModelState.IsValid)
            {
                await service.CreateScadenzaAsync(inputModel);

                TempData["Message"] = "Inserimento effettuato correttamente".ToUpper();
                return(RedirectToAction("Index"));
            }
            else
            {
                ViewData["Title"]      = "Nuova Scadenza".ToUpper();
                inputModel.Beneficiari = service.GetBeneficiari;
                return(View(inputModel));
            }
        }
예제 #2
0
 public Task <ScadenzaViewModel> CreateScadenzaAsync(ScadenzaCreateInputModel inputModel)
 {
     return(scadenzaService.CreateScadenzaAsync(inputModel));
 }