コード例 #1
0
 public ActionResult Create(AreaOfInterestViewModel areaOfInterestViewModel)
 {
     if (ModelState.IsValid)
     {
         areaOfInterestViewModel.AreaOfInterest.OrganisationId = UserOrganisationId;
         var result = NidanBusinessService.CreateAreaOfInterest(UserOrganisationId, areaOfInterestViewModel.AreaOfInterest);
         if (result.Succeeded)
         {
             return(RedirectToAction("Index"));
         }
         foreach (var error in result.Errors)
         {
             ModelState.AddModelError("", error);
         }
         return(RedirectToAction("Index"));
     }
     return(View(areaOfInterestViewModel));
 }