public IHttpActionResult UpdatePost(InventoryViewModel model)
        {
            var response = new SimpleResponse();

            response = iInventoryBusiness.Update(model);
            return(Json(response));
        }
        public IActionResult UpdatePost(InventoryViewModel model)
        {
            var response = iInventoryBusiness.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(InventoryDto dto)
        {
            var response = new SimpleResponse();

            try
            {
                var model = SimpleMapper.Map <InventoryDto, InventoryViewModel>(dto);
                response = iInventoryBusiness.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(InventoryViewModel model)
        {
            var response = iInventoryBusiness.Update(model);

            return(response);
        }