private void GetList()
 {
     //生成列表
     ShowShop.BLL.SystemInfo.Provinces bll = new ShowShop.BLL.SystemInfo.Provinces();
     this.Literal1.Text = bll.GetList();
     //生成菜单
     int w_d_parentid = ChangeHope.WebPage.PageRequest.GetInt("w_d_parentid");
     this.tool.Text = tool.Text + bll.GetToolBar(w_d_parentid);
     bll = null;
 }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if(!this.Page.IsPostBack)
     {
         ShowShop.BLL.SystemInfo.Provinces bll = new ShowShop.BLL.SystemInfo.Provinces();
         int parentid = ChangeHope.WebPage.PageRequest.GetQueryInt("parentid");
         if (parentid<0)
         {
             parentid = 0;
         }
         Response.Write(bll.GetChidNode(parentid.ToString()));
     }
 }
 private void Del(int id)
 {
     ShowShop.BLL.SystemInfo.Provinces bll = new ShowShop.BLL.SystemInfo.Provinces();
        DataTable dt=bll.GetChid(id.ToString());
        if (dt.Rows.Count > 0)
        {
        Response.Write("请地区下还有地区,请删除下级地区!");
        }
        else
        {
        bll.Delete(id);
        Response.Write("ok");
        }
 }
 private void GetModel()
 {
     int id = ChangeHope.WebPage.PageRequest.GetInt("id");
     ShowShop.BLL.SystemInfo.Provinces bll = new ShowShop.BLL.SystemInfo.Provinces();
     Model.SystemInfo.Provinces model = bll.GetModel(id);
     if (model != null)
     {
         this.txtId.Value = model.Id.ToString();
         this.txtCityName.Text = model.CityName;
         this.txtCityEnglishName.Text = model.CityEnglishName;
         this.ckbIsUse.SelectedValue = model.IsUse.ToString();
         SetParentCity(ChangeHope.Common.StringHelper.StringToInt(model.ParentId.ToString()));
     }
     model = null;
     bll = null;
 }
        private void Save()
        {
            ShowShop.BLL.SystemInfo.Provinces bll = new ShowShop.BLL.SystemInfo.Provinces();
            Model.SystemInfo.Provinces model = new ShowShop.Model.SystemInfo.Provinces();
            try
            {
                model.AddDate = System.DateTime.Now;
                model.Child = 0;
                model.CityEnglishName = this.txtCityEnglishName.Text;
                model.CityName = this.txtCityName.Text;
                model.Depth = ChangeHope.Common.StringHelper.StringToInt(this.txtDepth.Value);
                model.Id = ChangeHope.Common.StringHelper.StringToInt(this.txtId.Value);
                model.IsUse = ChangeHope.Common.StringHelper.StringToInt(this.ckbIsUse.SelectedValue);

                model.ParentId = ChangeHope.Common.StringHelper.StringToInt(this.ddlParentId.SelectedValue);
                model.OrderID = bll.GetChildCount(model.ParentId.ToString());
                model.ParentPath = this.txtParentPath.Value;
                if (model.Id > 0)
                {
                    model.Child = bll.GetChildCount(model.Id.ToString());
                    bll.Update(model);
                }
                else
                {
                    this.txtId.Value = bll.Add(model).ToString();
                }
                model = null;
                bll = null;
                this.ltlMsg.Text = "保存成功!";
                this.pnlMsg.CssClass = "actionOk";
            }
            catch {
                this.ltlMsg.Text = "保存失败!";
                this.pnlMsg.CssClass = "actionErr";
            }
            finally {
                this.pnlMsg.Visible = true;
                model = null;
                bll = null;
            }
        }
 protected string AreaName(string IdStr)
 {
     string reStr = string.Empty;
     ShowShop.BLL.SystemInfo.Provinces bll = new ShowShop.BLL.SystemInfo.Provinces();
     DataTable dt = bll.ProvincesStr(IdStr);
     if (dt.Rows.Count>0)
     {
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             if (reStr != string.Empty)
             {
                 reStr += "," + dt.Rows[i]["CityName"].ToString();
             }
             else
             {
                 reStr = dt.Rows[i]["CityName"].ToString();
             }
         }
     }
     return reStr;
 }
