Пример #1
0
        private void BindSingleServeList()
        {
            #region 获取参数
            //获取页码
            if (Utils.GetInt(Request.QueryString["Page"]) > 1)
            {
                PageIndex = Utils.GetInt(Request.QueryString["Page"]);
            }
            OrderNo         = Utils.InputText(Request.QueryString["OrderNo"]); //订单号
            TourCode        = Utils.GetQueryStringValue("TourCode");           //团号
            OrderStartTime  = Utils.GetDateTimeNullable(Request.QueryString["OrderStartTime"]);
            OrderEndTime    = Utils.GetDateTimeNullable(Request.QueryString["OrderEndTime"]);
            Operator        = Request.QueryString["Operator"];                         //操作员
            CustomerCompany = Utils.InputText(Request.QueryString["CustomerCompany"]); //客户单位
            EyouSoft.Model.TourStructure.TourSingleSearchInfo model = new EyouSoft.Model.TourStructure.TourSingleSearchInfo();
            #endregion

            #region 查询Model赋值
            model.OperatorId = Utils.ConvertToIntArray(Utils.InputText(Request.QueryString["OperatorId"]));
            model.OrderSTime = OrderStartTime;  //下单开始日期
            model.OrderETime = OrderEndTime;    //下单结束日期
            model.BuyerCName = CustomerCompany; //客户单位名称
            model.OrderCode  = OrderNo;         //订单号
            model.TourCode   = TourCode;        //团号
            #endregion

            IList <EyouSoft.Model.TourStructure.LBSingleTourInfo> list = tourBll.GetToursSingle(this.SiteUserInfo.CompanyID, PageSize, PageIndex, ref RecordCount, model);
            if (list != null && list.Count > 0)
            {
                //调用获取列表集合的方法
                this.tbl_ExportPage.Visible         = true;
                this.crp_SingleServeList.DataSource = list;
                this.crp_SingleServeList.DataBind();
                // 绑定分页控件
                BindPage();
            }
            else
            {
                this.tbl_ExportPage.Visible        = false;
                this.crp_SingleServeList.EmptyText = "<tr><td height='30px' bgcolor='#e3f1fc' colspan='10' align='center'>暂时没有数据!</td></tr>";
            }
            //释放资源
            list    = null;
            model   = null;
            tourBll = null;
        }