Exemplo n.º 1
0
        //Default constructor of Tester
        public Tester()
        {
            ID                = 0;
            lastName          = "";
            firstName         = "";
            dateOfBirth       = new DateTime(1996, 6, 3);
            genderOfTester    = new myEnums.genderType();
            phoneNumber       = 972500000;
            adressOfTester    = new StructTypes.Adress("", -1, "");
            yearsOfExperience = -1;
            MaxTestsPerWeek   = -1;
            carTypeOfTester   = new myEnums.carType();

            //to matrix schedule-TO DO NEW
            //To add how many columns will have and initialiaze with false
            for (int i = 0; i < Configuration.hoursOfWork; i++)
            {
                schedule[i] = new bool[] { false, false, false, false, false }
            }
            ;

            maxDistanceToDoTest = -1;

            //We deleted this
            //testsOfTester = new List<Test>();

            password = "";
        }
Exemplo n.º 2
0
 //Copy Constructor to Test
 public Test(Test testToCopy)
 {
     numOfTest         = testToCopy.num_of_test;
     IDofTester        = testToCopy.ID_tester;
     IDofTrainee       = testToCopy.ID_Trainee;
     dateOfTest        = testToCopy.dateOfTest;
     dateAndHourOfTest = testToCopy.dateAndHourOfTest;
     leavingAdress     = testToCopy._leavingAdress;
     endAdress         = testToCopy._endAdress;
     carTypeOfThisTest = testToCopy._typeCarOfTest;
     reportsOfTest     = testToCopy._reportsOfTest;
     succeedOrFailed   = testToCopy._succeedOrFailed;
     remark            = testToCopy._remark;
 }
Exemplo n.º 3
0
        //Defaukt constructor
        public Test()
        {
            numOfTest = Configuration.numberOfTest;

            IDofTester        = 0;
            IDofTrainee       = 0;
            dateOfTest        = new DateTime(2019, 02, 01);
            dateAndHourOfTest = new DateTime();
            leavingAdress     = new StructTypes.Adress();
            endAdress         = new StructTypes.Adress();
            carTypeOfThisTest = new myEnums.carType();
            reportsOfTest     = new StructTypes.testReport(false);
            succeedOrFailed   = checkResults();
            remark            = "";
        }
Exemplo n.º 4
0
 //Copy Constructor to Trainee
 public Trainee(Trainee traineeToCopy)
 {
     ID                   = traineeToCopy._ID;
     lastName             = traineeToCopy.last_name;
     firstName            = traineeToCopy.first_name;
     dateOfBirth          = traineeToCopy.birth;
     genderOfTrainee      = traineeToCopy.gender;
     phoneNumber          = traineeToCopy._phoneNumber;
     adressOfTrainee      = traineeToCopy._adressOfTrainee;
     carTypeOfTrainee     = traineeToCopy._typeCarOfTrainee;
     gearboxTypeOfTrainee = traineeToCopy._gearboxTypeOfTrainee;
     drivingSchool        = traineeToCopy._drivingSchool;
     nameOfTeacher        = traineeToCopy._nameOfTeacher;
     numberOfLessons      = traineeToCopy._lessons;
     password             = traineeToCopy._password;
 }
Exemplo n.º 5
0
 //Default constructor of Tester
 public Trainee()
 {
     ID                   = 0;
     lastName             = "";
     firstName            = "";
     dateOfBirth          = new DateTime(1996, 6, 3);
     genderOfTrainee      = new myEnums.genderType();
     phoneNumber          = 972500000;
     adressOfTrainee      = new StructTypes.Adress("", -1, "");
     carTypeOfTrainee     = new myEnums.carType();
     gearboxTypeOfTrainee = new myEnums.gearboxType();
     drivingSchool        = "";
     nameOfTeacher        = "";
     numberOfLessons      = -1;
     password             = "";
 }
Exemplo n.º 6
0
        //Copy Constructor of Tester
        public Tester(Tester testerToCopy)
        {
            ID                = testerToCopy._ID;
            lastName          = testerToCopy.last_name;
            firstName         = testerToCopy.first_name;
            dateOfBirth       = testerToCopy.birth;
            genderOfTester    = testerToCopy.gender;
            phoneNumber       = testerToCopy._phoneNumber;
            adressOfTester    = testerToCopy._adressOfTester;
            yearsOfExperience = testerToCopy._yearsOfExperience;
            MaxTestsPerWeek   = testerToCopy._MaxTestsPerWeek;
            carTypeOfTester   = testerToCopy._typeCarOfTester;

            //to matrix schedule-TO DO NEW
            //To add how many columns will have and initialiaze with false
            for (int i = 0; i < Configuration.hoursOfWork; i++)
            {
                schedule[i] = new bool[] { false, false, false, false, false }
            }
            ;

            //to copy the matrix schedule
            for (int i = 0; i < Configuration.hoursOfWork; i++)
            {
                for (int j = 0; j < Configuration.daysOfWeek; j++)
                {
                    schedule[i][j] = testerToCopy._schedule[i][j];
                }
            }

            maxDistanceToDoTest = testerToCopy._maxDistanceToDoTest;

            //We deleted this
            ////To copy the testsOfTester
            //testsOfTester = new List<Test>();
            //foreach (Test item in testerToCopy._testsOfTester)
            //    testsOfTester.Add(item);

            password = testerToCopy._password;
        }