Exemplo n.º 1
0
 bool isValidData(ChinaPay.B3B.Service.Foundation.Domain.BAF BAF)
 {
     if (!string.IsNullOrEmpty(this.txtStartMileage.Text.Trim()) && this.txtStartMileage.Text.Trim() != BAF.Mileage.ToString())
     {
         return(false);
     }
     if (!string.IsNullOrEmpty(this.txtStartDate.Text) && this.txtStartDate.Text != BAF.EffectiveDate.ToString("yyyy-MM-dd"))
     {
         return(false);
     }
     if (!string.IsNullOrEmpty(this.txtStopDate.Text) && this.txtStopDate.Text != Convert.ToDateTime(BAF.ExpiredDate).ToString("yyyy-MM-dd"))
     {
         return(false);
     }
     if (!string.IsNullOrEmpty(this.ucAriline.Code) && this.ucAriline.Code != BAF.AirlineCode.Value)
     {
         return(false);
     }
     return(true);
 }
Exemplo n.º 2
0
 private void Refresh(string code)
 {
     ChinaPay.B3B.Service.Foundation.Domain.BAF baf = FoundationService.QueryBAF(new Guid(code));
     if (baf == null)
     {
         return;
     }
     if (baf.AirlineCode.Value != null)
     {
         this.ddlAirline.SelectedValue = baf.AirlineCode.Value;
     }
     if (baf.EffectiveDate != null)
     {
         this.txtStartDate.Text = baf.EffectiveDate.ToString("yyyy-MM-dd");
     }
     if (baf.ExpiredDate != null)
     {
         this.txtStopDate.Text = Convert.ToDateTime(baf.ExpiredDate).ToString("yyyy-MM-dd");
     }
     this.txtAdult.Text        = baf.Adult.ToString();
     this.txtChild.Text        = baf.Child.ToString();
     this.txtStartMileage.Text = baf.Mileage.ToString();
 }