/// <summary> /// 初使化 /// </summary> private void DataInit() { //初使化条件 pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); //获取查询省份 province = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetQueryStringValue("province")); //获取查询城市 city = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetQueryStringValue("city")); //获取查询名称 unionName = EyouSoft.Common.Utils.GetQueryStringValue("unionName"); //初始化List IList <EyouSoft.Model.CompanyStructure.CompanySupplier> list = null; //分页获取数据 list = csBll.GetList(pageSize, pageIndex, ref recordCount, EyouSoft.Model.EnumType.CompanyStructure.SupplierType.地接, province, city, unionName, this.CurrentUserCompanyID); //获取记录条数 len = list.Count; //绑定数据 this.rptList.DataSource = list; this.rptList.DataBind(); //设置分页 BindPage(); EyouSoft.Model.CompanyStructure.MSupplierSearchInfo searchModel = new EyouSoft.Model.CompanyStructure.MSupplierSearchInfo(); if (city != 0) { searchModel.CityId = city; } if (province != 0) { searchModel.ProvinceId = province; } searchModel.Name = unionName; this.lblAllCount.Text = new EyouSoft.BLL.CompanyStructure.CompanySupplier().GetTimesGYSSummary(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.SupplierType.地接, searchModel).ToString(); this.ucProvince1.ProvinceId = province; this.ucCity1.CityId = city; this.ucCity1.ProvinceId = province; }
/// <summary> /// /// </summary> protected void DataInit(string djName) { EyouSoft.Model.EnumType.CompanyStructure.SupplierType sType = EyouSoft.Model.EnumType.CompanyStructure.SupplierType.地接; if (Utils.GetInt(Utils.GetQueryStringValue("sType"), 0) == 5) { sType = EyouSoft.Model.EnumType.CompanyStructure.SupplierType.票务; lbSupplerTypeName.InnerText = "票务名称:"; } if (Utils.GetInt(Utils.GetQueryStringValue("sType"), 0) == 4) { sType = EyouSoft.Model.EnumType.CompanyStructure.SupplierType.保险; lbSupplerTypeName.InnerText = "保险名称:"; } if (Utils.GetInt(Utils.GetQueryStringValue("sType"), 0) == 7) { sType = EyouSoft.Model.EnumType.CompanyStructure.SupplierType.购物; lbSupplerTypeName.InnerText = "购物名称:"; } if (Utils.GetInt(Utils.GetQueryStringValue("sType"), 0) == 3) { sType = EyouSoft.Model.EnumType.CompanyStructure.SupplierType.景点; lbSupplerTypeName.InnerText = "景点名称:"; } if (Utils.GetInt(Utils.GetQueryStringValue("sType"), 0) == 1) { sType = EyouSoft.Model.EnumType.CompanyStructure.SupplierType.酒店; lbSupplerTypeName.InnerText = "酒店名称:"; } if (Utils.GetInt(Utils.GetQueryStringValue("sType"), 0) == 9) { sType = EyouSoft.Model.EnumType.CompanyStructure.SupplierType.其他; lbSupplerTypeName.InnerText = "其它名称:"; } if (Utils.GetInt(Utils.GetQueryStringValue("sType"), 0) == 8) { sType = EyouSoft.Model.EnumType.CompanyStructure.SupplierType.车队; lbSupplerTypeName.InnerText = "车队名称:"; } if (Utils.GetInt(Utils.GetQueryStringValue("sType"), 0) == 2) { sType = EyouSoft.Model.EnumType.CompanyStructure.SupplierType.餐馆; lbSupplerTypeName.InnerText = "餐馆名称:"; } //声明操作对象 EyouSoft.BLL.CompanyStructure.CompanySupplier bll = new EyouSoft.BLL.CompanyStructure.CompanySupplier(); //查询地接社数据,获得列表list IList <EyouSoft.Model.CompanyStructure.CompanySupplier> list = bll.GetList(pageSize, pageIndex, ref recordCount, sType, 0, 0, djName, this.CurrentUserCompanyID); if (list != null && list.Count > 0) { this.rptList.DataSource = list; this.rptList.DataBind(); //设置分页 BindPage(); } else { //没有数据时隐藏分页控件 并 提示信息 this.ExportPageInfo1.Visible = false; this.lblMsg.Text = "没有找到相关信息!"; } }