private void BindHeader(BalanceRefundApplyform applyform) { OrderRole orderRole = BasePage.GetOrderRole(applyform.Order); lblApplyformId.Text = applyform.Id.ToString(); linkOrderId.HRef = "OrderDetail.aspx?id=" + applyform.OrderId.ToString() + "&returnUrl=" + HttpUtility.UrlEncode(Request.Url.PathAndQuery); linkOrderId.InnerText = applyform.OrderId.ToString(); this.lblApplyType.Text = "差额退款"; var product = applyform.Order.Provider.Product; if (product is SpeicalProductInfo) { var specialProductInfo = product as SpeicalProductInfo; this.lblProductType.Text = applyform.Order.Product.ProductType.GetDescription() + "(" + specialProductInfo.SpeicalProductType.GetDescription() + ")"; } else { this.lblProductType.Text = product.ProductType.GetDescription(); } lblStatus.Text = StatusService.GetBalanceRefundStatus(applyform.BalanceRefundStatus, orderRole); if (applyform.Order.Provider != null && applyform.Order.Provider.Product is Service.Order.Domain.CommonProductInfo) { this.lblTicketType.Text = (applyform.Order.Provider.Product as Service.Order.Domain.CommonProductInfo).TicketType.ToString(); } else { this.lblTicketType.Text = "-"; } lblPNR.Text = AppendPNR(applyform.NewPNR, string.Empty); lblPNR.Text += AppendPNR(applyform.OriginalPNR, string.IsNullOrWhiteSpace(lblPNR.Text) ? string.Empty : "原编码:"); }
private void bindHeader(BalanceRefundApplyform applyform) { lblApplyformId.Text = applyform.Id.ToString(); linkOrderId.HRef = "OrderDetail.aspx?id=" + applyform.OrderId.ToString() + "&returnUrl=" + HttpUtility.UrlEncode(Request.Url.PathAndQuery); linkOrderId.InnerText = applyform.OrderId.ToString(); lblApplyType.Text = "差错退款"; ProductInfo product = applyform.Order.IsThirdRelation ? applyform.Order.Supplier.Product : applyform.Order.Provider.Product; if (product is SpeicalProductInfo) { var specialProductInfo = product as SpeicalProductInfo; lblProductType.Text = applyform.Order.Product.ProductType.GetDescription() + "(" + specialProductInfo.SpeicalProductType.GetDescription() + ")"; } else { lblProductType.Text = applyform.Order.Product.ProductType.GetDescription(); } lblStatus.Text = StatusService.GetBalanceRefundStatus(applyform.BalanceRefundStatus, OrderRole.Platform); if (applyform.Order.Provider != null && applyform.Order.Provider.Product is CommonProductInfo) { lblTicketType.Text = (applyform.Order.Provider.Product as CommonProductInfo).TicketType.ToString(); } else { lblTicketType.Text = "-"; } lblPNR.Text = AppendPNR(applyform.NewPNR, string.Empty); lblPNR.Text += AppendPNR(applyform.OriginalPNR, string.IsNullOrWhiteSpace(lblPNR.Text) ? string.Empty : "原编码:"); linkPurchaser.InnerText = applyform.PurchaserName; linkPurchaser.HRef = "/OrganizationModule/TerraceModule/CompanyInfoManage/LookUpCompanyInfo.aspx?CompanyId=" + applyform.PurchaserId.ToString(); linkProvider.InnerText = applyform.ProviderName; linkProvider.HRef = "/OrganizationModule/TerraceModule/CompanyInfoManage/LookUpCompanyInfo.aspx?CompanyId=" + applyform.ProviderId.ToString(); }
private void bindApplyAndProcessInfo(BalanceRefundApplyform applyform) { lblAppliedTime.Text = applyform.AppliedTime.ToString("yyyy-MM-dd HH:mm"); lblAppliedReason.Text = applyform.ApplyRemark; if (applyform.ProcessedTime.HasValue) { lblProcessedTime.Text = applyform.ProcessedTime.Value.ToString("yyyy-MM-dd HH:mm"); lblProcessedResult.Text = applyform.BalanceRefundStatus == BalanceRefundProcessStatus.Finished ? StatusService.GetBalanceRefundStatus(applyform.BalanceRefundStatus, GetOrderRole(applyform.Order)) + " " + applyform.ProcessedFailedReason : string.Empty; } var refundInfoHTML = new StringBuilder(); refundInfoHTML.Append("<table><tr><th>航段</th><th>手续费率</th><th>手续费</th><th>应退金额</th><th>实退金额</th></tr>"); int index = 0; NormalRefundRoleBill bill = applyform.RefundBill.Provider; var flightRefundFees = applyform.OriginalFlights.Join(bill.Source.Details, f => f.ReservateFlight, f => f.Flight.Id, (f1, f2) => new { flight = f1, fee = f2 }); foreach (var item in flightRefundFees) { refundInfoHTML.Append("<tr>"); refundInfoHTML.AppendFormat("<td>{0} - {1}</td>", item.flight.Departure.City, item.flight.Arrival.City); refundInfoHTML.AppendFormat("<td>{0}%</td>", (item.fee.RefundRate * 100).TrimInvaidZero()); refundInfoHTML.AppendFormat("<td>{0}</td>", Math.Abs(item.fee.RefundFee).TrimInvaidZero()); if (index == 0) { refundInfoHTML.AppendFormat("<td rowspan='{0}'>{1}</td>", applyform.Applyform.Flights.Count() * applyform.Passengers.Count(), bill.Source.Anticipation.TrimInvaidZero()); refundInfoHTML.AppendFormat("<td rowspan='{0}'>{1}</td>", applyform.Applyform.Flights.Count() * applyform.Passengers.Count(), bill.Amount.TrimInvaidZero()); } refundInfoHTML.Append("</tr>"); index++; } refundInfoHTML.Append("</table>"); divRefundFeeInfo.InnerHtml = refundInfoHTML.ToString(); }