예제 #1
0
        public IHttpActionResult UpdatePost(StoreViewModel model)
        {
            var response = new SimpleResponse();

            response = iStoreBusiness.Update(model);
            return(Json(response));
        }
예제 #2
0
        public IActionResult UpdatePost(StoreViewModel model)
        {
            var response = iStoreBusiness.Update(model);

            if (response.ResponseCode > 0)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                ModelState.AddModelError(string.Empty, response.ResponseMessage);
                return(View("Edit", model));
            }
        }
예제 #3
0
        public IActionResult Put([FromBody] Store store)
        {
            if (store == null)
            {
                return(BadRequest());
            }
            var updatedStore = _storeBusiness.Update(store);

            if (updatedStore == null)
            {
                return(NoContent());
            }
            return(new ObjectResult(updatedStore));
        }
예제 #4
0
        public SimpleResponse Update(StoreDto dto)
        {
            var response = new SimpleResponse();

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

            return(response);
        }
예제 #5
0
        public SimpleResponse Update(StoreViewModel model)
        {
            var response = iStoreBusiness.Update(model);

            return(response);
        }