Esempio n. 1
0
        /// <summary>
        /// Test function for Navision webservice
        /// Ask payment means for customer 2
        /// </summary>
        public static void Test()
        {
            Navision nws = null;

            try
            {
                // Define a new navision ws connection
                nws = new Navision();

                // instanciate a new webservice
                Nav_PaymentMeans pm = new Nav_PaymentMeans();

                // call the method and return the payment means
                nws.GetTravellerPaymentMeans(NavWsLogin, NavWsPassword, Const.PosFrance, "2",
                                             string.Empty, Const.ServiceAIR, string.Empty, ref pm);
            }
            finally
            {
                // Let's dispose now
                if (nws != null)
                {
                    nws.Dispose();
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Get traveller payment means for a traveller on a service
        /// parameter retval will be updated
        /// </summary>
        /// <param name="retval">Traveller payment means</param>
        public static void GetTravellerPaymentMeans(TravelerPaymentMeansResponse retval)
        {
            Navision nws = null;

            try
            {
                // Define a new navision ws connection
                nws = new Navision();

                // instanciate a new webservice
                Nav_PaymentMeans pm = new Nav_PaymentMeans();

                // call the method and return the payment means
                nws.GetTravellerPaymentMeans(NavWsLogin, NavWsPassword, retval.GetArgPos(), retval.GetArgComcode(),
                                             retval.GetArgPercode(), retval.GetArgServicesList(), retval.GetArgCostCenter(), ref pm);

                // Set result
                retval.SetValue(pm);
            }
            finally
            {
                // Let's dispose now
                if (nws != null)
                {
                    nws.Dispose();
                }
            }
        }