Exemplo n.º 1
0
 public ActionResult CreateBuilding(ViewAddress viewaddress, long streetId, long cityId, long stateId,
                                    long countryId, String returnTo)
 {
     try
     {
         if (ModelState.IsValid)
         {
             _addressRepository.AddBuilding(viewaddress, GetUserId());
             return(RedirectToAction("SelectBuilding", new { id = streetId, cityID = cityId, stateID = stateId, countryID = countryId, returnTo }));
         }
         return(View(viewaddress));
     }
     catch (Exception e)
     {
         ExceptionMessageToViewBag(e);
         return(View("Error"));
     }
 }