protected string GetUserName(int uid)
 {
     ShowShop.BLL.Member.MemberInfo bll = new ShowShop.BLL.Member.MemberInfo();
     ShowShop.Model.Member.MemberInfo model =bll.GetModel(uid);
     if (model != null && model.TrueName!=null)
     {
         return model.TrueName;
     }
     else
     {
         return "未填写真实姓名";
     }
 }
 private void GetInfo(int uid)
 {
     ShowShop.BLL.Member.MemberInfo bll = new ShowShop.BLL.Member.MemberInfo();
     ShowShop.Model.Member.MemberInfo model = null;
     try
     {
         model = bll.GetModel(uid);
         if (model != null)
         {
             this.lblTrueName.Text = model.TrueName + "(籍贯:" + model.Origin + ")";
             this.lblTitle.Text = model.Title;
             this.lblBirthday.Text = (model.Birthday != null ? (((DateTime)model.Birthday).ToString("yyyy-MM-dd")) : ("未填写"));
             this.lblPapersType.Text = ChangeHope.DataBase.DataHelper.GetContent("yxs_code_papers", model.PapersType);
             this.lblPapersNumber.Text = model.PapersNumber;
             this.lblNation.Text = model.Nation;
             this.lblSex.Text = ChangeHope.DataBase.DataHelper.GetContent("yxs_code_sex", model.Sex.ToString());
             this.lblMarriage.Text = ChangeHope.DataBase.DataHelper.GetContent("yxs_code_marriage", model.Marriage.ToString());
             this.lblEducation.Text = ChangeHope.DataBase.DataHelper.GetContent("yxs_code_education", model.Education);
             this.lblGraduateSchool.Text = model.GraduateSchool;
             //获取省信息
             string province = "";
             ShowShop.BLL.SystemInfo.Provinces bllProvinces = new ShowShop.BLL.SystemInfo.Provinces();
             Model.SystemInfo.Provinces modelProvinces = bllProvinces.GetModel(ChangeHope.Common.StringHelper.StringToInt(model.Province));
             if (modelProvinces != null)
             {
                 province = modelProvinces.CityName;
             }
             modelProvinces = bllProvinces.GetModel(ChangeHope.Common.StringHelper.StringToInt(model.City));
             if (modelProvinces != null)
             {
                 province = province + "." + modelProvinces.CityName;
             }
             modelProvinces = bllProvinces.GetModel(ChangeHope.Common.StringHelper.StringToInt(model.Borough));
             if (modelProvinces != null)
             {
                 province = province + "." + modelProvinces.CityName;
             }
             this.lblProvince.Text = province;
             this.lblAddress.Text = model.Address;
             this.lblZip.Text = model.Zip;
             this.lblOfficePhone.Text = model.OfficePhone;
             this.lblHomePhone.Text = model.HomePhone;
             this.lblMobilePhone.Text = model.MobilePhone;
             this.lblHandPhone.Text = model.HandPhone;
             this.lblFax.Text = model.Fax;
             this.lblPersonWebSite.Text = model.PersonWebSite;
             this.lblQQ.Text = model.QQ;
             this.lblMSN.Text = model.MSN;
             this.lblICQ.Text = model.ICQ;
             this.lblUC.Text = model.UC;
             this.lblLifeHobbies.Text = model.LifeHobbies;
             this.lblCultureHobbies.Text = model.CultureHobbies;
             this.lblEntertainment.Text = model.Entertainment;
             this.lblSportsHobbies.Text = model.SportsHobbies;
             this.lblOtherHobbies.Text = model.OtherHobbies;
             this.lblIncName.Text = model.IncName;
             this.lblDepartment.Text = model.Department;
             this.lblPositions.Text = model.Positions;
             this.lblWorkRange.Text = model.WorkRange;
             this.lblIncAddress.Text = model.IncAddress;
             this.lblMonthlyInCome.Text = model.MonthlyInCome + " 元人民币";
         }
     }
     catch { }
     finally
     {
         model = null;
         bll = null;
     }
 }
 private void SaveInfo()
 {
     ShowShop.BLL.Member.MemberAccount abll = new ShowShop.BLL.Member.MemberAccount();
     ShowShop.BLL.Member.MemberInfo bll = new ShowShop.BLL.Member.MemberInfo();
     Model.Member.MemberInfo model = new ShowShop.Model.Member.MemberInfo();
     try
     {
         model.PrivacySettings = ckbPrivacySettings.Checked?1:0;
         model.TrueName = txtTrueName.Text;
         model.Title = txtTitle.Text;
         model.Photo = "";//txtPhoto.Text;
         model.Birthday = ChangeHope.Common.StringHelper.StringToDateTime(txtBirthday.Text);
         model.PapersType = ddlPapersType.SelectedValue;
         model.PapersNumber = txtPapersNumber.Text;
         model.Origin = txtOrigin.Text;
         model.Nation = txtNation.Text;
         model.Sex = ChangeHope.Common.StringHelper.StringToInt(ddlSex.SelectedValue);
         model.Marriage = ChangeHope.Common.StringHelper.StringToInt(ddlMarriage.SelectedValue);
         model.Education = ddlEducation.SelectedValue;
         model.GraduateSchool = txtGraduateSchool.Text;
         model.Province = ChangeHope.WebPage.PageRequest.GetFormString("ctl00$workspace$ddlProvince");
         model.City = ChangeHope.WebPage.PageRequest.GetFormString("ctl00$workspace$ddlCity");
         model.Borough = ChangeHope.WebPage.PageRequest.GetFormString("ctl00$workspace$ddlBorough");
         model.Address = txtAddress.Text;
         /*kevin 12.12 修改*/
         if (txtZip.Text != "")
         {
             if (!ChangeHope.Common.ValidateHelper.IsSend(txtZip.Text.Trim()))
             {
                 this.ltlMsg.Text = "请输入正确的邮政编码";
                 this.pnlMsg.Visible = true;
                 this.pnlMsg.CssClass = "actionErr";
                 return;
             }
         }
         if (txtOfficePhone.Text != "")
         {
             if (!ChangeHope.Common.ValidateHelper.IsPhone(txtOfficePhone.Text))
             {
                 this.ltlMsg.Text = "请输入正确的电话号码";
                 this.pnlMsg.Visible = true;
                 this.pnlMsg.CssClass = "actionErr";
                 return;
             }
         }
         if (txtMobilePhone.Text != "")
         {
             if (!ChangeHope.Common.ValidateHelper.IsMobilePhone(txtMobilePhone.Text))
             {
                 this.ltlMsg.Text = "请输入正确的手机号码";
                 this.pnlMsg.Visible = true;
                 this.pnlMsg.CssClass = "actionErr";
                 return;
             }
         }
         if (txtHomePhone.Text != "")
         {
             if (!ChangeHope.Common.ValidateHelper.IsPhone(txtHomePhone.Text))
             {
                 this.ltlMsg.Text = "请输入正确的住宅电话号码";
                 this.pnlMsg.Visible = true;
                 this.pnlMsg.CssClass = "actionErr";
                 return;
             }
         }
         if (txtHandPhone.Text != "")
         {
             if (!ChangeHope.Common.ValidateHelper.IsPhone(txtHandPhone.Text))
             {
                 this.ltlMsg.Text = "请输入正确的小灵通号码";
                 this.pnlMsg.Visible = true;
                 this.pnlMsg.CssClass = "actionErr";
                 return;
             }
         }
         if (txtFax.Text != "")
         {
             if (!ChangeHope.Common.ValidateHelper.IsPhone(txtFax.Text))
             {
                 this.ltlMsg.Text = "请输入正确的传真号码";
                 this.pnlMsg.Visible = true;
                 this.pnlMsg.CssClass = "actionErr";
                 return;
             }
         }
         if (txtQQ.Text != "")
         {
             if (!ChangeHope.Common.ValidateHelper.IsNumber(txtQQ.Text) || txtQQ.Text.Length < 5 || txtQQ.Text.Length > 13)
             {
                 this.ltlMsg.Text = "请输入正确的QQ号码";
                 this.pnlMsg.Visible = true;
                 this.pnlMsg.CssClass = "actionErr";
                 return;
             }
         }
         if (txtUC.Text != "")
         {
             if (!ChangeHope.Common.ValidateHelper.IsNumber(txtUC.Text) || txtUC.Text.Length < 5 || txtUC.Text.Length > 13)
             {
                 this.ltlMsg.Text = "请输入正确的UC号码";
                 this.pnlMsg.Visible = true;
                 this.pnlMsg.CssClass = "actionErr";
                 return;
             }
         }
         model.Zip = txtZip.Text;
         model.OfficePhone = txtOfficePhone.Text;
         model.HomePhone = txtHomePhone.Text;
         model.MobilePhone = txtMobilePhone.Text;
         model.HandPhone = txtHandPhone.Text;
         model.Fax = txtFax.Text;
         model.PersonWebSite = txtPersonWebSite.Text;
         model.QQ = txtQQ.Text;
         model.MSN = txtMSN.Text;
         model.ICQ = txtICQ.Text;
         model.UC = txtUC.Text;
         model.LifeHobbies = txtLifeHobbies.Text;
         model.CultureHobbies = txtCultureHobbies.Text;
         model.Entertainment = txtEntertainment.Text;
         model.SportsHobbies = txtSportsHobbies.Text;
         model.OtherHobbies = txtOtherHobbies.Text;
         model.IncName = txtIncName.Text;
         model.Department = txtDepartment.Text;
         model.Positions = txtPositions.Text;
         model.WorkRange = txtWorkRange.Text;
         model.IncAddress = txtIncAddress.Text;
         model.MonthlyInCome = txtMonthlyInCome.Text;
         if (bll.Exists(Convert.ToInt32(ViewState["uid"].ToString())) && ViewState["uid"] != null)
         {
             model.UID = Convert.ToInt32(ViewState["uid"].ToString());
             bll.Update(model);
         }
         else
         {
             model.UID = GetIdByUserId(this.txtUserId.Text.Trim());
             bll.Add(model);
         }
         this.ltlMsg.Text = "编辑信息成功";
         this.pnlMsg.Visible = true;
         this.pnlMsg.CssClass = "actionOk";
     }
     catch { }
     finally
     {
         model = null;
         bll = null;
     }
 }
 private void OrderInfo(int id)
 {
     ShowShop.BLL.Order.Orders bll = new ShowShop.BLL.Order.Orders();
     ShowShop.Model.Order.Orders model = bll.GetModel(id);
     this.hlBackList.NavigateUrl = "order_order_info.aspx?OrderId=" + id;
     ShowShop.Common.SysParameter sp = new ShowShop.Common.SysParameter();
     this.txtProductName.Attributes.Add("readonly", "readonly");
     this.txtProductName.Attributes.Add("onclick", "selectFile('Product',new Array(" + this.hfid.ClientID + "," + this.txtProductName.ClientID + "),310,550,'" + sp.DummyPaht + "');");
     if (model != null)
     {
         ShowShop.BLL.Member.MemberAccount mabll = new ShowShop.BLL.Member.MemberAccount();
         ShowShop.Model.Member.MemberAccount mamodel = mabll.GetModel(model.UserId);
         if (mamodel != null)
         {
             ShowShop.BLL.Member.MemberInfo mibll = new ShowShop.BLL.Member.MemberInfo();
             ShowShop.Model.Member.MemberInfo mimodel = mibll.GetModel(mamodel.UID);
             if (mimodel != null)
             {
                 this.lbName.Text = mimodel.TrueName;
             }
             this.lbUserName.Text = "<a href='../member/member_view.aspx?uid=" + mamodel.UID + "'>" + model.UserId + "</a>";
         }
         else
         {
             this.lbUserName.Text = model.UserId;
         }
         this.paymentInfo(model.SaleUserType, model.SaleUserID);
         this.hfOrderId.Value = id.ToString();
         this.blOrderNo.Text = model.OrderId;
         ShowShop.Common.OrdersStatusEnum ose = new ShowShop.Common.OrdersStatusEnum();
         this.lbOrderStatue.Text = ose.OrderStatus(model.OrderStatus);
         this.lbLogisticsStatus.Text = ose.OgisticsStatu(model.OgisticsStatus);
         this.lbPayment.Text = ose.PaymentStatus(model.PaymentStatus);
         this.lbOrderDateTime.Text = model.OrderDate.ToString();
         this.txtConsigneeName.Text = model.ConsigneeName;
         this.txtConsigneeAddress.Text = model.ConsigneeAddress;
         this.txtConsigneeEmail.Text = model.ConsigneeEmail;
         this.txtConsigneeModile.Text = model.ConsigneePhone;
         this.txtConsigneeTel.Text = model.ConsigneeTel;
         this.txtConsigneeZip.Text = model.ConsigneeZip;
         this.txtConstructionSigns.Text = model.ConsigneeRealName;
         this.txtConsigneTime.Text = model.ConsigneeFax;
         this.txtRemark.Text = string.IsNullOrEmpty(model.Remark) ? "" : model.Remark;
         this.ddlPayMent.SelectedValue = model.PaymentType.ToString();
         this.ddlDeliver.SelectedValue = model.Carriage.ToString();
         this.lbOrderTotalPrice.Text =Convert.ToDouble(model.FactPrice).ToString("f2");
         this.txtCarriage.Text = Convert.ToDouble(model.Courier).ToString("f2");
     }
 }
        private void GetInfo(int uid)
        {
            ShowShop.BLL.Member.MemberInfo bll = new ShowShop.BLL.Member.MemberInfo();
            ShowShop.Model.Member.MemberInfo model = bll.GetModel(uid);
            if (model != null)
            {
                this.ckbPrivacySettings.Checked = model.PrivacySettings==1?true:false;
                this.txtTrueName.Text = model.TrueName;
                this.txtTitle.Text = model.Title;
                //this.txtPhoto.Text = model.Photo;
                this.txtBirthday.Text = model.Birthday.ToString();
                this.ddlPapersType.SelectedValue = model.PapersType;
                this.txtPapersNumber.Text = model.PapersNumber;
                this.txtOrigin.Text = model.Origin;
                this.txtNation.Text = model.Nation;
                this.ddlSex.SelectedValue = model.Sex.ToString();
                this.ddlMarriage.SelectedValue = model.Marriage.ToString();
                this.ddlEducation.SelectedValue = model.Education;
                this.txtGraduateSchool.Text = model.GraduateSchool;
                this.lblScript.Text += "GetCity('" + this.ddlProvince.ClientID + "','0','" + model.Province + "');\n";
                this.lblScript.Text += "GetCity('" + this.ddlCity.ClientID + "','" + model.Province + "','" + model.City + "');\n";
                this.lblScript.Text += "GetCity('" + this.ddlBorough.ClientID + "','" + model.City + "','" + model.Borough + "');\n";
                this.txtAddress.Text = model.Address;
                this.txtZip.Text = model.Zip;
                this.txtOfficePhone.Text = model.OfficePhone;
                this.txtHomePhone.Text = model.HomePhone;
                this.txtMobilePhone.Text = model.MobilePhone;
                this.txtHandPhone.Text = model.HandPhone;
                this.txtFax.Text = model.Fax;
                this.txtPersonWebSite.Text = model.PersonWebSite;
                this.txtQQ.Text = model.QQ;
                this.txtMSN.Text = model.MSN;
                this.txtICQ.Text = model.ICQ;
                this.txtUC.Text = model.UC;
                this.txtLifeHobbies.Text = model.LifeHobbies;
                this.txtCultureHobbies.Text = model.CultureHobbies;
                this.txtEntertainment.Text = model.Entertainment;
                this.txtSportsHobbies.Text = model.SportsHobbies;
                this.txtOtherHobbies.Text = model.OtherHobbies;
                this.txtIncName.Text = model.IncName;
                this.txtDepartment.Text = model.Department;
                this.txtPositions.Text = model.Positions;
                this.txtWorkRange.Text = model.WorkRange;
                this.txtIncAddress.Text = model.IncAddress;
                this.txtMonthlyInCome.Text = model.MonthlyInCome;

            }
        }