/// <summary> /// 初始化 /// </summary> private void DataInit() { BComSetting comSettingBll = new BComSetting(); YKQRDPrintUri = comSettingBll.GetPrintUri(CurrentUserCompanyID, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.其他预控确认单); #region 分页参数 int pageSize = 20; int pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); int recordCount = 0; #endregion #region 查询实体 var queryModel = new MSourceSueOtherSearch(); queryModel.CompanyId = CurrentUserCompanyID; //支出类别 queryModel.TypeName = Utils.GetQueryStringValue("rType"); //其他公司名称 queryModel.SourceName = Utils.GetQueryStringValue("tavName"); //有效时间--始 queryModel.StartTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("dateTimeS")); //有效时间--终 queryModel.EndTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("dateTimeE")); #endregion var ls = new BSourceControl().GetListSueOther(pageIndex, pageSize, ref recordCount, queryModel); if (ls != null && ls.Count > 0) { pan_Msg.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); BindPage(pageSize, pageIndex, recordCount); } ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize; }
/// <summary> /// 列表数据初始化 /// </summary> /// <param name="searchModel"></param> private void ListDataInit(string provice, string city, string name, string tourid) { EyouSoft.BLL.SourceStructure.BSourceControl bsource = new BSourceControl(); pageIndex = Utils.GetInt(Request.QueryString["Page"], 1); var ms = new MSourceSueOtherSearch(); ms.CompanyId = this.SiteUserInfo.CompanyId; ms.OperatorId = this.SiteUserInfo.UserId; ms.SourceName = name; ms.ProvinceId = Utils.GetInt(provice); ms.CityId = Utils.GetInt(city); ms.DistrictId = Utils.GetInt(Utils.GetQueryStringValue("area")); var list = bsource.GetListSueOther(pageIndex, this.pageSize, ref pageCount, tourid, this.SiteUserInfo.UserId, ms); if (list != null) { if (list.Count > 0) { recordCount = list.Count; this.RepList.DataSource = list; this.RepList.DataBind(); BindPage(); } else { this.RepList.Controls.Add(new Label() { Text = "<tr><td colspan='9' align='center'>未找到相关其他预控,建议您修改相关查询条件后再查询!</td></tr>" }); ExporPageInfoSelect1.Visible = false; } } else { this.RepList.Controls.Add(new Label() { Text = "<tr><td colspan='9' align='center'>未找到相关其他预控,建议您修改相关查询条件后再查询!</td></tr>" }); ExporPageInfoSelect1.Visible = false; } }
/// <summary> /// 分页获取其他预控信息(计调安排时调用) /// </summary> /// <param name="pageCurrent">当前页</param> /// <param name="pageSize">每页显示记录数</param> /// <param name="pageCount">总记录数</param> /// <param name="tourid">团队编号</param> /// <param name="operatorId">计调员</param> /// <param name="search">搜索实体</param> /// <returns>其他集合</returns> public IList <MSourceSueOther> GetListSueOther(int pageCurrent, int pageSize, ref int pageCount, string tourid, string operatorId, MSourceSueOtherSearch search) { IList <MSourceSueOther> list = null; if (pageCurrent <= 0) { pageCurrent = 1; } if (!string.IsNullOrEmpty(tourid) && !string.IsNullOrEmpty(operatorId) && search != null && !string.IsNullOrEmpty(search.CompanyId)) { list = dal.GetListSueOther(pageCurrent, pageSize, ref pageCount, tourid, operatorId, search); } return(list); }