/// <remarks/>
 public void BAPI_FLTRIP_CREATEAsync(BAPIPAREX[] EXTENSION_IN, BAPISTRNEW FLIGHT_TRIP_DATA, BAPISTRPAS[] PASSENGER_LIST, BAPIRET2[] RETURN, object userState)
 {
     if ((this.BAPI_FLTRIP_CREATEOperationCompleted == null))
     {
         this.BAPI_FLTRIP_CREATEOperationCompleted = new System.Threading.SendOrPostCallback(this.OnBAPI_FLTRIP_CREATEOperationCompleted);
     }
     this.InvokeAsync("BAPI_FLTRIP_CREATE", new object[] {
         EXTENSION_IN,
         FLIGHT_TRIP_DATA,
         PASSENGER_LIST,
         RETURN
     }, this.BAPI_FLTRIP_CREATEOperationCompleted, userState);
 }
Beispiel #2
0
        public bool CreateTrip(
            string agencyNumber,
            string classType,
            string customerID,
            string flConn1,
            string flConn2,
            string flDate1,
            string flDate2,
            out string travelAgencyNumber,
            out string tripNumber)
        {
            _bapiExtensionIn  = new SAP_FLIGHTTRIPCREATE.BAPIPAREX[0];
            _bapiExtensionOut = new SAP_FLIGHTTRIPCREATE.BAPIPAREX[0];
            _bapiFlTripReturn = new SAP_FLIGHTTRIPCREATE.BAPIRET2[0];

            SAP_FLIGHTTRIPCREATE.BAPISTRNEW flData =
                new SAP_FLIGHTTRIPCREATE.BAPISTRNEW();

            flData.AGENCYNUM  = agencyNumber;
            flData.CLASS      = classType;
            flData.CUSTOMERID = customerID;
            flData.FLCONN1    = flConn1;
            flData.FLCONN2    = flConn2;
            flData.FLDATE1    = flDate1;
            flData.FLDATE2    = flDate2;

            CookieContainer cookieContainer = new CookieContainer();

            _bapiFlightTripCreate.Url += "?session_mode=1";
            _bapiCommitWork.Url       += "?session_mode=2";

            _bapiFlightTripCreate.CookieContainer = cookieContainer;
            _bapiCommitWork.CookieContainer       = cookieContainer;

            _bapiTicketPrice = _bapiFlightTripCreate.BAPI_FLTRIP_CREATE(
                ref _bapiExtensionIn,
                flData,
                ref _bapiPassengers,
                ref _bapiFlTripReturn,
                out travelAgencyNumber,
                out tripNumber);
            if (_bapiFlTripReturn.Length > 1)
            {
                return(false);
            }
            SAP_COMMITWORK.BAPIRET2 ret = _bapiCommitWork.BAPI_TRANSACTION_COMMIT("");
            return(true);
        }
 /// <remarks/>
 public void BAPI_FLTRIP_CREATEAsync(BAPIPAREX[] EXTENSION_IN, BAPISTRNEW FLIGHT_TRIP_DATA, BAPISTRPAS[] PASSENGER_LIST, BAPIRET2[] RETURN)
 {
     this.BAPI_FLTRIP_CREATEAsync(EXTENSION_IN, FLIGHT_TRIP_DATA, PASSENGER_LIST, RETURN, null);
 }
        public BAPISTRPRI BAPI_FLTRIP_CREATE([System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)][System.Xml.Serialization.XmlArrayItemAttribute("item", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)] ref BAPIPAREX[] EXTENSION_IN, [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] BAPISTRNEW FLIGHT_TRIP_DATA, [System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)][System.Xml.Serialization.XmlArrayItemAttribute("item", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)] ref BAPISTRPAS[] PASSENGER_LIST, [System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)][System.Xml.Serialization.XmlArrayItemAttribute("item", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)] ref BAPIRET2[] RETURN, [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] out string TRAVELAGENCYNUMBER, [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] out string TRIPNUMBER)
        {
            object[] results = this.Invoke("BAPI_FLTRIP_CREATE", new object[] {
                EXTENSION_IN,
                FLIGHT_TRIP_DATA,
                PASSENGER_LIST,
                RETURN
            });

            EXTENSION_IN       = ((BAPIPAREX[])(results[1]));
            PASSENGER_LIST     = ((BAPISTRPAS[])(results[2]));
            RETURN             = ((BAPIRET2[])(results[3]));
            TRAVELAGENCYNUMBER = ((string)(results[4]));
            TRIPNUMBER         = ((string)(results[5]));
            return((BAPISTRPRI)(results[0]));
        }