Ejemplo n.º 1
0
 public ActionResult CountryForm(FormCollection fc)
 {
     if (fc["btnInsert"] == "Insert")
     {
         Country country = new Country()
         {
             Country1 = fc["txtCountry"]
         };
         Bc.AddCountry(country);
     }
     else if (fc["btnUpdate"] == "Update")
     {
         Country country = new Country()
         {
             CountryID = int.Parse(fc["txtCountryID"]),
             Country1  = fc["txtCountry"]
         };
         Bc.UpdateCountry(country);
     }
     return(RedirectToAction("CountryForm"));
 }