private void queryPolicySetting(Pagination pagination) { try { var queryList = PolicyManageService.GetPolicySettings(getCondition(), pagination); var list = from item in queryList select new { Id = item.Id, Airline = item.Airline, //出发城市 Departure = item.Departure, //到达城市 Arrival = item.Arrivals, // VoyageType = item.VoyageType.GetDescription(), Commission = GetCommisson(item.Periods), Berths = item.Berths, EffectiveTime = item.EffectiveTimeStart.ToShortDateString() + "<br />" + item.EffectiveTimeEnd.ToShortDateString(), Creator = item.Creator, LastModifyTime = item.LastModifyTime, Remark = item.Remark }; this.dataSource.DataSource = list; this.dataSource.DataBind(); if (pagination.RowCount > 0) { this.pager.Visible = true; emptyDataInfo.Visible = false; if (pagination.GetRowCount) { this.pager.RowCount = pagination.RowCount; } dataSource.HeaderRow.TableSection = TableRowSection.TableHeader; } else { this.pager.Visible = false; emptyDataInfo.Visible = true; } } catch (Exception ex) { ShowExceptionMessage(ex, "查询"); } }