示例#1
0
        protected void btnAccept_Click(object sender, System.EventArgs e)
        {
            int productId = 0;

            int.TryParse(this.hidProductId.Value, out productId);
            string approvedPriceDescription = this.hidRefusalReason.Value;

            if (string.IsNullOrWhiteSpace(approvedPriceDescription))
            {
                approvedPriceDescription = "审核通过";
            }

            if (ProductHelper.IsPriceApproved(productId))
            {
                this.ShowMsg("商品已经审核通过", true);
                return;
            }

            if (ProductHelper.AcceptPriceApprove(productId, approvedPriceDescription))
            {
                EventLogs.WriteOperationLog(Privilege.HSApprovedPrice, string.Format(CultureInfo.InvariantCulture, "商品{0}审价成功,商品id为{1}", new object[]
                {
                    this.hidProductName.Value,
                    productId
                }));
                this.BindProducts();
                this.ShowMsg("商品的成功通过价格审核申请", true);
            }
            else
            {
                this.ShowMsg("审核通过失败", true);
            }
        }