コード例 #1
0
        public Customer RetrieveCustomerDetails(int customerID)
        {
            TransactionDAO dao = TransactionDAO.getInstance();
            try
            {
                dao.openConnection();
                return dao.RetrieveCustomerDetails(customerID);
            }
            catch (Exception)
            {

                throw;
            }
            finally
            {
                dao.CloseConnection();
            }
        }
コード例 #2
0
        public void CreateTransaction(string carPlateNumber, int customerID, int days)
        {
            TransactionDAO dao = TransactionDAO.getInstance();
            try
            {
                dao.openConnection();
                dao.CreateTransaction(carPlateNumber, customerID, days);
            }
            catch (Exception)
            {

                throw;
            }
            finally
            {
                dao.CloseConnection();
            }
        }
コード例 #3
0
        public void UpdateVehicleStatus(string carPlateNumber)
        {
            TransactionDAO dao = TransactionDAO.getInstance();
            try
            {
                dao.openConnection();
                dao.UpdateVehicleStatus(carPlateNumber);
            }
            catch (Exception)
            {

                throw;
            }
            finally
            {
                dao.CloseConnection();
            }
        }
コード例 #4
0
        public DataTable retrieveAvailableVehicles(string chosenCategory)
        {
            TransactionDAO dao = TransactionDAO.getInstance();

            try
            {
                dao.openConnection();
                DataTable availableVehicles = dao.RetrieveVehicleDetails(chosenCategory);
                return availableVehicles;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                dao.CloseConnection();
            }
           

        }