public DataTable GetAvailableCars(string userName, string password, int carId, DateTime travelDate)
        {
            try
            {
                CarRentalTSWebServices.SOAPHeaderService service = new CarRentalTSWebServices.SOAPHeaderService();
                CarRentalTSWebServices.UserCredentials user = new CarRentalTSWebServices.UserCredentials();
                user.userName = userName;
                user.password = password;

                service.UserCredentialsValue = user;

                return service.GetAvailableCars(carId, travelDate);
            }
            catch (Exception ex)
            { throw ex; }
        }
Exemple #2
0
        public DataTable GetAvailableCars(string userName, string password, int carId, DateTime travelDate)
        {
            try
            {
                CarRentalTSWebServices.SOAPHeaderService service = new CarRentalTSWebServices.SOAPHeaderService();
                CarRentalTSWebServices.UserCredentials   user    = new CarRentalTSWebServices.UserCredentials();
                user.userName = userName;
                user.password = password;

                service.UserCredentialsValue = user;

                return(service.GetAvailableCars(carId, travelDate));
            }
            catch (Exception ex)
            { throw ex; }
        }