/// <summary> /// 绑定国家 /// </summary> public void BindCountry() { this.ddlCountry.DataSource = StoreInfoEditBLL.bindCountry(); this.ddlCountry.DataValueField = "countrycode"; this.ddlCountry.DataTextField = "name"; this.ddlCountry.DataBind(); }
private void BindCountry() { ddlCountry.DataSource = StoreInfoEditBLL.bindCountry(); ddlCountry.DataTextField = "Name"; ddlCountry.DataValueField = "countrycode"; ddlCountry.DataBind(); }
/// <summary> /// 绑定国家 /// </summary> private void bindcountry() { DataTable dt = StoreInfoEditBLL.bindCountry(); this.DropDownList1.DataSource = dt; this.DropDownList1.DataTextField = "name"; this.DropDownList1.DataValueField = "countrycode"; this.DropDownList1.DataBind(); }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.Add("onmouseover", "bg=this.style.backgroundColor;this.style.backgroundColor='#FFFFCC'"); e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=bg"); e.Row.Cells[3].Text = Encryption.Encryption.GetDecipherName(e.Row.Cells[3].Text.ToString()); e.Row.Cells[4].Text = Encryption.Encryption.GetDecipherName(e.Row.Cells[4].Text.ToString()); int curr = Convert.ToInt32(DBHelper.ExecuteScalar("select rate from Currency where id=standardMoney")); // e.Row.Cells[5].Text = Double.Parse(e.Row.Cells[5].Text.ToString()).ToString("0.00"); //Label lab = (Label)e.Row.FindControl("StoreLevelInt"); ////string l = DBHelper.ExecuteScalar("select levelstr from bsco_level where levelflag=1 and levelint = " + Convert.ToInt32(lab.Text.ToString()) + "").ToString(); //string l= getStoLevelStr() //lab.Text = l.ToString(); Label labScp = (Label)e.Row.FindControl("country"); string scp = DBHelper.ExecuteScalar("select top 1 country from city where CPCCode like '" + labScp.Text.ToString() + "%'").ToString(); labScp.Text = scp.ToString(); string storeid = e.Row.Cells[1].Text; int n = StoreInfoEditBLL.getMemberCount(storeid); int EdCount = 1201; int DeCount = 1202; EdCount = Permissions.GetPermissions(EnumCompanyPermission.CustomerUpdateStore); DeCount = Permissions.GetPermissions(EnumCompanyPermission.CustomerStoreManageDelete); HyperLink modlink = (HyperLink)e.Row.FindControl("Hyperlink1"); if (EdCount.ToString() == "1201" || EdCount.ToString() == "1202") { modlink.Visible = true; } else { modlink.Visible = false; } if (DeCount.ToString() == "1202") { ((LinkButton)e.Row.FindControl("DelLink")).Attributes["onclick"] = "return confirm('" + GetTran("000765", "此操作为不可恢复操作,您确认要删除吗?") + "')"; } else { ((LinkButton)e.Row.FindControl("DelLink")).Visible = false; } string manageId = BLL.CommonClass.CommonDataBLL.getManageID(2); if (storeid == "9999999999" || storeid == manageId) { ((LinkButton)e.Row.FindControl("DelLink")).Visible = false; } } else if (e.Row.RowType == DataControlRowType.Header) { e.Row.Attributes.Add("style", "background-image:url('images/tabledp.gif')"); Translations(); } }
/// <summary> /// 绑定国家和银行 /// </summary> private void BindDate() { DataTable items = StoreInfoEditBLL.bindCountry(); foreach (DataRow item in items.Rows) { this.ddlCountry.Items.Add(new ListItem(item["name"].ToString(), item["name"].ToString())); } ddlCountry_SelectedIndexChanged(null, null); }
/* * MemInfoEditBLL meb = new MemInfoEditBLL(); * CommonDataBLL cd = new CommonDataBLL(); * protected void Page_Load(object sender, EventArgs e) * { * if (!IsPostBack) * { * if (Request.QueryString["id"] != null) * { * * //保存编号 * ViewState["Number"] = Request.QueryString["id"].ToString(); * //SetExpectNum(cd.getMaxqishu()); * SetExpectNum(1); * getMemberInfo(Request.QueryString["id"]); * * } * else * { * Response.Write("<script>alert('参数错误!!');window.location.href='QueryMemberInfo.aspx';</script>"); * } * } * } * protected void BtnUpdate_Click1(object sender, EventArgs e) * { * string oldChangeInfo = ""; * bool flag = false; * StringBuilder changeInfo = new StringBuilder(); * * * MemberInfoModel mem = meb.getMemberInfo(ViewState["Number"].ToString()); * * oldChangeInfo = mem.ChangeInfo.ToString(); * changeInfo.Append(mem.ChangeInfo.ToString()); * * changeInfo.Append("管理员 "); * changeInfo.Append(Session["Company"]); * changeInfo.Append(" 在 "); * changeInfo.Append(DateTime.Now.ToString()); * changeInfo.Append(" 第 "); * changeInfo.Append(Session["ExpectNum"].ToString()); * changeInfo.Append(" 期 "); * changeInfo.Append(" 修改了如下内容:"); * * //判断用户是否修改了姓名 * if (this.Name.Text != mem.Name.ToString()) * { * flag = true; * changeInfo.Append("\n修改了姓名,原姓名:"); * changeInfo.Append(mem.Name.ToString()); * changeInfo.Append(";新姓名:"); * changeInfo.Append(this.Name.Text.ToString()); * } * //判断用户是否修改了昵称 * if (this.PetName.Text != mem.PetName.ToString()) * { * flag = true; * changeInfo.Append("\n修改了昵称,原昵称:"); * changeInfo.Append(mem.PetName.ToString()); * changeInfo.Append(";新昵称:"); * changeInfo.Append(this.PetName.Text.ToString()); * } * * //判断用户是否修改了日期 * string str = mem.Birthday.ToString(); * int i = str.IndexOf(":"); * // str = str.Remove(i - 2, 8); * if (this.Birthday.Text != str) * { * flag = true; * changeInfo.Append("\n修改了生日,原生日:"); * changeInfo.Append(str); * changeInfo.Append(";新生日:"); * changeInfo.Append(this.Birthday.Text.ToString()); * } * * //判断用户是否修改了邮编 * if (this.PostolCode.Text != mem.PostalCode.ToString()) * { * flag = true; * changeInfo.Append("\n修改了邮编,原邮编:"); * changeInfo.Append(mem.PostalCode.ToString()); * changeInfo.Append(";新邮编:"); * changeInfo.Append(this.PostolCode.Text.ToString()); * } * * //判断用户是否修改了家庭电话 * if (this.HomeTele.Text != mem.HomeTele.ToString()) * { * flag = true; * changeInfo.Append("\n修改了家庭电话,原家庭电话:"); * changeInfo.Append(mem.HomeTele.ToString()); * changeInfo.Append(";新家庭电话:"); * changeInfo.Append(this.HomeTele.Text.ToString()); * } * * //判断用户是否修改了办公电话 * if (this.OfficeTele.Text != mem.OfficeTele.ToString()) * { * flag = true; * changeInfo.Append("\n修改了办公电话,原办公电话:"); * changeInfo.Append(mem.OfficeTele.ToString()); * changeInfo.Append(";新办公电话:"); * changeInfo.Append(this.OfficeTele.Text.ToString()); * } * * //判断用户是否修改了移动电话 * if (this.MoblieTele.Text != mem.MobileTele.ToString()) * { * flag = true; * changeInfo.Append("\n修改了移动电话,原移动电话:"); * changeInfo.Append(mem.MobileTele.ToString()); * changeInfo.Append(";新移动电话:"); * changeInfo.Append(this.MoblieTele.Text.ToString()); * } * * //判断用户是否修改了传真电话 * if (this.FaxTele.Text != mem.FaxTele.ToString()) * { * flag = true; * changeInfo.Append("\n修改了传真电话,原传真电话:"); * changeInfo.Append(mem.FaxTele.ToString()); * changeInfo.Append(";新传真电话:"); * changeInfo.Append(this.FaxTele.Text.ToString()); * } * * //判断用户是否修改了省份 * if (this.Province.Text != mem.Province.ToString()) * { * flag = true; * changeInfo.Append("\n修改了省份,原省份:"); * changeInfo.Append(mem.Province.ToString()); * changeInfo.Append(";新省份:"); * changeInfo.Append(this.Province.Text.ToString()); * //changeInfo.Append(";原市:"); * //changeInfo.Append(reader["city"]); * //changeInfo.Append(";新市:"); * //changeInfo.Append(Guojia1.City); * } * //判断用户是否修改了市 * if (this.City.Text != mem.City.ToString()) * { * flag = true; * changeInfo.Append("\n修改了市,原市:"); * changeInfo.Append(mem.City.ToString()); * changeInfo.Append(";新市:"); * changeInfo.Append(this.City.Text.ToString()); * } * //判断用户是否修改了地址 * if (this.Address.Text != mem.Address.ToString()) * { * flag = true; * changeInfo.Append("\n修改了地址,原地址:"); * changeInfo.Append(mem.Address.ToString()); * changeInfo.Append(";新地址:"); * changeInfo.Append(this.Address.Text.ToString()); * } * * //判断是否更改了银行的帐号和证件类型 * if ((this.PaperType.Text.ToString().Trim() != mem.PaperType.ToString().Trim()) || (this.PaperNumber.Text.Trim() != mem.PaperNumber.ToString())) * { * if (this.PaperType.ToString().Trim() != "") * { * flag = true; * changeInfo.Append("\n修改了证件类型或证件号码,原证件类型:"); * changeInfo.Append(mem.PaperType.ToString()); * changeInfo.Append(",原证件号码:"); * changeInfo.Append(mem.PaperNumber.ToString()); * changeInfo.Append(";新证件类型:"); * changeInfo.Append(this.PaperType.ToString()); * changeInfo.Append(",新证件号码:"); * changeInfo.Append(this.PaperNumber.ToString()); * } * } * * //判断用户是否修改了开户行 * if (this.Bank.Text.ToString() != mem.Bank.ToString()) * { * flag = true; * changeInfo.Append("\n修改了开户行,原开户行:"); * changeInfo.Append(mem.Bank.ToString()); * changeInfo.Append(";新开户行:"); * changeInfo.Append(this.Bank.Text.ToString()); * } * * * //判断用户是否修改了银行帐号 * if (this.BankNum.Text.ToString() != mem.BankCard.ToString()) * { * flag = true; * changeInfo.Append("\n修改了银行帐号,原银行帐号:"); * changeInfo.Append(mem.BankCard.ToString()); * changeInfo.Append(";新银行帐号:"); * changeInfo.Append(this.BankNum.Text.ToString()); * changeInfo.Append("\n"); * } * * //判断用户是否修改了银行开户名 * if (this.BankBook.Text.ToString() != mem.BankBook.ToString()) * { * flag = true; * changeInfo.Append("\n修改了银行开户名,原银行开户名:"); * changeInfo.Append(mem.BankBook.ToString()); * changeInfo.Append(";新银行开户名:"); * changeInfo.Append(this.BankBook.Text.ToString()); * changeInfo.Append("\n"); * } * * string Number = this.Number.Text.ToString(); * string Placement = this.Placement.Text.ToString(); * string Direct = this.Recommended.Text.ToString(); * string Name = this.Name.Text.ToString(); * string PetName = this.PetName.Text.ToString(); * * DateTime Birthday = DateTime.Parse(this.Birthday.Text.ToString()); * int Sex = 0; * if (this.Sex.SelectedValue.ToString() == "0") * { * Sex = 0; * } * else * { * Sex = 1; * } * string PostalCode = this.PostolCode.Text.ToString(); * string HomeTele = this.HomeTele.Text.ToString(); * string OfficeTele = this.OfficeTele.Text.ToString(); * * string FaxTele = this.FaxTele.Text.ToString(); * string MobileTele = this.MoblieTele.Text.ToString(); * string Country = this.Country.Text.ToString(); * string Province = this.Province.Text.ToString(); * string City = this.City.Text.ToString(); * * string Address = this.Address.Text.ToString(); * string PaperNumber = this.PaperNumber.Text.ToString(); * string PaperType = this.PaperType.Text.ToString(); * string Bank = this.Bank.Text.ToString(); * string BankAddress = this.BankAdderss.Text.ToString(); * * string BankCountry = this.BankCountry.Text.ToString(); * string BankProvince = this.BankProvince.Text.ToString(); * string BankCity = this.BankCity.Text.ToString(); * string BankCard = this.BankNum.Text.ToString(); * string BankBook = this.BankBook.Text.ToString(); * * int ExpectNum = Convert.ToInt32(this.ExpectNum.SelectedValue.ToString()); * string Remark = this.Remark.Text.ToString(); * string OrderId = this.OrderID.Text.ToString(); * string StoreId = this.StoreID.Text.ToString(); * string ChangeInfo = ""; * if (flag == true) * { * ChangeInfo = changeInfo.ToString(); * } * else * { * ChangeInfo = oldChangeInfo; * } * * string OperateIp = HttpContext.Current.Request.UserHostAddress.ToString(); * //string OperaterNum = cd.OperateBh; * string OperaterNum = ""; * * updMemberInfo(Number, Placement, Direct, Name, PetName, Birthday, Sex, PostalCode, HomeTele, OfficeTele, MobileTele, FaxTele, Country, Province, City, Address, PaperType, PaperNumber, BankCountry, BankProvince, BankCity, Bank, BankAddress, BankCard, BankBook, ExpectNum, Remark, OrderId, StoreId, ChangeInfo, OperateIp, OperaterNum); * * } * * public void getMemberInfo(string Number) * { * MemberInfoModel member = meb.getMemberInfo(Number); * * this.Number.Text = member.Number.ToString(); * this.Placement.Text = member.Placement.ToString(); * this.Recommended.Text = member.Direct.ToString(); * this.Name.Text = member.Name.ToString(); * this.PetName.Text = member.PetName.ToString(); * this.Birthday.Text = member.Birthday.ToString(); * if (Convert.ToInt32(member.Sex) == 0) * { * this.Sex.SelectedValue = "0"; * } * else * { * this.Sex.SelectedValue = "1"; * } * this.PostolCode.Text = member.PostalCode.ToString(); * this.HomeTele.Text = member.HomeTele.ToString(); * this.OfficeTele.Text = member.OfficeTele.ToString(); * this.FaxTele.Text = member.FaxTele.ToString(); * this.MoblieTele.Text = member.MobileTele.ToString(); * this.Country.Text = member.Country.ToString(); * this.Province.Text = member.Province.ToString(); * this.City.Text = member.City.ToString(); * this.Address.Text = member.Address.ToString(); * this.PaperNumber.Text = member.PaperNumber.ToString(); * this.PaperType.Text = member.PaperType.ToString(); * this.Bank.Text = member.Bank.ToString(); * this.BankAdderss.Text = member.BankAddress.ToString(); * this.BankCountry.Text = member.BankCountry.ToString(); * this.BankProvince.Text = member.BankProvince.ToString(); * this.BankCity.Text = member.BankCity.ToString(); * this.BankNum.Text = member.BankCard.ToString(); * this.BankBook.Text = member.BankBook.ToString(); * // this.ExpectNum.SelectedValue = "-1"; * foreach (ListItem item3 in this.ExpectNum.Items) * { * string ExpectNum = member.ExpectNum.ToString(); * if (item3.Text == ExpectNum) * { * item3.Selected = true; * break; * } * } * this.Remark.Text = member.Remark.ToString(); * this.OrderID.Text = member.OrderID.ToString(); * this.StoreID.Text = member.StoreID.ToString(); * Session["ExpectNum"] = member.ExpectNum.ToString(); * } * * public void updMemberInfo(string Number, string Placement, string Direct, string Name, string PetName, DateTime Birthday, int Sex, string PostalCode, string HomeTele, string OfficeTele, string MobileTele, string FaxTele, string Country, string Province, string City, string Address, string PaperType, string PaperNumber, string BankCountry, string BankProvince, string BankCity, string Bank, string BankAddress, string BankCard, string BankBook, int ExpectNum, string Remark, string OrderId, string StoreId, string ChangeInfo, string OperateIp, string OperaterNum) * { * int i = 0; * i = meb.updateMember(Number, Placement, Direct, Name, PetName, Birthday, Sex, PostalCode, HomeTele, OfficeTele, MobileTele, FaxTele, Country, Province, City, Address, PaperType, PaperNumber, BankCountry, BankProvince, BankCity, Bank, BankAddress, BankCard, BankBook, ExpectNum, Remark, OrderId, StoreId, ChangeInfo, OperateIp, OperaterNum); * if (i > 0) * { * Page.RegisterStartupScript("", "<script language='javascript'>alert('修改成功!')</script>"); * getMemberInfo(ViewState["Number"].ToString()); * } * else * { * Page.RegisterStartupScript("", "<script language='javascript'>alert('修改失败!')</script>"); * } * } * //根据最大期数,绑定指定的项到期数下拉框 * public void SetExpectNum(int maxExpectNum) * { * for (int i = 1; i <= maxExpectNum; i++) * this.ExpectNum.Items.Add(new ListItem(i.ToString(), i.ToString())); * * this.ExpectNum.SelectedIndex = -1; * foreach (ListItem item in this.ExpectNum.Items) * { * if (item.Value == maxExpectNum.ToString()) * { * item.Selected = true; * break; * } * } * } * protected void Button1_Click(object sender, EventArgs e) * { * Response.Redirect("QueryMemberInfo.aspx"); * } * protected void go_Click(object sender, EventArgs e) * { * * } * */ #endregion /// <summary> /// 绑定国家 /// </summary> public void BindCountry() { this.ddlCountry.DataSource = StoreInfoEditBLL.bindCountry(); this.ddlCountry.DataValueField = "countrycode"; this.ddlCountry.DataTextField = "name"; this.ddlCountry.DataBind(); ListItem li = new ListItem(GetTran("000303", "请选择"), "-1"); ddlCountry.Items.Insert(0, li); }
protected void StoreCountry_SelectedIndexChanged(object sender, EventArgs e) { SqlDataReader dr = StoreInfoEditBLL.bindCity(this.StoreCountry.SelectedValue.ToString()); this.StoreCity.Items.Clear(); while (dr.Read()) { ListItem list2 = new ListItem(dr["Province"].ToString(), dr["Province"].ToString()); this.StoreCity.Items.Add(list2); } dr.Close(); }
protected void Page_Load(object sender, EventArgs e) { AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass)); Response.Cache.SetExpires(DateTime.Now); Permissions.CheckManagePermission(EnumCompanyPermission.CustomerCreateStore); if (!IsPostBack) { DataTable dtct = StoreInfoEditBLL.bindCountry(); foreach (DataRow item in dtct.Rows) { this.DropDownList1.Items.Add(new ListItem(item["name"].ToString(), item["name"].ToString())); this.StoreCountry.Items.Add(new ListItem(item["name"].ToString(), item["name"].ToString())); } SqlDataReader dr1 = StoreInfoEditBLL.bindCity(this.StoreCountry.SelectedValue.ToString()); while (dr1.Read()) { ListItem list2 = new ListItem(dr1["Province"].ToString(), dr1["Province"].ToString()); this.StoreCity.Items.Add(list2); } dr1.Close(); DataTable dt = DBHelper.ExecuteDataTable("select levelint,levelstr from bsco_level where levelflag=1 order by levelint"); rdoListLevel.DataSource = dt; rdoListLevel.DataTextField = "levelstr"; rdoListLevel.DataValueField = "levelint"; rdoListLevel.DataBind(); rdoListLevel.SelectedValue = DBHelper.ExecuteScalar("select top 1 levelint from bsco_level where levelflag=1 order by levelint").ToString(); DropDownList1_SelectedIndexChanged(null, null); ddlLanaguage.DataSource = CommonDataBLL.GetLanaguage(); ddlLanaguage.DataTextField = "Name"; ddlLanaguage.DataValueField = "ID"; ddlLanaguage.DataBind(); Currency.DataSource = CommonDataBLL.GetCurrency(); Currency.DataTextField = "Name"; Currency.DataValueField = "ID"; Currency.DataBind(); if (Session["LoginUserType"].ToString() == "manage") { lbltitel.Text = GetTran("000554", "添加店信息"); } else { lbltitel.Text = GetTran("000555", "店铺注册"); } if (this.CountryCity1.City != "") { Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>GetCCode_s2('" + this.CountryCity1.City + "')</script>"); } } Translations(); }
private void BindCountryBank() { DataTable dtct = StoreInfoEditBLL.bindCountry(); foreach (DataRow item in dtct.Rows) { this.DropDownList1.Items.Add(new ListItem(item["name"].ToString(), item["id"].ToString())); } int countryid = -1; if (this.DropDownList1.Items.Count > 0) { countryid = int.Parse(this.DropDownList1.SelectedValue.ToString()); CommonDataBLL.BindCountryBankByCountryID(countryid, ddlBank); _hasBind = true; } }
protected void Page_Load(object sender, EventArgs e) { Permissions.ComRedirect(Page, Permissions.redirUrl); Permissions.CheckManagePermission(EnumCompanyPermission.CustomerUpdateStore); Response.Cache.SetExpires(DateTime.Now); if (!IsPostBack) { DataTable dtct = StoreInfoEditBLL.bindCountry(); foreach (DataRow item in dtct.Rows) { this.DropDownList1.Items.Add(new ListItem(item["name"].ToString(), item["name"].ToString())); this.StoreCountry.Items.Add(new ListItem(item["name"].ToString(), item["name"].ToString())); } //CommonDataBLL.BindCountry_Bank(this.DropDownList1.SelectedValue.ToString(), MemberBank1); if (Request.QueryString["id"] != null) { int id = Convert.ToInt32(Request.QueryString["id"]); DataTable dt = DBHelper.ExecuteDataTable("select id,levelint,levelstr from bsco_level where levelflag=1 order by levelint"); foreach (DataRow row in dt.Rows) { string str = CommonDataBLL.GetLanguageStr(int.Parse(row["id"].ToString()), "BSCO_level", "levelstr"); StoreLevelInt.Items.Add(new ListItem(str, row["levelint"].ToString())); } //StoreLevelInt.DataSource = dt; //StoreLevelInt.DataTextField = "levelstr"; //StoreLevelInt.DataValueField = "levelint"; //StoreLevelInt.DataBind(); StoreLevelInt.SelectedValue = DBHelper.ExecuteScalar("select top 1 levelint from bsco_level where levelflag=1 order by levelint").ToString(); //读取详细信息 //保存编号 ViewState["id"] = id; getDetial(id); } // if(this.CountryCity1.City!="") // Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>GetCCode_s2('" + this.CountryCity1.City + "')</script>"); } Translations(); }
protected void givSearchStoreInfo_RowCommand(object sender, GridViewCommandEventArgs e) { int ID = Convert.ToInt32(e.CommandArgument.ToString()); if (e.CommandName == "del") { GridViewRow row = (GridViewRow)((LinkButton)e.CommandSource).NamingContainer; string storeid = row.Cells[1].Text; int k = StoreInfoEditBLL.getMemberCount(storeid); if (k == 0) { int i = 0; StoreInfoEditBLL seb = new StoreInfoEditBLL(); BLL.CommonClass.ChangeLogs cl_h_info = new BLL.CommonClass.ChangeLogs("storeinfo", "(ltrim(rtrim(id)))"); cl_h_info.AddRecord(ID); i = seb.DelStore(ID); cl_h_info.DeletedIntoLogs(BLL.CommonClass.ChangeCategory.company4, Session["Company"].ToString(), BLL.CommonClass.ENUM_USERTYPE.objecttype2); if (i > 0) { //Response.Write("<script language='javascript'>alert('删除成功!')</script>"); this.msg = "<script language='javascript'>alert('" + GetTran("000749", "删除成功!") + "')</script>"; BtnSeach_Click(null, null); } else { //Response.Write("<script language='javascript'>alert('删除失败!')</script>"); this.msg = "<script language='javascript'>alert('" + GetTran("000417", "删除失败!") + "')</script>"; return; } } else { this.msg = "<script language='javascript'>alert('" + GetTran("000756", "对不起,该店铺已经发生了业务关系,不能删除!") + "')</script>"; return; } } else { BtnSeach_Click(null, null); } }
/// <summary> /// 绑定国家 /// </summary> public void BindCountry() { string number = ViewState["membernumberE"].ToString(); string countrycode = MemInfoEditBLL.Getbank(number); this.ddlCountry.Items.Clear(); DataTable dtct = StoreInfoEditBLL.bindCountry(); foreach (DataRow item in dtct.Rows) { ListItem list1 = new ListItem(item["name"].ToString(), item["countrycode"].ToString()); if ((!string.IsNullOrEmpty(countrycode)) && item["countrycode"].ToString() == countrycode) { list1.Selected = true; ViewState["childdrop"] = "true"; } this.ddlCountry.Items.Add(list1); } ddlCountry_SelectedIndexChanged(null, null); }
protected void Page_Load(object sender, EventArgs e) { Permissions.ComRedirect(Page, Permissions.redirUrl); Permissions.CheckManagePermission(EnumCompanyPermission.CustomerModifyMemberInfoKaHao); Response.Cache.SetExpires(DateTime.Now); AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass)); if (!IsPostBack) { BtnUpdate.Attributes.Add("onclick", "return Verify()"); CommonDataBLL.BindCountry_Bank("中国", MemberBank); CommonDataBLL.BindPaperType(PaperType); if (Request.QueryString["id"] != null) { // CommonDataBLL.bing //保存编号 DataTable dt = StoreInfoEditBLL.bindCountry(); foreach (DataRow item in dt.Rows) { this.DropDownList1.Items.Add(new ListItem(item["name"].ToString(), item["name"].ToString())); } string number = Request.QueryString["id"].ToString(); ViewState["Number"] = number; //存储到试图中 getMemberInfo(number); //绑定信息 System.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(), "success2", "paperchange();", true); } else { Response.Redirect("QueryMemberInfo.aspx"); } Translations(); } }
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e) { string number = string.Empty; number = Request.QueryString["number"].ToString(); if (Request.QueryString["type"] == "3") { ManageModel model = ManagerBLL.GetManage(number); lit_name.Text = new TranslationBase().GetTran("001066", "管理员编号") + ":" + number; lit_number.Text = new TranslationBase().GetTran("001067", "管理员名称") + ":" + model.Name; if (this.RadioButtonList1.SelectedValue.ToString() == "1") { this.lab1.Visible = false; this.txt_1.Style.Add("display", "none"); this.lab1.Text = ""; } if (this.RadioButtonList1.SelectedValue.ToString() == "4") { this.lab1.Visible = true; this.txt_1.Style.Add("display", ""); this.txt_1.Text = ""; this.lab1.Text = "请输入密码:"; } } else if (Request.QueryString["type"] == "2") { StoreInfoModel model = StoreInfoEditBLL.GetStoreInfoByStoreId(number); lit_number.Text = new TranslationBase().GetTran("000037", "服务机构编号") + ":" + number; lit_name.Text = new TranslationBase().GetTran("000040", "服务机构名称") + ":" + Encryption.Encryption.GetDecipherName(model.StoreName); if (this.RadioButtonList1.SelectedValue.ToString() == "3") { this.txt_1.Text = Encryption.Encryption.GetDecipherTele(model.MobileTele); this.lab1.Visible = true; this.txt_1.Style.Add("display", ""); this.lab1.Text = GetTran("006684", "手机号码:"); } if (this.RadioButtonList1.SelectedValue.ToString() == "2") { this.txt_1.Text = model.Email; this.lab1.Visible = true; this.txt_1.Style.Add("display", ""); this.lab1.Text = "E-Mail:"; } if (this.RadioButtonList1.SelectedValue.ToString() == "1") { this.lab1.Visible = false; this.txt_1.Style.Add("display", "none"); this.lab1.Text = ""; } if (this.RadioButtonList1.SelectedValue.ToString() == "4") { this.lab1.Visible = true; this.txt_1.Style.Add("display", ""); this.txt_1.Text = ""; this.lab1.Text = "请输入密码:"; } } else { MemberInfoModel model = MemInfoEditBLL.getMemberInfo(number); lit_number.Text = new TranslationBase().GetTran("000024", "会员编号") + ":" + number; lit_name.Text = new TranslationBase().GetTran("000025", "会员姓名") + ":" + Encryption.Encryption.GetDecipherName(model.Name); if (this.RadioButtonList1.SelectedValue.ToString() == "3") { this.txt_1.Text = Encryption.Encryption.GetDecipherTele(model.MobileTele); this.lab1.Visible = true; this.txt_1.Style.Add("display", ""); this.lab1.Text = GetTran("006684", "手机号码:"); } if (this.RadioButtonList1.SelectedValue.ToString() == "2") { this.txt_1.Text = model.Email; this.lab1.Visible = true; this.txt_1.Style.Add("display", ""); this.lab1.Text = "E-Mail:"; } if (this.RadioButtonList1.SelectedValue.ToString() == "1") { this.lab1.Visible = false; this.txt_1.Style.Add("display", "none"); this.lab1.Text = ""; } if (this.RadioButtonList1.SelectedValue.ToString() == "4") { this.lab1.Visible = true; this.txt_1.Style.Add("display", ""); this.txt_1.Text = ""; this.lab1.Text = "请输入密码:"; } } }
//读取详细信息 public void getDetial(int id) { StoreInfoModel storeInfo = StoreInfoEditBLL.GetStoreInfoById(id); this.Number.Text = storeInfo.Number.ToString(); this.StoreID.Text = storeInfo.StoreID.ToString(); ViewState["StoreID"] = storeInfo.StoreID.ToString(); this.Name.Text = Encryption.Encryption.GetDecipherName(storeInfo.Name.ToString()); this.StoreName.Text = Encryption.Encryption.GetDecipherName(storeInfo.StoreName.ToString()); this.Address.Text = Encryption.Encryption.GetDecipherAddress(storeInfo.StoreAddress.ToString()); this.HomeTele.Text = Encryption.Encryption.GetDecipherTele(storeInfo.HomeTele.ToString()); this.OfficeTele.Text = Encryption.Encryption.GetDecipherTele(storeInfo.OfficeTele.ToString()); this.MobileTele.Text = Encryption.Encryption.GetDecipherTele(storeInfo.MobileTele.ToString()); this.txtDirect.Text = storeInfo.Direct.ToString(); this.FaxTele.Text = Encryption.Encryption.GetDecipherTele(storeInfo.FaxTele.ToString()); txtEbank.Text = storeInfo.Bankbranchname; //SqlDataReader dr1 = DBHelper.ExecuteReader("select BankName from memberbank where BankCode='" + storeInfo.BankCode.ToString() + "'"); //if (dr1.Read()) //{ // this.MemberBank1.SelectedValue = dr1["BankName"].ToString(); //} storeInfo.Bank = new MemberBankModel(); if (storeInfo.BankCode.ToString() == "000000") { this.DropDownList1.SelectedValue = DBHelper.ExecuteScalar("select top 1 name from country").ToString(); } else { this.DropDownList1.SelectedValue = DBHelper.ExecuteScalar("select b.name from memberbank a,country b where a.countrycode=b.id and bankcode='" + storeInfo.BankCode.ToString() + "'").ToString(); } CommonDataBLL.BindCountry_Bank(this.DropDownList1.SelectedValue.ToString(), MemberBank1); this.MemberBank1.SelectedValue = storeInfo.BankCode.ToString(); //this.Bank.Text = storeInfo.Bank.ToString(); this.BankCard.Text = Encryption.Encryption.GetDecipherCard(storeInfo.BankCard.ToString()); this.NetAddress.Text = storeInfo.NetAddress.ToString(); this.Email.Text = storeInfo.Email.ToString(); this.Remark.Text = storeInfo.Remark.ToString(); this.Label1.Text = storeInfo.Direct.ToString();//推荐店铺编号 this.Language.Text = storeInfo.Language.ToString(); this.ExpectNum.Text = storeInfo.ExpectNum.ToString(); // SetDate(Convert.ToDateTime(reader["RegisterDate"])); this.RegisterDate.Text = storeInfo.RegisterDate.AddHours(BLL.other.Company.WordlTimeBLL.ConvertAddHours()).ToString(); if (storeInfo.StoreLevelInt.ToString() != "0") { this.StoreLevelInt.SelectedValue = storeInfo.StoreLevelInt.ToString(); //绑定级别 } else { this.StoreLevelInt.SelectedValue = "0"; } this.FareArea.Text = storeInfo.FareArea.ToString(); this.TotalInvestMoney.Text = storeInfo.TotalInvestMoney.ToString("f2"); this.PostolCode.Text = storeInfo.PostalCode.ToString(); SqlDataReader dr = DBHelper.ExecuteReader("select country,province,city,xian from city where cpccode='" + storeInfo.CPCCode.ToString() + "'"); if (dr.Read()) { this.CountryCity1.State = false; this.CountryCity1.SelectCountry(dr["Country"].ToString(), dr["Province"].ToString(), dr["City"].ToString(), dr["xian"].ToString()); } string country = DBHelper.ExecuteScalar("select top 1 country from city where cpccode like'" + storeInfo.SCPCCode.ToString() + "%'").ToString(); SqlDataReader dr1 = StoreInfoEditBLL.bindCity(country); while (dr1.Read()) { ListItem list2 = new ListItem(dr1["Province"].ToString(), dr1["Province"].ToString()); this.StoreCity.Items.Add(list2); } dr.Close(); dr1.Close(); this.StoreCountry.SelectedValue = country; string province = DBHelper.ExecuteScalar("select top 1 province from city where country='" + country + "' and cpccode like'" + storeInfo.SCPCCode.ToString() + "%'").ToString(); this.StoreCity.SelectedValue = province; ViewState["PhotoPath"] = storeInfo.PhotoPath.ToString(); ViewState["PhotoH"] = 0; ViewState["PhotoW"] = 0; }
protected void Page_Load(object sender, EventArgs e) { Permissions.ThreeRedirect(Page, Permissions.redirUrl); AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass)); Response.Cache.SetExpires(DateTime.Now); //Permissions.CheckManagePermission(EnumCompanyPermission.CustomerCreateStore); if (!IsPostBack) { if (Session["Member"] != null) { txtNumber.Text = Session["Member"].ToString(); txtNumber.ReadOnly = true; } //如果该会员有自己的服务机构,那么就直接显示服务机构的记录, //如果没有,就直接显示申请服务机构的页面 //先判断中间表UnauditedStoreInfo里是否有数据,如果有数据,是未审核;如果没有记录,就是查询storeinfo表里是否有记录, if (int.Parse(DAL.DBHelper.ExecuteScalar("select count(0) from storeinfo where number='" + Session["Member"].ToString() + "'").ToString()) > 0) { Response.Redirect("ShowRegStore.aspx"); return; } DataTable dtct = StoreInfoEditBLL.bindCountry(); foreach (DataRow item in dtct.Rows) { this.DropDownList2.Items.Add(new ListItem(item["name"].ToString(), item["name"].ToString())); this.StoreCountry.Items.Add(new ListItem(item["name"].ToString(), item["name"].ToString())); } SqlDataReader dr1 = StoreInfoEditBLL.bindCity(this.StoreCountry.SelectedValue.ToString()); while (dr1.Read()) { ListItem list2 = new ListItem(dr1["Province"].ToString(), dr1["Province"].ToString()); this.StoreCity.Items.Add(list2); } dr1.Close(); //DataTable dt = DBHelper.ExecuteDataTable("select levelint,levelstr from bsco_level where levelflag=1 order by levelint"); //rdoListLevel.DataSource = dt; //rdoListLevel.DataTextField = "levelstr"; //rdoListLevel.DataValueField = "levelint"; //rdoListLevel.DataBind(); //rdoListLevel.SelectedValue = DBHelper.ExecuteScalar("select top 1 levelint from bsco_level where levelflag=1 order by levelint").ToString(); // BLL.CommonClass.CommonDataBLL common = new CommonDataBLL(); DropDownList2_SelectedIndexChanged(null, null); ddlLanaguage.DataSource = CommonDataBLL.GetLanaguage(); ddlLanaguage.DataTextField = "Name"; ddlLanaguage.DataValueField = "ID"; ddlLanaguage.DataBind(); Currency.DataSource = CommonDataBLL.GetCurrency(); Currency.DataTextField = "Name"; Currency.DataValueField = "ID"; Currency.DataBind(); CommonDataBLL.BindQishuList(this.DropDownList1, false); //if (Session["LoginUserType"].ToString() == "manage") //{ // btnGetmember.Visible = true; // lbltitel.Text = "添加店信息"; //} //else //{ //lbltitel.Text = "店铺注册"; // btnGetmember.Visible = false; //} } Translations(); }