Example #1
0
        public ActionResult AddUpdateCity()
        {
            CountryController countryController = new CountryController();

            ViewBag.States = countryController.States();
            return(View(new CityViewModel()));
        }
Example #2
0
        public ActionResult EditCity(int Id, String Name, int StateId = 0)
        {
            CityViewModel cityViewModel = new CityViewModel
            {
                Id       = Id,
                CityName = Name,
                StateId  = StateId,
            };
            CountryController countryController = new CountryController();

            ViewBag.States = countryController.States();

            return(View("AddUpdateCity", cityViewModel));
        }