예제 #1
0
        public ActionResult EditCostOfLiving(EditCostOfLivingInfoView editModel)
        {
            var service = new CountryInfoService();

            service.EditCostOfLiving(editModel.Id, editModel.Value);
            Session["CreateTxt"] = "Successfully edited value.";
            return(RedirectToAction("CostOfLiving"));
        }
예제 #2
0
        public ActionResult EditCostOfLiving(int id)
        {
            var userService = new UserService();
            var service     = new CountryInfoService();

            var result = service.GetCostOfLivingInfo(id);
            var model  = new EditCostOfLivingInfoView()
            {
                Value = result.Value,
                Id    = id
            };

            return(View("EditCostOfLiving", model));
        }