Exemple #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.txtCode.Value = DateTime.Now.ToString("yyMMddHHmmss");
         PubFunction.BindGoodsClass(this.sltGoodsClass, this._UserShopID);
         this.sltGoodsClass.Value = "1";
         if (!string.IsNullOrEmpty(this.curParameter.strUnitList))
         {
             string[] strdwlist = this.curParameter.strUnitList.Split(new char[]
             {
                 '|'
             });
             string[] array = strdwlist;
             for (int i = 0; i < array.Length; i++)
             {
                 string strdw = array[i];
                 this.sltjldw.Items.Add(new ListItem(strdw, strdw));
             }
         }
         else
         {
             this.sltjldw.Items.Add(new ListItem("个", "个"));
         }
         if (base.Request.QueryString["GoodsID"] != null)
         {
             this.GetGoodsInfo(int.Parse(base.Request.QueryString["GoodsID"]));
             this.GetGoodsNumber(int.Parse(base.Request.QueryString["GoodsID"]), int.Parse(base.Request.QueryString["ShopID"]));
             this.ltlTitle.Text = "主页   >   商品管理   >   编辑商品 ";
         }
         else
         {
             PubFunction.BindAddCustomFields(this.tbCustomField, "goods");
         }
         if (base.Request.QueryString["GoodsID"] != null)
         {
             Chain.Model.Goods goods = new Chain.BLL.Goods().GetModel(int.Parse(base.Request.QueryString["GoodsID"]));
             PubFunction.BindShopSelect(this._UserShopID, this.sltShopList, goods.CreateShopID, true);
             this.txtShopID.Value = goods.CreateShopID.ToString();
         }
         else
         {
             PubFunction.BindShopSelect(this._UserShopID, this.sltShopList, this._UserShopID, true);
             this.txtShopID.Value = this._UserShopID.ToString();
             this.hdShopID.Value  = this._UserShopID.ToString();
         }
         this.bindSyncShopList();
         if (PubFunction.curParameter.bolStaff)
         {
             this.trCommission.Attributes.Add("style", "");
         }
         else
         {
             this.trCommission.Attributes.Add("style", "display:none");
         }
     }
 }
Exemple #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         PubFunction.BindShopSelect(this._UserShopID, this.sltShop, false);
         PubFunction.BindMemLevelSelect(this.sltMemLevelID, false);
         PubFunction.BindUserSelect(this._UserShopID, this.sltMemUserID, false, false);
         PubFunction.BindStaff(this._UserShopID, this.sltStaff, true);
         this.chkSMS.Checked   = (this.curParameter.bolMoneySms && PubFunction.curParameter.bolAutoSendSMSByMemRegister);
         this.chkIsSMS.Checked = this.curParameter.bolSms;
         this.sltShop.Value    = this._UserShopID.ToString();
         this.sltShop.Attributes.Add("disabled", "disabled");
         this.chkMMS.Checked = (this.curParameter.bolMMS && PubFunction.curParameter.bolAutoSendMMSByMemRegister);
         if (PubFunction.curParameter.RegNullPwd)
         {
             this.sppwd1.Attributes.Add("style", "display:none;");
             this.sppwd2.Attributes.Add("style", "display:none;");
         }
         this.RegNullPwd.Checked        = PubFunction.curParameter.RegNullPwd;
         this.txtMemPassword.Value      = "";
         this.txtMemPasswordCheck.Value = "";
         this.chkIsIsPast.Checked       = PubFunction.curParameter.bolPastTime;
         this.chkRegisterStaff.Checked  = PubFunction.curParameter.bolIsMemRegisterStaff;
         if (!PubFunction.curParameter.bolIsMemRegisterStaff)
         {
             this.tdStaff.Visible  = false;
             this.tddStaff.Visible = false;
         }
         if (!PubFunction.curParameter.bolMoneyAndPoint)
         {
             this.txtMemPoint.Attributes.Add("readonly", "true");
             this.txtMemPoint.Style.Add("background-color", "#eee");
             this.txtMemMoney.Attributes.Add("readonly", "true");
             this.txtMemMoney.Style.Add("background-color", "#eee");
         }
         if (base.Request.QueryString["MemID"] != null)
         {
             this.GetMemToEdit(int.Parse(base.Request.QueryString["MemID"]));
             this.trMemPassword.Visible = false;
             this.ucSysArea.NeedBind    = false;
             this.btnQRCode.Attributes.Add("style", "display:none");
             this.btnSendSenseICCard.Style.Add("display", "none");
             this.btnContactICCard.Style.Add("display", "none");
         }
         else
         {
             PubFunction.BindAddCustomFields(this.tbCustomField, "Mem");
             this.txtMemPoint.Value      = "0";
             this.txtMemMoney.Value      = "0";
             this.txtMemCreateTime.Value = DateTime.Now.ToString("yyyy-MM-dd");
             this.sltMemUserID.Value     = this._UserID.ToString();
             this.btnQRCode.Style.Add("display", (this.curParameter.bolMMS && this.curParameter.bolAutoSendMMSByMemRegister) ? "\"\"" : "none");
             if (!this.curParameter.bolSenseiccard)
             {
                 this.btnSendSenseICCard.Style.Add("display", "none");
             }
             if (!this.curParameter.bolContacticcard)
             {
                 this.btnContactICCard.Style.Add("display", "none");
             }
         }
         this.isSendRWM.Style.Add("display", (this.curParameter.bolMMS && this.curParameter.bolAutoSendMMSByMemRegister) ? "\"\"" : "none");
     }
 }