Exemple #1
0
        public ActionResult ChangeAmount(CommodityChangeAmount model)
        {
            try
            {
                _commodityService.ChangedAmount(model);

                return(Ok(Response.WriteAsync(JsonConvert.SerializeObject(true,
                                                                          new JsonSerializerSettings {
                    Formatting = Formatting.Indented
                }))));
            }
            catch (Exception ex)
            {
                return(BadRequest(Response.WriteAsync(JsonConvert.SerializeObject(ex,
                                                                                  new JsonSerializerSettings
                {
                    Formatting = Formatting.Indented
                }))));
            }
        }