/// <summary> /// Update Test Result /// </summary> /// <param name="test"></param> public void UpdateTestResult(BE.Test test) { int indexTest = tests.FindIndex(t => t.TestID == test.TestID); if (indexTest == -1) { throw new KeyNotFoundException("לא נמצא מבחן שמספרו " + test.TestID); } tests[indexTest] = test.Clone(); SaveToXML <List <Test> >(tests, testsPath); }
/// <summary> /// Add Test /// </summary> /// <param name="test"></param> public void AddTest(BE.Test test) { tests.Add(test.Clone()); SaveToXML <List <Test> >(tests, testsPath); }