public ActionResult EditCrimeRate(EditCrimeRateInfo editModel) { var service = new CountryInfoService(); service.EditCrimeRate(editModel.Id, editModel.Value); Session["CreateTxt"] = "Successfully edited value."; return(RedirectToAction("CrimeRate")); }
public ActionResult Edit(int id) { var userService = new UserService(); var service = new CountryInfoService(); var result = service.GetCrimeRateInfo(id); var model = new EditCrimeRateInfo() { Value = result.Value, Id = id }; return(View("Edit", model)); }