Hidistro.UI.Web/Admin/zbGoods/EditStocks.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace Hidistro.UI.Web.Admin.zbGoods
{
    using ASPNET.WebControls;
    using Hidistro.ControlPanel.zbCommodities;
    using Hidistro.ControlPanel.Store;
    using Hidistro.Core;
    using Hidistro.Entities.Store;
    using Hidistro.UI.ControlPanel.Utility;
    using System;
    using System.Collections.Generic;
    using System.Web.UI.WebControls;

    [PrivilegeCheck(Privilege.EditProducts)]
    public class EditStocks : AdminPage
    {
        protected Button btnOperationOK;
        protected Button btnSaveStock;
        protected Button btnTargetOK;
        protected Grid grdSelectedProducts;
        private string productIds;
        protected TextBox txtAddStock;
        protected TextBox txtTagetStock;

        protected EditStocks() : base("m01", "00000")
        {
            this.productIds = string.Empty;
        }

        private void BindProduct()
        {
            string str = this.Page.Request.QueryString["ProductIds"];
            if (!string.IsNullOrEmpty(str))
            {
                this.grdSelectedProducts.DataSource = ProductHelper.GetSkuStocks(str);
                this.grdSelectedProducts.DataBind();
            }
        }

        private void btnOperationOK_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(this.productIds))
            {
                this.ShowMsgToTarget("没有要修改的商品", false, "parent");
            }
            else
            {
                int result = 0;
                if (!int.TryParse(this.txtAddStock.Text, out result))
                {
                    this.ShowMsgToTarget("请输入正确的库存格式", false, "parent");
                }
                else if (ProductHelper.AddSkuStock(this.productIds, result))
                {
                    this.BindProduct();
                    this.ShowMsgToTarget("修改商品的库存成功", true, "parent");
                }
                else
                {
                    this.ShowMsgToTarget("修改商品的库存失败", false, "parent");
                }
后面还有 82 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。