Exemple #1
0
        public DataTable GetCarRentals(string userName, string password)
        {
            try
            {
                CarRentalTSWebServices.SOAPHeaderService service = new CarRentalTSWebServices.SOAPHeaderService();
                CarRentalTSWebServices.UserCredentials   user    = new CarRentalTSWebServices.UserCredentials();
                user.userName = userName;
                user.password = password;

                service.UserCredentialsValue = user;

                return(service.GetCarRentals());
            }
            catch (Exception ex)
            { throw ex; }
        }
        public DataTable GetCarRentals(string userName, string password)
        {
            try
            {
                CarRentalTSWebServices.SOAPHeaderService service = new CarRentalTSWebServices.SOAPHeaderService();
                CarRentalTSWebServices.UserCredentials user = new CarRentalTSWebServices.UserCredentials();
                user.userName = userName;
                user.password = password;

                service.UserCredentialsValue = user;

                return service.GetCarRentals();
            }
            catch (Exception ex)
            { throw ex; }
        }