Exemplo n.º 1
0
 public ActionResult Edit(Country country)
 {
     try
     {
         coService.UpdateCountry(country);
         return RedirectToAction("Index");
     }
     catch
     {
         return View();
     }
 }
Exemplo n.º 2
0
 public bool UpdateCountry(Country country)
 {
     try
     {
         country.State = ObjectState.Modified;
         countryRep.UpdateOperation(country);
         return true;
     }
     catch (Exception ex)
     {
         var msg = ex.Message;
         return false;
     }
 }
Exemplo n.º 3
0
 public bool CreateCountry(Country country)
 {
     try
     {
         country.State = ObjectState.Added;
         countryRep.AddOperation(country);
         return true;
     }
     catch (Exception ex)
     {
         var msg = ex.Message;
         return false;
     }
 }