public ActionResult DeleteCountry(int id) { CountryOperator country = new CountryOperator(); country.Edit(id); return(View(country)); }
public ActionResult AddCountry() { CountryOperator country = new CountryOperator(); country.Add(); return(View(country)); }
public ActionResult CountryList(string search = null) { CountryOperator country = new CountryOperator(); List <CountryListView> list = country.Search(search); return(View(list)); }
public ActionResult EditCountry(int id, CountryOperator country) { if (!ModelState.IsValid) { ViewBag.ErrorMessage = "Form data is not proper."; return(View(country)); } country.Update(); return(RedirectToAction("CountryList")); }
public ActionResult AddCountry(CountryOperator model) { ViewBag.ErrorMessage = String.Empty; if (!ModelState.IsValid) { ViewBag.ErrorMessage = "Form data is not proper."; return(View(model)); } model.Update(); return(RedirectToAction("CountryList")); }
public ActionResult DeleteCountry(int id, CountryOperator country) { country.Delete(id); return(RedirectToAction("CountryList")); }