Example #7
0
 public static string Provinces_Borough(string AddressID, string idstr)
 {
     StringBuilder shtml = new StringBuilder();
     if (!string.IsNullOrEmpty(idstr))
     {
         ShowShop.BLL.SystemInfo.Provinces pbll = new ShowShop.BLL.SystemInfo.Provinces();
         System.Data.SqlClient.SqlDataReader reader = pbll.GetChidNodeReader(idstr);
         if (reader != null)
         {
             shtml.Append("<select id=\"borough\" name=\"borough\">");
             while (reader.Read())
             {
                 if (reader["Id"].ToString() == AddressID)
                 {
                     shtml.Append("<option value=" + reader["Id"].ToString() + "  selected=\"selected\">" + reader["CityName"].ToString() + "</option> ");
                 }
                 else
                 {
                     shtml.Append("<option value=" + reader["Id"].ToString() + ">" + reader["CityName"].ToString() + "</option> ");
                 }
             }
             shtml.Append("</select>");
         }
         else
         {
             shtml.Append("<select id=\"borough\" name=\"borough\">");
             shtml.Append("</select>");
         }
     }
     else
     {
         shtml.Append("<select id=\"borough\" name=\"borough\">");
         shtml.Append("</select>");
     }
     return shtml.ToString();
 }
Example #8
0
 public static string Provincess2(string AddressID)
 {
     StringBuilder shtml = new StringBuilder();
     ShowShop.BLL.SystemInfo.Provinces pbll = new ShowShop.BLL.SystemInfo.Provinces();
     System.Data.SqlClient.SqlDataReader reader = pbll.GetChidNodeReader("0");
     if (reader != null)
     {
         shtml.Append("<select id=\"Provinces\" name=\"Provinces\" onchange='javascript:Province2(this.value)'>");
         shtml.Append("<option value='' selected>--请选择--</option>");
         while (reader.Read())
         {
             if (reader["Id"].ToString() == AddressID)
             {
                 shtml.Append("<option value=" + reader["Id"].ToString() + "  selected=\"selected\">" + reader["CityName"].ToString() + "</option> ");
             }
             else
             {
                 shtml.Append("<option value=" + reader["Id"].ToString() + ">" + reader["CityName"].ToString() + "</option> ");
             }
         }
         shtml.Append("</select>");
     }
     return shtml.ToString();
 }
Example #9
0
 public static bool UpdateCityInfo()
 {
     string cityId = string.Empty, substationInfos1 = string.Empty;
     cityId = HttpContext.Current.Request.QueryString["ConversionCity"];
     if (cityId == "0")
     {
         substationInfos1 = string.Format("0{0}总站{0}countrywide{0}1{0}", "$");
         return ChangeHope.Common.Cookies.updateCookies("Substation", substationInfos1,1440);
     }
     if (string.IsNullOrEmpty(cityId))
     {
         return false;
     }
     ShowShop.BLL.SystemInfo.Provinces B_Provinces = new ShowShop.BLL.SystemInfo.Provinces();
     ShowShop.Model.SystemInfo.Provinces listProvinces = B_Provinces.GetModel(int.Parse(cityId));
     if (listProvinces!=null)
     {
         substationInfos1 = string.Format(listProvinces.Id + "{0}" + listProvinces.CityName + "{0}" + listProvinces.CityEnglishName + "{0}" + listProvinces.IsUse + "{0}" + listProvinces.ParentPath, "$");
         return ChangeHope.Common.Cookies.updateCookies("Substation", substationInfos1,1440);
     }
     return false;
 }
