/// <summary> /// 获的所有的销售城市 /// </summary> protected void GetAllSaleCity() { StringBuilder strAllCity = new StringBuilder(); IList <EyouSoft.Model.SystemStructure.SysProvince> ProvinceList = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance().GetProvinceList(); if (ProvinceList != null && ProvinceList.Count > 0) { EyouSoft.IBLL.SystemStructure.ISysCity Citybll = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance(); foreach (EyouSoft.Model.SystemStructure.SysProvince Province in ProvinceList) { IList <EyouSoft.Model.SystemStructure.SysCity> Citylist; string isAll = Utils.GetQueryStringValue("isall"); if (isAll == "yes") { Citylist = Citybll.GetSysCityList(Province.ProvinceId, null); } else { Citylist = Citybll.GetSaleCity(null, new int[] { Province.ProvinceId }); } if (Citylist != null && Citylist.Count > 0) { strAllCity.Append("<tr bgcolor=\"#DBF7FD\" >"); strAllCity.Append("<td align=\"center\">"); strAllCity.AppendFormat("<input type=\"checkbox\" name='ckProvince' id=\"ckAllCity_{1}\" onclick=\"OtherAllSaleCity.ckAllProvinceCity(this);\"/><label for=\"ckAllCity_{1}\" style=\"cursor:pointer\">{0}</label>:", Province.ProvinceName, Province.ProvinceId); strAllCity.Append("</td>"); strAllCity.Append("<td align=\"left\" bgcolor=\"#FFFFFF\">"); string allCity = ""; int Count = 0; foreach (EyouSoft.Model.SystemStructure.SysCity City in Citylist) { allCity += string.Format("<input id=\"thisCity_{0}\" type=\"checkbox\" value=\"{0}\" name=\"checkbox_Area\" /><label for=\"thisCity_{0}\" style=\"cursor:pointer\">{1}</label> ", City.CityId, City.CityName); Count++; if (Count != 0 && Count % 8 == 0) { allCity += "<br/>"; } } strAllCity.Append(allCity); strAllCity.Append("</td>"); strAllCity.Append("</tr>"); } Citylist = null; } Citybll = null; } ProvinceList = null; strAllCityList = strAllCity.ToString(); }
/// <summary> /// 获取目的地地接社城市列表 /// </summary> private void InitCityList() { StringBuilder str = new StringBuilder(); string tmp = string.Empty; EyouSoft.IBLL.SystemStructure.ISysCity bll = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance(); IList <EyouSoft.Model.SystemStructure.SysCity> list = bll.GetSysCityList(ProvinceID, null); if (list != null && list.Count > 0) { foreach (EyouSoft.Model.SystemStructure.SysCity model in list) { if (RequestCityID == 0) { tmp = string.Format("<li id=\"cityID_0\"><a class=\"dijieshechengon\" href=\"" + EyouSoft.Common.URLREWRITE.Tour.GetLocalAgencyListUrl(model.ProvinceId, CityId) + "\"><nobr>{1}:</nobr></a></li>", model.ProvinceId, model.ProvinceName); //tmp = string.Format("<li id=\"cityID_0\"><a class=\"dijieshechengon\" href=\"" + Utils.GeneratePublicCenterUrl("/RouteManage/LocalAgencyList.aspx?ProvinceID={0}", CityId) + "\"><nobr>{1}:</nobr></a></li>", model.ProvinceId, model.ProvinceName); } else { tmp = string.Format("<li id=\"cityID_0\"><a href=\"" + EyouSoft.Common.URLREWRITE.Tour.GetLocalAgencyListUrl(model.ProvinceId, CityId) + "\"><nobr>{1}:</nobr></a></li>", model.ProvinceId, model.ProvinceName); //tmp = string.Format("<li id=\"cityID_0\"><a href=\"" + Utils.GeneratePublicCenterUrl("/RouteManage/LocalAgencyList.aspx?ProvinceID={0}", CityId) + "\"><nobr>{1}:</nobr></a></li>", model.ProvinceId, model.ProvinceName); } if (model.CityId == RequestCityID) { str.AppendFormat("<li id=\"cityID_{0}\"><a class=\"dijieshechengon\" href=\"" + EyouSoft.Common.URLREWRITE.Tour.GetLocalAgencyListUrl(model.ProvinceId, model.CityId, CityId) + "\"><nobr>{2}</nobr></a></li>", model.CityId, model.ProvinceId, model.CityName); //str.AppendFormat("<li id=\"cityID_{0}\"><a class=\"dijieshechengon\" href=\"" + Utils.GeneratePublicCenterUrl("/RouteManage/LocalAgencyList.aspx?ProvinceID={1}&RequestCityID={0}", CityId) + "\"><nobr>{2}</nobr></a></li>", model.CityId, model.ProvinceId, model.CityName); } else { str.AppendFormat("<li id=\"cityID_{0}\"><a href=\"" + EyouSoft.Common.URLREWRITE.Tour.GetLocalAgencyListUrl(model.ProvinceId, model.CityId, CityId) + "\"><nobr>{2}</nobr></a></li>", model.CityId, model.ProvinceId, model.CityName); //str.AppendFormat("<li id=\"cityID_{0}\"><a href=\"" + Utils.GeneratePublicCenterUrl("/RouteManage/LocalAgencyList.aspx?ProvinceID={1}&RequestCityID={0}", CityId) + "\"><nobr>{2}</nobr></a></li>", model.CityId, model.ProvinceId, model.CityName); } } } list = null; bll = null; if (str.ToString() != string.Empty) { strCityList = tmp + str.ToString(); } }
/// <summary> /// 获的所有的销售城市 /// </summary> protected void GetAllSaleCity() { int Index = EyouSoft.Common.Utils.GetInt(Request.QueryString["Index"]); string strUrl = "/Default.aspx"; switch (Index) { case 2: strUrl = "/RouteManage/Default.aspx"; break; case 3: strUrl = "/PlaneInfo/PlaneListPage.aspx"; break; case 4: strUrl = "/ScenicManage/ScenicDefalut.aspx"; break; case 5: strUrl = "/HotelManage/Default.aspx"; break; case 6: strUrl = "/CarInfo/CarListPage.aspx"; break; case 7: strUrl = "/TravelManage/TravelDefault.aspx"; break; case 8: strUrl = "/ShoppingInfo/ShoppingListPage.aspx"; break; case 9: strUrl = "/SupplierInfo/SupplierInfo.aspx"; break; } StringBuilder strAllCity = new StringBuilder(); IList <EyouSoft.Model.SystemStructure.SysProvince> ProvinceList = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance().GetProvinceList(); if (ProvinceList != null && ProvinceList.Count > 0) { EyouSoft.IBLL.SystemStructure.ISysCity Citybll = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance(); foreach (EyouSoft.Model.SystemStructure.SysProvince Province in ProvinceList) { IList <EyouSoft.Model.SystemStructure.SysCity> Citylist = Citybll.GetSysCityList(Province.ProvinceId, null); if (Citylist != null && Citylist.Count > 0) { strAllCity.Append("<tr>"); strAllCity.Append("<td align=\"left\" style=\"border-bottom: 1px dashed rgb(238, 238, 238);\">"); strAllCity.AppendFormat("<h3>{0}:", Province.ProvinceName); string allCity = ""; int Count = 0; Citylist = (Citylist.OrderByDescending(pet => pet.IsEnabled)).ToList(); foreach (EyouSoft.Model.SystemStructure.SysCity City in Citylist) { if (Count != 0 && Count % 7 == 0) { allCity += "<br/> "; } string Enabledstyle = ""; if (!City.IsEnabled) { Enabledstyle = "style='color:#6E90B6'"; } allCity += string.Format("<nobr><a href=\"{0}\" nowrap=\"nowrap\" {2}>{1}</a></nobr> <span style='color:#eeeeee'>|</span> ", SubStation.CityUrlRewrite(City),//strUrl + "?CityId=" + City.CityId + "&isCut=1", City.CityName, Enabledstyle); Count++; } if (allCity != "") { allCity = allCity.Substring(0, allCity.Length - 9); } strAllCity.Append(allCity); strAllCity.Append("</h3>"); strAllCity.Append("</td>"); strAllCity.Append("</tr>"); } Citylist = null; } Citybll = null; } ProvinceList = null; strAllCityList = strAllCity.ToString(); }