Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.ltCustom.Text = "<input type='text' id='text' name='text' class='border_radius'/>";
     PubFunction.BindMemLevelSelect(this.sltMemLevelID, true);
     PubFunction.BindShopSelect(this._UserShopID, this.sltShop, true);
     PubFunction.BindCustomField(this._UserShopID, this.sltCustomField, true, 1);
     PubFunction.BindUserSelect(this._UserShopID, this.sltMemUserID, true, false);
     if (PubFunction.curParameter.dataAuthority == 1 && this._UserShopID > 1)
     {
         this.sltShop.Value = this._UserShopID.ToString();
     }
     if (!base.IsPostBack)
     {
         this.Query();
     }
 }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.Session["QuerySql"] = null;
         this.ltCustom.Text       = "<input type='text' id='text' name='text' class='border_radius'/>";
         PubFunction.BindMemLevelSelect(this.sltMemLevelID, true);
         PubFunction.BindShopSelect(this._UserShopID, this.sltShop, true);
         PubFunction.BindCustomField(this._UserShopID, this.sltCustomField, true, 1);
         PubFunction.BindUserSelect(this._UserShopID, this.sltMemUserID, true, false);
         if (PubFunction.curParameter.dataAuthority == 1)
         {
             if (this._UserShopID > 1)
             {
                 this.sltShop.Value = this._UserShopID.ToString();
             }
         }
         this.GetMemList(this.QueryCondition());
         this.SetQuickBtn();
         this.chkSms.Checked = this.curParameter.bolSms;
         PubFunction.BindCouponSelect(this.sltCoupon, false);
         this.btnAllMemPointReset.Visible = false;
     }
 }
Example #3
0
        public void BindCustomSelect(HtmlSelect select, string strMemCustom, string strCustomField, int intShopID)
        {
            StringBuilder sbHtml = new StringBuilder();

            if (select.Value != "")
            {
                select.Items.Clear();
                PubFunction.BindCustomField(intShopID, select, true, 1);
                select.Value = strMemCustom;
            }
            if (strCustomField != "")
            {
                string strCustomType = select.Items.FindByValue(select.Value).Attributes["CustomFieldType"].ToString();
                string strCustomInfo = select.Items.FindByValue(select.Value).Attributes["CustomFieldInfo"].ToString();
                string text          = strCustomType;
                if (text != null)
                {
                    if (!(text == "text"))
                    {
                        if (!(text == "select"))
                        {
                            if (text == "date")
                            {
                                sbHtml.Append("<input type='text' id='txtCustomField' class='Wdate border_radius' name='txtCustomField' value='" + strCustomField + "'  onfocus=\"WdatePicker({ skin: 'ext', isShowClear: false, readOnly: true });\"/>");
                            }
                        }
                        else
                        {
                            string[] strInfo = strCustomInfo.Split("|".ToCharArray());
                            sbHtml.Append("<select id='txtCustomField' name ='txtCustomField' class='selectWidth' >");
                            sbHtml.Append("<option value='无'>===== 请选择 =====</option>");
                            for (int i = 0; i < strInfo.Length; i++)
                            {
                                if (strInfo[i] == strCustomField)
                                {
                                    sbHtml.Append(string.Concat(new string[]
                                    {
                                        "<option value='",
                                        strInfo[i],
                                        "' selected>",
                                        strInfo[i],
                                        "</option>"
                                    }));
                                }
                                else
                                {
                                    sbHtml.Append(string.Concat(new string[]
                                    {
                                        "<option value='",
                                        strInfo[i],
                                        "'>",
                                        strInfo[i],
                                        "</option>"
                                    }));
                                }
                            }
                            sbHtml.Append("</select>");
                        }
                    }
                    else
                    {
                        sbHtml.Append("<input type='text' id='txtCustomField' name ='txtCustomField' value='" + strCustomField + "' class='input_txt border_radius'/>");
                    }
                }
                this.ltCustom.Text = sbHtml.ToString();
            }
        }