⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 coupon.aspx.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
📖 第 1 页 / 共 2 页
字号:
                    this.PlhSelectProduct.Visible = true;
                    this.PlhList.Visible = true;
                    break;
                }
                case CouponCreateType.OrderTotalMoney:
                    this.TxtOrderMoney.Text = couponInfoById.CouponCreateContent;
                    this.TxtOrderMoney.Visible = true;
                    this.PlhSelectProduct.Visible = true;
                    this.LblSelectProductTitle.Text = "订单金额:";
                    break;

                default:
                    this.PlhSelectProduct.Visible = false;
                    break;
            }
            string[] strArray3 = couponInfoById.UserGroup.Split(new char[] { ',' });
        Label_043D:
            foreach (ListItem item in this.ChklUserGroup.Items)
            {
                foreach (string str3 in strArray3)
                {
                    if (item.Value == str3)
                    {
                        item.Selected = true;
                        goto Label_043D;
                    }
                }
            }
            switch (couponInfoById.ProductLimitType)
            {
                case ProductLimitType.AllProduct:
                    return;

                case ProductLimitType.NominateModel:
                {
                    this.PlhProductLimit.Visible = true;
                    this.LblProductLimitTitle.Text = "指定模型:";
                    this.BtnLimit.Attributes.Add("onclick", "SelectModel2();return false");
                    Dictionary<string, string> dictionary3 = new Dictionary<string, string>();
                    foreach (string str4 in couponInfoById.ProductLimitContent.Split(new char[] { ',' }))
                    {
                        ModelInfo info4 = ModelManager.GetModelInfoById(DataConverter.CLng(str4));
                        if (!info4.IsNull)
                        {
                            dictionary3.Add(info4.ModelId.ToString(), info4.ModelName);
                        }
                    }
                    this.HdnLimit.Value = couponInfoById.ProductLimitContent;
                    this.LstLimit.DataSource = dictionary3;
                    this.LstLimit.DataBind();
                    return;
                }
                case ProductLimitType.NominateProduct:
                {
                    this.PlhProductLimit.Visible = true;
                    this.LblProductLimitTitle.Text = "指定商品:";
                    this.BtnLimit.Attributes.Add("onclick", "SelectProductToList2();return false");
                    Dictionary<string, string> dictionary4 = new Dictionary<string, string>();
                    foreach (string str5 in couponInfoById.ProductLimitContent.Split(new char[] { ',' }))
                    {
                        ProductInfo info5 = Product.GetProductById(DataConverter.CLng(str5));
                        if (!info5.IsNull)
                        {
                            dictionary4.Add(info5.ProductId.ToString(), DataSecurity.HtmlDecode(info5.ProductName));
                        }
                    }
                    this.HdnLimit.Value = couponInfoById.ProductLimitContent;
                    this.LstLimit.DataSource = dictionary4;
                    this.LstLimit.DataBind();
                    return;
                }
                default:
                    return;
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            this.m_Action = BasePage.RequestString("Action");
            this.m_CouponId = BasePage.RequestInt32("CouponID");
            if (!this.Page.IsPostBack)
            {
                this.ChklUserGroup.DataSource = UserGroups.GetUserGroupList(0, 0);
                this.ChklUserGroup.DataTextField = "GroupName";
                this.ChklUserGroup.DataValueField = "GroupId";
                this.ChklUserGroup.DataBind();
                if (this.m_Action == "Modify")
                {
                    this.IniModify();
                }
                else
                {
                    this.DpkBeginDate.Text = DateTime.Today.ToString("yyyy-MM-dd");
                    this.DpkEndDate.Text = DateTime.Now.AddMonths(1).ToString("yyyy-MM-dd");
                    this.DpkUseEndDate.Text = DateTime.Now.AddYears(1).ToString("yyyy-MM-dd");
                }
            }
        }

        protected void RadlCouponCreateType_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.LstSelectedProduct.DataSource = "";
            this.LstSelectedProduct.DataBind();
            this.HdnAllValue.Value = "";
            this.HdnSelecedtProduct.Value = "";
            switch (DataConverter.CLng(this.RadlCouponCreateType.SelectedValue))
            {
                case 0:
                    this.PlhSelectProduct.Visible = false;
                    this.TxtOrderMoney.Visible = false;
                    break;

                case 1:
                    this.PlhSelectProduct.Visible = true;
                    this.PlhList.Visible = true;
                    this.TxtOrderMoney.Visible = false;
                    this.LblSelectProductTitle.Text = "指定模型:";
                    this.BtnSelectProduct.Attributes.Add("onclick", "SelectModel();return false");
                    break;

                case 2:
                    this.PlhSelectProduct.Visible = true;
                    this.PlhList.Visible = true;
                    this.TxtOrderMoney.Visible = false;
                    this.LblSelectProductTitle.Text = "指定商品:";
                    this.BtnSelectProduct.Attributes.Add("onclick", "SelectProductToList();return false");
                    break;

                case 3:
                    this.PlhSelectProduct.Visible = true;
                    this.PlhList.Visible = false;
                    this.TxtOrderMoney.Visible = true;
                    this.LblSelectProductTitle.Text = "订单金额:";
                    break;
            }
            int num = DataConverter.CLng(this.RadlProductLimit.SelectedValue);
            if (((num == 1) || (num == 2)) && !string.IsNullOrEmpty(this.HdnLimitAllValue.Value))
            {
                Dictionary<string, string> dictionary = new Dictionary<string, string>();
                foreach (string str in this.HdnLimitAllValue.Value.Split(new char[] { ',' }))
                {
                    string[] strArray2 = str.Split(new string[] { "$$$" }, StringSplitOptions.None);
                    dictionary.Add(strArray2[1], strArray2[0]);
                }
                this.LstLimit.DataSource = dictionary;
                this.LstLimit.DataBind();
            }
        }

        protected void RadlProductLimit_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.LstLimit.DataSource = "";
            this.LstLimit.DataBind();
            this.HdnLimit.Value = "";
            this.HdnLimitAllValue.Value = "";
            switch (DataConverter.CLng(this.RadlProductLimit.SelectedValue))
            {
                case 0:
                    this.PlhProductLimit.Visible = false;
                    break;

                case 1:
                    this.PlhProductLimit.Visible = true;
                    this.LblProductLimitTitle.Text = "指定模型:";
                    this.BtnLimit.Attributes.Add("onclick", "SelectModel2();return false");
                    break;

                case 2:
                    this.PlhProductLimit.Visible = true;
                    this.LblProductLimitTitle.Text = "指定商品:";
                    this.BtnLimit.Attributes.Add("onclick", "SelectProductToList2();return false");
                    break;
            }
            int num = DataConverter.CLng(this.RadlCouponCreateType.SelectedValue);
            if (((num == 1) || (num == 2)) && !string.IsNullOrEmpty(this.HdnAllValue.Value))
            {
                Dictionary<string, string> dictionary = new Dictionary<string, string>();
                foreach (string str in this.HdnAllValue.Value.Split(new char[] { ',' }))
                {
                    string[] strArray2 = str.Split(new string[] { "$$$" }, StringSplitOptions.None);
                    if (strArray2.Length == 2)
                    {
                        dictionary.Add(strArray2[1], strArray2[0]);
                    }
                }
                this.LstSelectedProduct.DataSource = dictionary;
                this.LstSelectedProduct.DataBind();
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -