Example #1
0
		public virtual ActionResult Create(CountryEditModel model)
		{
			if (!ModelState.IsValid)
			{
				return View(model);
			}

			var id = _countries.Add(model);

			return RedirectToAction(MVC.Country.Edit(id));
		}
Example #2
0
		public virtual ActionResult Edit(long id, CountryEditModel model)
		{
			if (!ModelState.IsValid)
			{
				return View(model);
			}

			_countries.Edit(id, model);

			return RedirectToAction(MVC.Country.Edit(id));
		}
Example #3
0
		public void Edit(long id, CountryEditModel model)
		{
			_countries.Update(id, model.EnglishName, model.RussianName, model.Position);
		}
Example #4
0
		public long Add(CountryEditModel model)
		{
			return _countries.Add(model.EnglishName, model.RussianName, model.Position);
		}