Пример #1
0
        public JsonResult EditLimitItem(string Title, string ProductName, long ProductId, decimal Price, string CategoryName,
                                        DateTime StartTime, DateTime EndTime, int Stock, int MaxSaleCount, long Id)
        {
            Result result = new Result();

            try
            {
                var info = _iLimitTimeBuyService.GetLimitTimeMarketItem(Id);
                info.Title        = Title;
                info.ProductId    = ProductId;
                info.ProductName  = ProductName;
                info.CategoryName = CategoryName;
                info.StartTime    = StartTime;
                info.EndTime      = EndTime;
                info.Price        = Price;
                info.Stock        = Stock;
                info.MaxSaleCount = MaxSaleCount;
                _iLimitTimeBuyService.UpdateLimitTimeItem(info);
                result.success = true;
                result.msg     = "修改限时购成功";
            }
            catch (HimallException ex)
            {
                result.msg = ex.Message;
            }
            catch (Exception ex)
            {
                Log.Error("修改限时购出错", ex);
                result.msg = "修改限时购出错!";
            }
            return(Json(result));
        }