Exemplo n.º 1
0
 public ActionResult CreateState(ViewAddress viewaddress, long countryId, String returnTo)
 {
     try
     {
         if (ModelState.IsValid)
         {
             _addressRepository.AddState(viewaddress, GetUserId());
             return(RedirectToAction("SelectState", new { id = countryId, returnTo }));
         }
         return(View(viewaddress));
     }
     catch (Exception e)
     {
         ExceptionMessageToViewBag(e);
         return(View("Error"));
     }
 }