Beispiel #1
0
        private void GetMemBillList(int MemID)
        {
            Chain.BLL.Mem        bllMem     = new Chain.BLL.Mem();
            Chain.Model.Mem      modelMem   = bllMem.GetModel(MemID);
            Chain.BLL.MemAddress bllAddress = new Chain.BLL.MemAddress();
            DataTable            dt;

            if (base.Request.QueryString["AddressID"] == null)
            {
                dt = bllAddress.GetList(" MemID=" + MemID + " and IsDefault=1 ").Tables[0];
            }
            else
            {
                dt = bllAddress.GetList(string.Concat(new object[]
                {
                    " MemID=",
                    MemID,
                    " and ID=",
                    base.Request.QueryString["AddressID"]
                })).Tables[0];
            }
            if (dt.Rows.Count == 0)
            {
                this.addNewAddress.Visible = true;
            }
            else
            {
                this.txtAddressID.Value    = dt.Rows[0]["ID"].ToString();
                this.addNewAddress.Visible = false;
                this.memname.InnerHtml     = dt.Rows[0]["MemName"].ToString();
                this.mobile.InnerHtml      = dt.Rows[0]["MemMobile"].ToString();
                this.address.InnerHtml     = this.GetMemAddress(dt.Rows[0]["MemProvince"], dt.Rows[0]["MemCity"], dt.Rows[0]["MemCounty"], dt.Rows[0]["MemVillage"], dt.Rows[0]["MemDetailAddress"]);
            }
        }
Beispiel #2
0
 private void BindMemInfo(int MemID)
 {
     Chain.BLL.Mem        bllMem     = new Chain.BLL.Mem();
     Chain.BLL.MemAddress bllAddress = new Chain.BLL.MemAddress();
     if (base.Request.QueryString["AddressID"] != null)
     {
         int       AddressID = int.Parse(base.Request.QueryString["AddressID"]);
         DataTable dt        = bllAddress.GetList(string.Concat(new object[]
         {
             " MemID=",
             MemID,
             " and ID=",
             AddressID
         })).Tables[0];
         if (dt.Rows.Count > 0)
         {
             this.txtAddressID.Value = AddressID.ToString();
             Chain.Model.MemAddress modelAddress = bllAddress.GetModel(AddressID);
             this.memname.Value       = modelAddress.MemName;
             this.mobile.Value        = modelAddress.MemMobile;
             this.detailAddress.Value = modelAddress.MemDetailAddress;
             string memaddress = this.GetMemAddress(modelAddress.MemProvince, modelAddress.MemCity, modelAddress.MemCounty, modelAddress.MemVillage, modelAddress.MemDetailAddress);
             if (memaddress.Length > 14)
             {
                 this.address.InnerHtml = memaddress.Substring(0, 14) + "...";
             }
             else
             {
                 this.address.InnerHtml = memaddress;
             }
             int IsDefault = int.Parse(dt.Rows[0]["IsDefault"].ToString());
             this.yes.Attributes.Remove("class");
             this.no.Attributes.Remove("class");
             if (IsDefault == 1)
             {
                 this.yes.Attributes.Add("class", "line_btn active");
                 this.no.Attributes.Add("class", "line_btn");
             }
             else
             {
                 this.no.Attributes.Add("class", "line_btn active");
                 this.yes.Attributes.Add("class", "line_btn");
             }
             PubFunction.BindSysAreaMobile(this.sltProvince, 0);
             if (modelAddress.MemProvince != "")
             {
                 this.sltProvince.Value = modelAddress.MemProvince;
                 if (this.sltProvince.Value != "" && this.sltProvince.Value != "请选择")
                 {
                     PubFunction.BindSysAreaMobile(this.sltCity, int.Parse(this.sltProvince.Value));
                 }
                 if (modelAddress.MemCity != "")
                 {
                     this.sltCity.Value = modelAddress.MemCity;
                 }
                 if (this.sltCity.Value != "" && this.sltCity.Value != "请选择")
                 {
                     PubFunction.BindSysAreaMobile(this.sltCounty, int.Parse(this.sltCity.Value));
                 }
                 if (modelAddress.MemCounty != "")
                 {
                     this.sltCounty.Value = modelAddress.MemCounty;
                 }
                 if (this.sltCounty.Value != "" && this.sltCounty.Value != "请选择")
                 {
                     PubFunction.BindSysAreaMobile(this.sltVillage, int.Parse(this.sltCounty.Value));
                 }
                 if (modelAddress.MemVillage != "")
                 {
                     this.sltVillage.Value = modelAddress.MemVillage;
                 }
             }
         }
     }
 }