Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Below is the code in my web service.



C#
public partial class AirSearch : ProviderRequest {
 private string[] selectedAirlinesField;
private JourneyDetail[] journeyDetailsField;[System.Xml.Serialization.XmlArrayAttribute(Order=0)]
      public string[] SelectedAirlines {
          get {
              return this.selectedAirlinesField;
          }
          set {
              this.selectedAirlinesField = value;
              this.RaisePropertyChanged("SelectedAirlines");
          }
      }


}

C#
 public partial class JourneyDetail : object, System.ComponentModel.INotifyPropertyChanged {
private System.DateTime departureDateTimeField;

       private string departurePointField;

       private bool departurePointIsCityField;

SQL
/// <remarks/>
      [System.Xml.Serialization.XmlAttributeAttribute()]
      public System.DateTime DepartureDateTime {
          get {
              return this.departureDateTimeField;
          }
          set {
              this.departureDateTimeField = value;
              this.RaisePropertyChanged("DepartureDateTime");
          }
      }

      /// <remarks/>
      [System.Xml.Serialization.XmlAttributeAttribute()]
      public string DeparturePoint {
          get {
              return this.departurePointField;
          }
          set {
              this.departurePointField = value;
              this.RaisePropertyChanged("DeparturePoint");
          }
      }

      /// <remarks/>
      [System.Xml.Serialization.XmlAttributeAttribute()]
      public bool DeparturePointIsCity {
          get {
              return this.departurePointIsCityField;
          }
          set {
              this.departurePointIsCityField = value;
              this.RaisePropertyChanged("DeparturePointIsCity");
          }
      }



}
now to use these class i am doing some thing like


AirSearch arsearch = new AirSearch();
string[] airlines = { "BA", "QF" };


but i do not know how to pass journeydetail in the above code.
please help
Posted
Updated 12-Feb-14 2:30am
v2
Comments
ZurdoDev 12-Feb-14 8:48am    
I don't quite follow what you are asking but it looks like you would just do
arsearch.SelectedAirlines = airlines;
hrishisinha 12-Feb-14 9:18am    
sir i just want to know how to pass
arsearch.JourneyDetail=?????;
as journey detail is an array of five parameters.
I do not know how to do this as u have done with "selected airline" please tell
about journeydetailsfield also
ZurdoDev 12-Feb-14 9:24am    
It's an array of that class. You would do it the same as an array of strings.
hrishisinha 12-Feb-14 9:30am    
sir could you please write the code because it is throwing error. If i do it same as i did for the string.
ZurdoDev 12-Feb-14 9:35am    
Please post your code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900