Esempio n. 1
0
 private void button_confirm_Click(object sender, EventArgs e)
 {
     if (currentCourse.Grade != -1)
     {
         DialogResult result = MessageBox.Show("Student allready have grade at this course. Dou you want to change it?", "caption", MessageBoxButtons.YesNo);
         if (result == DialogResult.No)
         {
             MessageBox.Show("Grade didnt changed");
             return;
         }
     }
     SettingDatabase.ChangeGradeOfStudentInCourse(currentStudent, currentCourse.Course, tempGrade);
     Reload();
 }
        private void button_confirm_Click(object sender, EventArgs e)
        {
            if (gradeAppeal == false)
            {
                if (waitingForGrade == true)
                {
                    currentCourse.additionalTest = requestState.testPassed.ToString();
                    SettingDatabase.ChangeGradeOfStudentInCourse(currentStudent, currentCourse.Course, newGrade);
                }
                else
                {
                    if (checkBox_approve.Checked == true)
                    {
                        currentCourse.additionalTest = requestState.Approved.ToString();
                    }
                    else
                    {
                        currentCourse.additionalTest = requestState.NotApproved.ToString();
                    }
                }
                SettingDatabase.Change_Test_Status_Request(currentStudent, currentCourse);
            }
            else
            {
                if (checkBox_approve.Checked == true)
                {
                    currentCourse.Grade       = newGrade;
                    currentCourse.gradeAppeal = requestState.Approved.ToString();
                    SettingDatabase.ChangeGradeOfStudentInCourse(currentStudent, currentCourse.Course, newGrade);
                }
                else
                {
                    currentCourse.gradeAppeal = requestState.NotApproved.ToString();
                }
                SettingDatabase.Change_Grade_Status_Request(currentStudent, currentCourse);
            }

            Reload();
        }
Esempio n. 3
0
 public bool changeGradeOfStudentInCourse(Student s, Course c, float grade)
 {
     return(SettingDatabase.ChangeGradeOfStudentInCourse(s, c, grade));
 }