Exemplo n.º 1
0
        public ActionResult EditCrimeRate(EditCrimeRateInfo editModel)
        {
            var service = new CountryInfoService();

            service.EditCrimeRate(editModel.Id, editModel.Value);
            Session["CreateTxt"] = "Successfully edited value.";
            return(RedirectToAction("CrimeRate"));
        }
Exemplo n.º 2
0
        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));
        }