Ejemplo n.º 1
0
        public void updateTest(TestFeedback testFeedback, Test test)  //עדכון תוצאות הטסט
        {
            test.keepingDistance       = testFeedback.keepingDistance;
            test.reverseParking        = testFeedback.reverseParking;
            test.lookingAtMirrors      = testFeedback.lookingAtMirrors;
            test.signaling             = testFeedback.signaling;
            test.stopingForPedestrians = testFeedback.stopingForPedestrians;
            test.intersection          = testFeedback.intersection;
            test.rightOfWay            = testFeedback.rightOfWay;
            test.appropriateSpeed      = testFeedback.appropriateSpeed;
            test.controlOfGearBox      = testFeedback.controlOfGearBox;

            if (test.keepingDistance && test.reverseParking && test.lookingAtMirrors && test.signaling && test.stopingForPedestrians && test.intersection &&
                test.rightOfWay && test.appropriateSpeed && test.controlOfGearBox)    //אם עבר בהצלחה הכל אז עבר את הטסט
            {
                test.result = true;
            }
            test.testerNote = testFeedback.testerNote;
            dal.updateTest(test);

            Tester tester = findTester(test.testerID);   //הורדת טסט שכבר ציון מרשימת טסטים עתידיים&&

            foreach (Test t in tester.futureTests)
            {
                if (t.testID == test.testID)
                {
                    tester.futureTests.Remove(t);
                    break;
                }
            }
        }
Ejemplo n.º 2
0
        public static void updateTest()
        {
            Address      address       = new Address("Hertzel", 5, "Jerusalem");
            TestFeedback testFeedback1 = new TestFeedback(true, true, true, true, true, true, true, true, true, "She was exelent", address);

            updateTestFunc(testFeedback1, 10000000);
            TestFeedback testFeedback2 = new TestFeedback(true, false, true, true, true, false, true, true, true, "She still needs to practice", address);

            updateTestFunc(testFeedback2, 10000001);
            TestFeedback testFeedback3 = new TestFeedback(true, true, true, true, true, true, true, true, true, "She was exelent", address);

            updateTestFunc(testFeedback3, 10000002);
            TestFeedback testFeedback4 = new TestFeedback(true, true, true, true, true, true, true, false, true, "She still needs to practice", address);

            updateTestFunc(testFeedback4, 10000003);
        }
Ejemplo n.º 3
0
        public static void updateTestFunc(TestFeedback testFeedback, int testID)
        {
            BL.IBL bl = BL.FactoryBL.GetBL();

            try
            {
                Test test = bl.searchTest(testID);
                if (DateTime.Now > test.testTime)
                {
                    bl.updateTest(testFeedback, test);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }