Exemplo n.º 1
0
        public DataTable GetBookedCars(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.GetBookedCars(carId, travelDate);
            }
            catch (Exception ex)
            { throw ex; }
        }
Exemplo n.º 2
0
        public int ConfirmSlot(string userName, string password, int bId, decimal paidAmount)
        {
            try
            {
                CarRentalTSWebServices.SOAPHeaderService service = new CarRentalTSWebServices.SOAPHeaderService();
                CarRentalTSWebServices.UserCredentials user = new CarRentalTSWebServices.UserCredentials();
                user.userName = userName;
                user.password = password;

                service.UserCredentialsValue = user;

                return service.ConfirmSlot(bId, userName, paidAmount);
            }
            catch (Exception ex)
            { throw ex; }
        }
Exemplo n.º 3
0
        public int DeleteSlot(string userName, string password, int bId)
        {
            try
            {
                CarRentalTSWebServices.SOAPHeaderService service = new CarRentalTSWebServices.SOAPHeaderService();
                CarRentalTSWebServices.UserCredentials user = new CarRentalTSWebServices.UserCredentials();
                user.userName = userName;
                user.password = password;

                service.UserCredentialsValue = user;

                return service.DeleteSlot(bId);
            }
            catch (Exception ex)
            { throw ex; }
        }
Exemplo n.º 4
0
        public int UpdateSlot(string userName, string password, int bookId, 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.UpdateSlot(bookId, carId, travelDate));
            }
            catch (Exception ex)
            { throw ex; }
        }
Exemplo n.º 5
0
        public int BookCar(string userName, string password, int carId, string carNumber, DateTime travelDate, bool isLocked, string passengerSSN, string updatedUser)
        {
            try
            {
                CarRentalTSWebServices.SOAPHeaderService service = new CarRentalTSWebServices.SOAPHeaderService();
                CarRentalTSWebServices.UserCredentials user = new CarRentalTSWebServices.UserCredentials();
                user.userName = userName;
                user.password = password;

                service.UserCredentialsValue = user;

                return service.BookCar(carId, carNumber, travelDate, isLocked, passengerSSN, updatedUser);
            }
            catch (Exception ex)
            { throw ex; }
        }
Exemplo n.º 6
0
        public int BookCar(string userName, string password, int carId, string carNumber, DateTime travelDate, bool isLocked, string passengerSSN, string updatedUser)
        {
            try
            {
                CarRentalTSWebServices.SOAPHeaderService service = new CarRentalTSWebServices.SOAPHeaderService();
                CarRentalTSWebServices.UserCredentials   user    = new CarRentalTSWebServices.UserCredentials();
                user.userName = userName;
                user.password = password;

                service.UserCredentialsValue = user;

                return(service.BookCar(carId, carNumber, travelDate, isLocked, passengerSSN, updatedUser));
            }
            catch (Exception ex)
            { throw ex; }
        }
Exemplo n.º 7
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; }
        }
Exemplo n.º 8
0
        public int DeleteSlot(string userName, string password, int bId)
        {
            try
            {
                CarRentalTSWebServices.SOAPHeaderService service = new CarRentalTSWebServices.SOAPHeaderService();
                CarRentalTSWebServices.UserCredentials   user    = new CarRentalTSWebServices.UserCredentials();
                user.userName = userName;
                user.password = password;

                service.UserCredentialsValue = user;

                return(service.DeleteSlot(bId));
            }
            catch (Exception ex)
            { throw ex; }
        }
Exemplo n.º 9
0
        public int ConfirmSlot(string userName, string password, int bId, decimal paidAmount)
        {
            try
            {
                CarRentalTSWebServices.SOAPHeaderService service = new CarRentalTSWebServices.SOAPHeaderService();
                CarRentalTSWebServices.UserCredentials   user    = new CarRentalTSWebServices.UserCredentials();
                user.userName = userName;
                user.password = password;

                service.UserCredentialsValue = user;

                return(service.ConfirmSlot(bId, userName, paidAmount));
            }
            catch (Exception ex)
            { throw ex; }
        }
Exemplo n.º 10
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; }
        }
Exemplo n.º 11
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; }
        }