/// <summary> /// 加入黑名单 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Add_blackList_Click(object sender, EventArgs e) { //验证用户填写黑名单区域管辖 string country = CountryCity1.Country; string p = CountryCity1.Province; string city = CountryCity1.City; string xian = CountryCity1.Xian; if (!this.CountryCity1.CheckFill()) { ScriptHelper.SetAlert(out msg, GetTran("000886", "必须提供有效的区域")); CountryCity1.SelectCountry(country, p, city, xian); return; } string area = country + "," + p + "," + city + "," + xian; area = area.Replace(" ", ""); string[] areas = area.Split(','); if (areas.Length != 4) { ScriptHelper.SetAlert(out msg, GetTran("000887", "必须提供有效的区域!")); CountryCity1.SelectCountry(country, p, city, xian); return; } //判断是否已经存在该黑名单区域管辖 3代表区域管辖类型 string cpcode = CommonDataDAL.GetCPCCode(country, p, city, xian); if (BlackGroupBLL.HasBlackGroup(cpcode, 3)) { //提示已经存在,无需填写 ScriptHelper.SetAlert(out msg, GetTran("000890", "指定的黑名单区域已经存在,无法增加!")); CountryCity1.SelectCountry(country, p, city, xian); return; } BlackGroupModel blackGroup = new BlackGroupModel(); //区域管辖类型 blackGroup.IntGroupType = 3; blackGroup.IntGroupValue = cpcode; string operateIP = Request.UserHostAddress.ToString(); string operateNum = Session["Company"].ToString(); switch (BlackGroupBLL.AddBlackGroup(blackGroup, operateIP, operateNum)) { case 1: ScriptHelper.SetAlert(out msg, GetTran("000891", "添加成功!")); PageSet(); break; default: ScriptHelper.SetAlert(out msg, GetTran("000893", "执行发生错误")); break; } }
/// <summary> /// 获取该用户编号的信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Txtbh_TextChanged(object sender, EventArgs e) { if (MemberOrderAgainBLL.CheckMemberExist(Txtbh.Text.Trim())) { MemberInfoModel mi = MemberOrderAgainBLL.GetMemberInfoByNumber(Txtbh.Text.Trim()); this.Txtxm.Text = Encryption.Encryption.GetDecipherName(mi.Name); this.Txtyb.Text = mi.PostalCode; this.Email.Text = mi.Email; this.Txtjtdh.Text = Encryption.Encryption.GetDecipherTele(mi.HomeTele); this.Txtyddh.Text = Encryption.Encryption.GetDecipherTele(mi.MobileTele); this.Txtdz.Text = Encryption.Encryption.GetDecipherAddress(mi.Address); CountryCity1.SelectCountry(mi.City.Country, mi.City.Province, mi.City.City, mi.City.Xian); } else { ScriptManager.RegisterClientScriptBlock(UpdatePanel1, this.GetType(), "click", "alert('" + GetTran("001560", "对不起,您输入的会员编号不存在,请重新输入!") + "')", true); Txtbh.Text = ""; } }
protected void rbtAddress_SelectedIndexChanged(object sender, EventArgs e) { if (this.rbtAddress.SelectedItem.Text == "新地址") { //this.panel2.Visible = true; //this.Txtyb.Text = ""; } else { string addres = this.rbtAddress.SelectedItem.Text.Trim(); string[] addr = addres.Split(' '); CountryCity1.SelectCountry(addr[0], addr[1], addr[2], addr[3]); Txtdz.Text = addr[4]; //DDLSendType.SelectedValue = addr[5]; //ddth.SelectedValue = addr[6]; Txtxm.Text = addr[addr.Length - 2]; Txtjtdh.Text = addr[addr.Length - 1]; //this.Txtyb.Text = DAL.CommonDataDAL.GetZipCode(addr[0], addr[1], addr[2]); //this.panel2.Visible = false; } }