protected void Page_Load(object sender, EventArgs e) { StringBuilder strBuilder = new StringBuilder(); EyouSoft.BLL.CompanyStructure.Province pBll = new EyouSoft.BLL.CompanyStructure.Province(); IList <EyouSoft.Model.CompanyStructure.Province> list = pBll.GetHasFavCityProvince(CompanyId); strBuilder.AppendFormat("<option value=\"0\">请选择</option>"); if (list != null && list.Count > 0) { foreach (EyouSoft.Model.CompanyStructure.Province p in list) { if (p.Id == ProvinceId) { strBuilder.AppendFormat("<option value=\"{0}\" selected=\"selected\">{1}</option>", p.Id, p.ProvinceName); continue; } strBuilder.AppendFormat("<option value=\"{0}\">{1}</option>", p.Id, p.ProvinceName); } } provinceHtml = strBuilder.ToString(); }
/// <summary> /// 页面加载 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1); if (!IsPostBack) { #region ajax获取省份城市 if (Utils.GetQueryStringValue("act") == "getprovince") { Response.Clear(); EyouSoft.BLL.CompanyStructure.Province pBll = new EyouSoft.BLL.CompanyStructure.Province(); IList <EyouSoft.Model.CompanyStructure.Province> listProvince = pBll.GetHasFavCityProvince(SiteUserInfo.CompanyID); Response.Write(JsonConvert.SerializeObject(listProvince)); Response.End(); } if (Utils.GetQueryStringValue("act") == "getcity") { Response.Clear(); EyouSoft.BLL.CompanyStructure.City pBll = new EyouSoft.BLL.CompanyStructure.City(); IList <EyouSoft.Model.CompanyStructure.City> listCity = pBll.GetList(SiteUserInfo.CompanyID, Utils.GetInt(Utils.GetQueryStringValue("provinceId")), true); Response.Write(JsonConvert.SerializeObject(listCity)); Response.End(); } #endregion #region ajax修改状态 by txb 2011.8.4 if (Request.QueryString["act"] == "changeStatus") { EyouSoft.BLL.TourStructure.Tour bll = new Tour(SiteUserInfo); int result = bll.SetTourRouteStatus((TourStructure.TourRouteStatus)Utils.GetInt(Utils.GetFormValue("status")), Utils.GetFormValue("tourid").Split(',')); if (result > 0) { Response.Write("yes"); } else { Response.Write("no"); } Response.End(); } #endregion #region 绑定信息、列表 if (Request.QueryString["act"] == "updatenum") { EyouSoft.BLL.TourStructure.Tour bll = new Tour(); if (bll.SetTourVirtualPeopleNumber(Request["tourid"], Utils.GetInt(Request["num"])) > 0) { Response.Clear(); Response.Write("yes"); } else { Response.Clear(); Response.Write("no"); } Response.End(); return; } if (CheckGrant(TravelPermission.散拼计划_散拼计划_栏目)) { //Utils.ResponseNoPermit(TravelPermission.散拼计划_散拼计划_栏目, false); } else { Utils.ResponseNoPermit(TravelPermission.散拼计划_散拼计划_栏目, false); } selectXianlu1.userId = SiteUserInfo.ID; selectXianlu1.curCompany = CurrentUserCompanyID; selectXianlu1.Url = Request.Url.ToString(); BindList(); #endregion //城市ID状态 cityState = Utils.GetQueryStringValue("CityID"); int cityId = 0; int proId = 0; if (Utils.GetQueryStringValue("provinceId") == "") { //默认为浙江省 proId = 67; //取得浙江省下第一个城市 EyouSoft.BLL.CompanyStructure.City pBll = new EyouSoft.BLL.CompanyStructure.City(); IList <EyouSoft.Model.CompanyStructure.City> listCity = pBll.GetList(SiteUserInfo.CompanyID, proId, true); if (listCity != null && listCity.Count > 0) { cityId = listCity[0].Id; } } else { cityId = Utils.GetInt(Utils.GetQueryStringValue("CityID")); proId = Utils.GetInt(Utils.GetQueryStringValue("provinceId")); } //城市ID CityDataInit(proId, cityId); string act = Utils.GetQueryStringValue("act"); if (act.Length > 0) { switch (act) { case "HandStatus": string hs = Utils.GetQueryStringValue("hs"); if (hs.Length > 0) { switch (hs) { case "mk": HandStatusUp(TourStructure.HandStatus.手动客满); break; case "ts": HandStatusUp(TourStructure.HandStatus.手动停收); break; default: HandStatusUp(TourStructure.HandStatus.无); break; } } break; } } } }