Exemplo n.º 1
0
        /// <summary>
        /// 绑定数据列表
        /// </summary>
        protected void BindListInfo()
        {
            int intRecordCount = 0;
            int ProvinceId     = Utils.GetInt(Request.QueryString["ProvinceID"], 0);
            int S_CityID       = Utils.GetInt(Request.QueryString["S_CityID"], 0);

            if (ProvinceId == 0)
            {
                //页面第一次加载的时候会根据销售城市绑定列表数据
                EyouSoft.Model.SystemStructure.SysCity cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(CityId);
                S_CityID = CityId;
                if (cityModel != null)
                {
                    ProvinceId = cityModel.ProvinceId;
                }
            }
            string CompanyName = Utils.InputText(Server.UrlDecode(Request.QueryString["CompanyName"])).Trim();

            #region 初始化查询条件
            this.ProvinceAndCityList1.SetProvinceId = Utils.GetInt(Request.QueryString["ProvinceID"], 0);
            this.ProvinceAndCityList1.SetCityId     = Utils.GetInt(Request.QueryString["S_CityID"], 0);;
            this.txt_CompanyName.Text = CompanyName;
            #endregion

            CurrencyPage = Utils.GetInt(Request.QueryString["Page"], 1);
            //实例化类的对象
            EyouSoft.IBLL.CompanyStructure.ISupplierInfo         Ibll      = EyouSoft.BLL.CompanyStructure.SupplierInfo.CreateInstance();
            IList <EyouSoft.Model.CompanyStructure.SupplierInfo> ModelList = Ibll.GetList(intPageSize, CurrencyPage, ref intRecordCount, CompanyName, ProvinceId, S_CityID, EyouSoft.Model.CompanyStructure.BusinessProperties.车队);
            if (ModelList != null && ModelList.Count > 0)
            {
                //绑定数据源
                this.rpt_CarListInfo.DataSource = ModelList;
                this.rpt_CarListInfo.DataBind();
                //绑定分页控件
                if (EyouSoft.Common.URLREWRITE.UrlReWriteUtils.IsReWriteUrl(Request))
                {
                    this.ExporPageInfoSelect1.Placeholder  = "#PageIndex#";
                    this.ExporPageInfoSelect1.IsUrlRewrite = true;
                    this.ExporPageInfoSelect1.PageLinkURL  = EyouSoft.Common.URLREWRITE.UrlReWriteUtils.GetUrlForPage(Request) + "_#PageIndex#";
                }
                else
                {
                    this.ExporPageInfoSelect1.PageLinkURL = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?";
                    this.ExporPageInfoSelect1.UrlParams   = Request.QueryString;
                }
                this.ExporPageInfoSelect1.intPageSize          = intPageSize;//每页显示记录数
                this.ExporPageInfoSelect1.intRecordCount       = intRecordCount;
                this.ExporPageInfoSelect1.CurrencyPage         = CurrencyPage;
                this.ExporPageInfoSelect1.CurrencyPageCssClass = "RedFnt";

                this.ExporPageInfoSelect1.LinkType = 3;
            }
            //释放资源
            ModelList = null;
            Ibll      = null;
        }
Exemplo n.º 2
0
        /// <summary>
        /// 绑定数据列表
        /// </summary>
        protected void BindListInfo()
        {
            int intRecordCount = 0;
            int ProvinceId     = Utils.GetInt(Request.QueryString["ProvinceID"], 0);
            int S_CityID       = Utils.GetInt(Request.QueryString["S_CityID"], 0);

            if (ProvinceId == 0)
            {
                //页面第一次加载的时候会根据销售城市绑定列表数据
                EyouSoft.Model.SystemStructure.SysCity cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(CityId);
                S_CityID = CityId;
                if (cityModel != null)
                {
                    ProvinceId = cityModel.ProvinceId;
                }
            }
            string CompanyName = Utils.InputText(Server.UrlDecode(Request.QueryString["CompanyName"])).Trim();

            #region 初始化查询条件
            this.ProvinceAndCityList1.SetProvinceId = Utils.GetInt(Request.QueryString["ProvinceID"], 0);
            this.ProvinceAndCityList1.SetCityId     = Utils.GetInt(Request.QueryString["S_CityID"], 0);
            this.txt_CompanyName.Text = CompanyName;
            #endregion

            CurrencyPage = Utils.GetInt(Request.QueryString["Page"], 1);
            //实例化类的对象
            EyouSoft.IBLL.CompanyStructure.ISupplierInfo         Ibll      = EyouSoft.BLL.CompanyStructure.SupplierInfo.CreateInstance();
            IList <EyouSoft.Model.CompanyStructure.SupplierInfo> ModelList = Ibll.GetList(intPageSize, CurrencyPage, ref intRecordCount, CompanyName, ProvinceId, S_CityID, EyouSoft.Model.CompanyStructure.BusinessProperties.购物店);
            if (ModelList != null && ModelList.Count > 0)
            {
                //绑定数据源
                this.rpt_CarListInfo.DataSource = ModelList;
                this.rpt_CarListInfo.DataBind();
                //绑定分页控件
                this.ExporPageInfoSelect1.intPageSize          = intPageSize;//每页显示记录数
                this.ExporPageInfoSelect1.intRecordCount       = intRecordCount;
                this.ExporPageInfoSelect1.CurrencyPage         = CurrencyPage;
                this.ExporPageInfoSelect1.CurrencyPageCssClass = "RedFnt";
                this.ExporPageInfoSelect1.UrlParams            = Request.QueryString;
                this.ExporPageInfoSelect1.PageLinkURL          = "ShoppingListPage.aspx?";
                this.ExporPageInfoSelect1.LinkType             = 3;
            }
            //释放资源
            ModelList = null;
            Ibll      = null;
        }