예제 #1
0
        /// <summary>
        /// add new test. it also give the test new id
        /// </summary>
        /// <param name="test"></param>
        public void AddTest(Test test)
        {
            test.Id = Dal_XML_imp.ID_FromConfigXML().ToString("00000000");

            ////add 0 at the start of the id antil there is 8 digits
            //StringBuilder builder = new StringBuilder();
            //for (int i = test.Id.Length; i < 8; i++)
            //    builder.Append(0);
            //builder.Append(test.Id);
            //test.Id = builder.ToString();
            //Configuration.test_id++;
            DataSource.tests.Add(test);

            Dal_XML_imp.AddTest_PartialDetails(test);
            testEvent(this, null);
        }