コード例 #1
0
 public ActionResult AddState(StateViewModel model)
 {
     try
     {
         if (ModelState.IsValid)
         {
             _stateWebTask.AddState(model);
             return(RedirectToAction("Index"));
         }
         else
         {
             model.lstCountry = GetCountryList();
             return(View(model));
         }
     }
     catch (Exception ex)
     {
         model.lstCountry = GetCountryList();
         return(View(model));
     }
 }