コード例 #1
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitPage()
        {
            EyouSoft.Model.CompanyStructure.QueryParamsAllCompany QueryModel = new EyouSoft.Model.CompanyStructure.QueryParamsAllCompany();
            if (Request.QueryString["Province"] != null)
            {
                QueryModel.PorvinceId = Utils.GetInt(Request.QueryString["Province"]);
                ProvinceAndCityList1.SetProvinceId = QueryModel.PorvinceId;
            }
            else
            {
                QueryModel.PorvinceId = 0;
            }
            if (Request.QueryString["City"] != null)
            {
                QueryModel.CityId = Utils.GetInt(Request.QueryString["City"]);
                ProvinceAndCityList1.SetCityId = QueryModel.CityId;
            }
            else
            {
                QueryModel.CityId = 0;
            }
            AeraID = Utils.GetQueryStringValue("AeraID");
            if (Utils.GetInt(AeraID) > 0)
            {
                QueryModel.AreaId = Utils.GetInt(AeraID);
            }
            intPageIndex           = Utils.GetInt(Request.QueryString["Page"], 1);
            CompanyName            = Utils.GetQueryStringValue("CompanyName");
            QueryModel.CompanyName = CompanyName;
            QueryModel.CompanyType = Utils.GetQueryStringValue("comType") == "1" ? EyouSoft.Model.CompanyStructure.CompanyType.专线 : EyouSoft.Model.CompanyStructure.CompanyType.地接;
            EyouSoft.IBLL.CompanyStructure.ICompanyInfo Ibll = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();

            IList <EyouSoft.Model.CompanyStructure.CompanyInfo> lists = Ibll.GetListTourAgency(QueryModel, intPageSize, intPageIndex, ref intRecordCount);//(QueryModel, intPageSize, intPageIndex, ref intRecordCount);

            rptQueryTour.DataSource = lists;
            rptQueryTour.DataBind();
            this.ExportPageInfo1.intPageSize    = intPageSize;
            this.ExportPageInfo1.intRecordCount = intRecordCount;
            this.ExportPageInfo1.CurrencyPage   = intPageIndex;
            this.ExportPageInfo1.PageLinkURL    = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?";
            this.ExportPageInfo1.UrlParams      = Request.QueryString;
            if (rptQueryTour.Items.Count < 1)
            {
                Literal1.Text = "暂无" + QueryModel.CompanyType.ToString() + "可以选择!";
            }
            Ibll       = null;
            lists      = null;
            QueryModel = null;
            lists      = null;
        }