コード例 #1
0
 private void queryDefaultPolicy(Pagination pagination)
 {
     try{
         var queryList = PolicyManageService.GetDefaultPolicies(getCondition(), pagination);
         var list      = from item in queryList
                         select new
         {
             Airline = item.Airline,
             AdultProviderAbbreviateName = item.AdultProviderAbbreviateName,
             AdultCommission             = double.Parse((item.AdultCommission * 100).ToString()).ToString() + "%",
             ChildProviderAbbreviateName = item.ChildProviderAbbreviateName,
             ChildCommission             = double.Parse((item.ChildCommission * 100).ToString()).ToString() + "%"
         };
         this.dataSource.DataSource = list;
         this.dataSource.DataBind();
         if (pagination.RowCount > 0)
         {
             this.pager.Visible         = true;
             this.emptyDataInfo.Visible = false;
             if (pagination.GetRowCount)
             {
                 this.pager.RowCount = pagination.RowCount;
             }
             dataSource.HeaderRow.TableSection = TableRowSection.TableHeader;
         }
         else
         {
             this.pager.Visible         = false;
             this.emptyDataInfo.Visible = true;
         }
     }
     catch (Exception ex)
     {
         ShowExceptionMessage(ex, "查询");
     }
 }