Example #10
0
        ///// <summary>
        ///// 列表
        ///// </summary>
        ///// <returns></returns>
        protected string GetList()
        {
            ChangeHope.WebPage.Table table = new ChangeHope.WebPage.Table();
            ShowShop.BLL.SystemInfo.PostArea bll = new ShowShop.BLL.SystemInfo.PostArea();

            ChangeHope.DataBase.DataByPage dataPage=null;

            //从url获取配送方式ID
            idform = ChangeHope.WebPage.PageRequest.GetQueryInt("delivermode");
            this.HyperLink1.NavigateUrl = "deliver_edit.aspx?delivermode=" + idform.ToString();
            if (idform != 0 && idform != -1)
            {
                dataPage = bll.GetAreasByPostMethod(this.idform);

            }
            else
            {
                dataPage = bll.GetAreasByPostMethod(this.idform);
            }

            //第一步先添加表头
            table.AddHeadCol("5%", "序号");
            table.AddHeadCol("20%", "配送区域名称");
            table.AddHeadCol("18%", "配送方式");
            table.AddHeadCol("", "配送区域");
            table.AddHeadCol("", "发布人");
            table.AddHeadCol("10%", "操作");
            table.AddRow();
            //添加表的内容
            if (dataPage.DataReader != null)
            {
                int curpage = ChangeHope.WebPage.PageRequest.GetInt("pageindex");
                if (curpage < 0)
                {
                    curpage = 1;
                }
                int count = 0;
                while (dataPage.DataReader.Read())
                {
                    count++;
                    string No = (15 * (curpage - 1) + count).ToString();
                    table.AddCol(No);
                    table.AddCol(dataPage.DataReader["AreaName"].ToString());
                    //根据ID查询配送方式名称
                    ShowShop.BLL.SystemInfo.Deliver deliverbll = new ShowShop.BLL.SystemInfo.Deliver();
                    ShowShop.Model.SystemInfo.Deliver modeldeli = deliverbll.GetModelByID(int.Parse(dataPage.DataReader["DeliveryMode"].ToString()));
                    table.AddCol(modeldeli.Distributionname);
                    //根据ID查询城市名称
                    ShowShop.BLL.SystemInfo.Provinces areaid = new ShowShop.BLL.SystemInfo.Provinces();
                    ShowShop.Model.SystemInfo.Provinces modelpro;
                    string citys = "";
                    string[] arr = dataPage.DataReader["AreaId"].ToString().Split(',');
                    foreach(string i in arr)
                    {
                        modelpro=areaid.GetModel(int.Parse(i));
                        citys += modelpro.CityName + "&nbsp;&nbsp;";
                    }
                    table.AddCol(citys);
                    string userName = "";
                    if (dataPage.DataReader["putouttyid"].ToString() == "0")
                    {
                        userName = "******";
                    }
                    else
                    {
                        if (dataPage.DataReader["putoutid"].ToString() != "")
                        {
                            ShowShop.BLL.Member.MemberAccount memberbll = new ShowShop.BLL.Member.MemberAccount();
                            ShowShop.Model.Member.MemberAccount member = memberbll.GetModel(Convert.ToInt32(dataPage.DataReader["putoutid"].ToString()));
                            if (member != null)
                            {
                                userName = "******" + member.UserId.ToString();
                            }
                        }
                    }
                    table.AddCol(userName);
                    table.AddCol(string.Format("<a href=deliver_edit.aspx?delivermode={0}&areaid={1}>编辑</a> <a href='javascript:void(0)' onclick='Del({1})'>删除</a>", dataPage.DataReader["DeliveryMode"].ToString(), dataPage.DataReader["Id"].ToString()));
                    table.AddRow();
                }

            }
            string view = table.GetTable() + dataPage.PageToolBar;
            dataPage.Dispose();
            dataPage = null;
            return view;
        }
Example #11
0
        //td 2010-4-9
        private void GetReceaddress(int id)
        {
            try
            {
                ShowShop.BLL.Member.ReceAddress rbll = new ShowShop.BLL.Member.ReceAddress();
                ShowShop.Model.Member.ReceAddress model = rbll.GetModelByID(id);

                if (model != null)
                {
                    this.lblName.Text = model.UserName;
                    this.lblEmails.Text = model.Email;
                    this.lblAddresss.Text = model.Address;
                    this.lblZips.Text = model.Zip;
                    this.lblTel.Text = model.Phone;
                    this.lblModeil.Text = model.Mobile;
                    this.lblConig.Text = model.ConstructionSigns;
                    this.lblConTime.Text = model.ConsignesTime;
                    string address = "";
                    ShowShop.BLL.SystemInfo.Provinces pbll = new ShowShop.BLL.SystemInfo.Provinces();
                    ShowShop.Model.SystemInfo.Provinces pmodel = pbll.GetModel(int.Parse(model.Province));
                    if (pmodel != null)
                    {
                        address += pmodel.CityName + "&nbsp;&nbsp;";
                    }

                    pmodel = pbll.GetModel(int.Parse(model.City));
                    if (pmodel != null)
                    {
                        address+=pmodel.CityName+"&nbsp;&nbsp;";
                    }
                    pmodel = pbll.GetModel(int.Parse(model.Borough));
                    if (pmodel != null)
                    {
                        address += pmodel.CityName + "&nbsp;&nbsp;";
                    }
                    this.lblAdd.Text = address;
                }

            }
            catch { }
        }
Example #12
0
 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 SetParentCity(int id)
 {
     ShowShop.BLL.SystemInfo.Provinces bll = new ShowShop.BLL.SystemInfo.Provinces();
     Model.SystemInfo.Provinces model = bll.GetModel(id);
     if (model != null)
     {
         this.ddlParentId.Items.Clear();
         this.ddlParentId.Items.Add(new ListItem( model.CityName+"["+model.CityEnglishName+"]",model.Id.ToString()));
         this.txtDepth.Value= (ChangeHope.Common.StringHelper.StringToInt(model.Depth.ToString()) + 1).ToString();
         this.txtParentPath.Value = model.ParentPath + ","+id;
     }
     else
     {
         this.ddlParentId.Items.Clear();
         this.ddlParentId.Items.Add(new ListItem("省、自治区、直辖市", "0"));
         this.txtDepth.Value = "1";
         this.txtParentPath.Value = "0";
     }
     model = null;
     bll = null;
        this.returnLink.NavigateUrl="area_setting.aspx?w_d_parentid=" +id;
        this.returnLinkBottom.NavigateUrl = "area_setting.aspx?w_d_parentid=" + id;
 }