public ActionResult EditService(EditServiceViewModel model) { if (ModelState.IsValid) { dataManager.PricesRepository.CreatePrice(model.IDser, model.ServiceName, model.ServiceCost, model.Type); return RedirectToAction("SelectTypeUslug", "Services", new { s = model.Type}); } return View(model); }
public ActionResult EditService(int id) { Услуги usl = dataManager.PricesRepository.GetPricesById(id); EditServiceViewModel model = new EditServiceViewModel() { IDser = usl.Код_услуги, ServiceName = usl.Наименование, ServiceCost = (int)usl.Цена, Type = usl.Тип }; return View(model); }