Exemplo n.º 1
0
        public void Execute(IDataBase db)
        {
            var cerifiedTest = new CertifiedTest();
            var passedTest = db.GetElements<PassedTest>()[0];
            var olapRound = db.GetOlapRounds()[0];

            db.FillElement(passedTest);
            cerifiedTest.SetPassedTest(passedTest);

            cerifiedTest.Assessments[cerifiedTest.PassedTest.Test.Questions[0]] = 70;
            cerifiedTest.Assessments[cerifiedTest.PassedTest.Test.Questions[1]] = 43;

            db.ExecuteCommand(Parameters.Insert, cerifiedTest);
            db.InsertLinkOlapRoundPassedTest(olapRound, passedTest);
        }
Exemplo n.º 2
0
        private void btnSelectPassedTest_Click(object sender, EventArgs e)
        {
            if (lstPassedTests.SelectedIndex != -1)
            {
                lstPassedTests.Enabled = false;
                btnSelectPassedTest.Enabled = false;
                btnAddPassedTest.Enabled = false;
            }
            else
            {
                return;
            }

            _certifiedTest = new CertifiedTest();

            lstQuestions.DataSource = SelectedPassedTest.Replies.Keys.ToArray();

            lblAssessment.Text = $"Оценка(MAX: {SelectedPassedTest.Test.MaxAssessment})";
        }