Example #1
0
        public IHttpActionResult UpdatePost(RentalViewModel model)
        {
            var response = new SimpleResponse();

            response = iRentalBusiness.Update(model);
            return(Json(response));
        }
Example #2
0
        public ActionResult UpdatePost(RentalViewModel model)
        {
            var response = iRentalBusiness.Update(model);

            if (response.ResponseCode > 0)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                ModelState.AddModelError(string.Empty, response.ResponseMessage);
                return(View("Edit", model));
            }
        }
Example #3
0
        public SimpleResponse Update(RentalDto dto)
        {
            var response = new SimpleResponse();

            try
            {
                var model = SimpleMapper.Map <RentalDto, RentalViewModel>(dto);
                response = iRentalBusiness.Update(model);
            }
            catch (Exception ex)
            {
                response.ResponseCode    = BusinessResponseValues.InternalError;
                response.ResponseMessage = "Güncelleme iþleminde hata oluþtu.";
                SimpleFileLogger.Instance.Error(ex);
            }

            return(response);
        }
        public SimpleResponse Update(RentalViewModel model)
        {
            var response = iRentalBusiness.Update(model);

            return(response);
        }