public ThreeObjectsModel GetAllThreeObjectsByPersonId(string personId)
        {
            ThreeObjectsModel threeObjects = new ThreeObjectsModel();

            PersonModel personModel;

            if (studentRepository.GetOneStudentById(personId) != null)
            {
                personModel = studentRepository.GetOneStudentById(personId);
            }
            else
            {
                personModel = teacherRepository.GetOneTeacherById(personId);
            }
            VehicleModel  vehicleModel  = vehicleRepository.GetOneVehicleByOwnerId(personId);
            ApprovalModel approvalModel = approvalRepository.GetOneApprovalByPersonId(personId);

            threeObjects.personModel   = personModel;
            threeObjects.vehicleModel  = vehicleModel;
            threeObjects.approvalModel = approvalModel;

            return(threeObjects);
        }
 public ThreeObjectsModel(PersonModel person2, VehicleModel vehicle2, ApprovalModel approval2)
 {
     personModel   = person2;
     vehicleModel  = vehicle2;
     approvalModel = approval2;
 }
 static public OleDbCommand UpdateVehicle(VehicleModel vehicleModel)
 {
     return(CreateOleDbCommand(vehicleModel, queryVehiclesUpdate));
 }
 static public OleDbCommand AddVehicle(VehicleModel vehicleModel)
 {
     return(CreateOleDbCommand(vehicleModel, queryVehiclesPost));
 }