Ejemplo n.º 1
0
        void Bind()
        {
            EyouSoft.BLL.RouteStructure.Route bll = new EyouSoft.BLL.RouteStructure.Route(SiteUserInfo);
            int count = 0;

            EyouSoft.Model.RouteStructure.RouteSearchInfo search = new EyouSoft.Model.RouteStructure.RouteSearchInfo();
            if (Utils.GetQueryStringValue("xlid") != "")
            {
                search.AreaId = Utils.GetInt(Utils.GetQueryStringValue("xlid"));
            }
            search.RSDate = Utils.GetDateTimeNullable(Utils.GetFormValue(txt_date.UniqueID));
            string xlname = Utils.GetFormValue(txt_xianluName.UniqueID);

            if (xlname != "")
            {
                search.RouteName = xlname;
            }
            IList <EyouSoft.Model.RouteStructure.RouteBaseInfo> list = new
                                                                       List <EyouSoft.Model.RouteStructure.RouteBaseInfo>();

            if (Utils.GetQueryStringValue("publishtype") != "")
            {
                ///快速
                if (Utils.GetInt(Utils.GetQueryStringValue("publishtype")) == 1)
                {
                    list = bll.GetQuickRoutes(CurrentUserCompanyID, 20, EyouSoft.Common.Utils.GetInt(Request.QueryString["page"], 1), ref count, search);
                }
                if (Utils.GetInt(Utils.GetQueryStringValue("publishtype")) == 2)
                {
                    list = bll.GetNormalRoutes(CurrentUserCompanyID, 20, EyouSoft.Common.Utils.GetInt(Request.QueryString["page"], 1), ref count, search);
                }
                if (Utils.GetInt(Utils.GetQueryStringValue("publishtype")) == 3)
                {
                    list = bll.GetRoutes(CurrentUserCompanyID, 20, EyouSoft.Common.Utils.GetInt(Request.QueryString["page"], 1), ref count, search);
                }
                if (Utils.GetInt(Utils.GetQueryStringValue("publishtype")) == 4)
                {
                    list = bll.GetRoutes(SiteUserInfo.CompanyID, 20, EyouSoft.Common.Utils.GetInt(Request.QueryString["page"], 1), ref count, search);
                }
            }
            rptList.DataSource = list;
            rptList.DataBind();
            ExporPageInfoSelect1.intPageSize    = 20;
            ExporPageInfoSelect1.intRecordCount = count;
            ExporPageInfoSelect1.PageLinkURL    = Request.Path + "?";
            ExporPageInfoSelect1.UrlParams      = Request.QueryString;
            ExporPageInfoSelect1.CurrencyPage   = EyouSoft.Common.Utils.GetInt(Request.QueryString["page"], 1);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 绑定线路列表
        /// </summary>
        protected void BindInitLineProducts(int?AreaID, string LineName, DateTime?StartTime, DateTime?EndTime, int?DateNumber, string Author)
        {
            EyouSoft.Model.RouteStructure.RouteSearchInfo ModelRouteSearch = new EyouSoft.Model.RouteStructure.RouteSearchInfo();
            //线路区域编号
            ModelRouteSearch.AreaId = AreaID;
            //线路名称
            ModelRouteSearch.RouteName = LineName;
            //发布截止时间
            ModelRouteSearch.REDate = EndTime;
            //线路天数
            ModelRouteSearch.RouteDays = DateNumber;
            //发布起始时间
            ModelRouteSearch.RSDate = StartTime;
            //发布人姓名
            ModelRouteSearch.OperatorName = Author;

            //线路筛选
            if (Request.QueryString["xlid"] != "" && Request.QueryString["xlid"] != null)
            {
                ModelRouteSearch.AreaId = Utils.GetInt(Utils.GetQueryStringValue("xlid"));
            }
            //线路库业务逻辑类
            EyouSoft.BLL.RouteStructure.Route RouteList = new EyouSoft.BLL.RouteStructure.Route(SiteUserInfo);
            IList <EyouSoft.Model.RouteStructure.RouteBaseInfo> RouteLists = RouteList.GetRoutes(SiteUserInfo.CompanyID, PageSize, PageIndex, ref RecordCount, ModelRouteSearch);

            if (RouteLists != null && RouteLists.Count > 0)
            {
                this.LineProductList.DataSource = RouteLists;
                this.LineProductList.DataBind();
                BinPage();
            }
            else
            {
                this.LinePro_ExportPageInfo1.Visible = false;
            }
            RouteList        = null;
            RouteLists       = null;
            ModelRouteSearch = null;
        }