Пример #1
0
        public ActionResult Country()
        {

            CountryService country = new CountryService();

            return View(country.getAllCountry());
        }
Пример #2
0
        public ActionResult CreateNewCountry(String name)
        {
            CountryService countryService = new CountryService();
            countryService.createNew(name);

            return RedirectToAction("Index");
        }
Пример #3
0
        public ActionResult Country(int value)
        {
            ViewBag.DefaultCountryValue = value;
            CountryService country = new CountryService();

            return View(country.getAllCountry());
        }
Пример #4
0
 public ActionResult DeleteCountry(String countryID)
 {
     CountryService countryService = new CountryService();
     countryService.deleteCountry(Int32.Parse(countryID));
     return RedirectToAction("Index");
 }
Пример #5
0
 public ActionResult EditCountry(String countryID, String newName)
 {
     CountryService countryService = new CountryService();
     countryService.editCountry(Int32.Parse(countryID), newName);
     return RedirectToAction("Index");
 }