public List<Vehicle> GetAllVehicle()
        {
            aConnection.Open();
            string query = string.Format("SELECT * FROM t_vehicle_information");
            SqlCommand aCommand = new SqlCommand(query, aConnection);
            SqlDataReader aReader = aCommand.ExecuteReader();
            List<Vehicle> vehicles = new List<Vehicle>();
            if (aReader.HasRows)
            {
                while (aReader.Read())
                {
                    aVehicle = new Vehicle();
                    aVehicle.Id = (int) aReader[0];
                    aVehicle.RegNO = aReader[1].ToString();
                    aVehicle.OwnerName = aReader[2].ToString();
                    aVehicle.Deal = Convert.ToInt32(aReader[3]);
                    aVehicle.DriverName = aReader[4].ToString();
                    aVehicle.Model = aReader[5].ToString();
                    aVehicle.Status = aReader[6].ToString();

                    vehicles.Add(aVehicle);
                }
            }
            aConnection.Close();
            return vehicles;
        }
        public string GetDriverName(string regNo)
        {
            aConnection.Open();
            string query = string.Format("SELECT * FROM t_vehicle_information WHERE reg_no='{0}'",regNo);
            SqlCommand aCommand = new SqlCommand(query, aConnection);
            SqlDataReader aReader = aCommand.ExecuteReader();

            if (aReader.HasRows)
            {
                while (aReader.Read())
                {
                    aVehicle = new Vehicle();
                    aVehicle.DriverName = aReader[4].ToString();
                }
            }
            aConnection.Close();
            return aVehicle.DriverName;
        }
        public Vehicle GetVehicleDetails(int vehicleId)
        {
            aConnection.Open();
            string query = string.Format("SELECT * FROM t_vehicle_information WHERE id = {0}", vehicleId);
            SqlCommand aCommand = new SqlCommand(query, aConnection);
            SqlDataReader aReader = aCommand.ExecuteReader();
            Vehicle vehicles = new Vehicle();
            if (aReader.HasRows)
            {
                while (aReader.Read())
                {
                    vehicles.Id = (int)aReader[0];
                    vehicles.RegNO = aReader[1].ToString();
                    vehicles.OwnerName = aReader[2].ToString();
                    vehicles.Deal = Convert.ToInt32(aReader[3].ToString());
                    vehicles.DriverName = aReader[4].ToString();
                    vehicles.Model = aReader[5].ToString();
                    vehicles.Status = aReader[6].ToString();

                }
            }
            aConnection.Close();
            return vehicles;
        }