예제 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
            StudentDashbord student = new StudentDashbord(studentID);

            student.Show();
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
            StudentDashbord dashbord = new StudentDashbord(studentID);

            dashbord.Show();
        }
예제 #3
0
        private void login(int id, string name)
        {
            OnlineExam ent = new OnlineExam();

            try
            {
                var student = (from s in ent.Students
                               where s.Sid == id && s.Fname == name
                               select s).First();
                this.Close();
                StudentDashbord dashbord = new StudentDashbord(student.Sid);
                dashbord.Show();
            }
            catch (Exception)
            {
                MessageBox.Show("Not Authroized", "Access Denaied");
            }
        }
예제 #4
0
        private void finish_Click(object sender, EventArgs e)
        {
            OnlineExam exam = new OnlineExam();

            checkIfNotFirstExam();

            foreach (var item in StudentAnswersSheet)
            {
                exam.Insert_Std_Answer(studentID, examID, item.Key, item.Value);
            }

            var res = exam.Calc_Student_Exam_Grade(studentID, examID).First();

            deletePrevGradeIfExist();

            exam.saveStudentGrade(studentID, examID, res.grade);

            MessageBox.Show($"Your Grade {res.grade}, and Degree {res.student_answer_degrees}", "Your Resault");
            StudentDashbord dashbord = new StudentDashbord(studentID);

            this.Close();
            dashbord.Show();
        }