예제 #1
0
 private void QueryApplyForm(Pagination pagination)
 {
     try {
         var orderInfos = OrderQueryService.QueryCredentialsUpdateInfos(getCondition(), pagination);
         dataList.DataSource = orderInfos.Select(order =>
                                                 new
         {
             order.OrderId,
             PNR         = order.PNR == null ? string.Empty : order.PNR.ToListString(),
             AirportPair = order.Flights.Join("<br />", f => f.DepartureCity + "-" + f.ArrivalCity),
             FlightInfo  = order.Flights.Join("<br />",
                                              f => string.Format(
                                                  "{0}{1}<br />{2} / {3}",
                                                  f.Carrier,
                                                  f.FlightNo,
                                                  string.IsNullOrEmpty(f.Bunk) ? "-" : f.Bunk,
                                                  getDiscountText(f.Discount))),
             TakeoffTime = order.Flights.Join("<br />", f => f.TakeoffTime.ToString("yyyy-MM-dd<br />HH:mm")),
             order.Passenger,
             order.PassengerName,
             CommitTime = order.CommitTime.ToString("yyyy-MM-dd<br />HH:mm"),
             order.PurchaserName,
             order.OriginalCredentials,
             order.NewCredentials,
             Status = order.Success ? "成功" : "失败",
             IsFail = !order.Success,
             order.Id
         });
         dataList.DataBind();
         if (pagination.RowCount > 0)
         {
             pager.Visible = true;
             if (pagination.GetRowCount)
             {
                 pager.RowCount = pagination.RowCount;
             }
         }
         else
         {
             pager.Visible = false;
         }
     } catch (Exception ex) {
         ShowExceptionMessage(ex, "查询");
     }
 }