コード例 #1
0
        private void gradeSelector_SelectedIndexChanged(object sender, EventArgs e)
        {
            CheckBox           checkBox = sender as CheckBox;
            StudentResultModel model    = this.Tag as StudentResultModel;

            StateChanged?.Invoke(model, EventArgs.Empty);
        }
コード例 #2
0
        public void SetStudentResult(StudentResultModel model)
        {
            studentName.Text   = $"{model.Student.LastName} {model.Student.FirstName} {model.Student.Patronymic}";
            taskNameLabel.Text = model.Task.Title;

            if (model.File == null)
            {
                imageButton.Visible = false;
            }
        }
コード例 #3
0
        private void Form_StudentGraded(object sender, EventArgs e)
        {
            StudentResultModel model = sender as StudentResultModel;

            TaskResultProvider.GradeStudent(
                model.Student.Id,
                model.Task.Id,
                model.Grade);

            this.Parent.Controls.Remove(this);
        }