예제 #1
0
 public void Update_Grade_After_Appeal_Confirmation(int grade, Appeals_Student appeal)
 {
     try
     {
         con.OpenCon();
         com = new SqlCommand("UPDATE StudentGrades SET Grade = '" + grade + "' WHERE studentID = '" + appeal.Get_Student_ID() + "' AND courseName = '" + appeal.Get_Course_Name() + "'", con.GetCon());
         com.ExecuteNonQuery();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     con.CloseCon();
 }
예제 #2
0
        public void Update_After_Lecturer_Review(int ConfirmDeny, Appeals_Student appeal)
        {
            try
            {
                con.OpenCon();
                com = new SqlCommand("UPDATE Student_Appeals SET Status = '" + ConfirmDeny + "' WHERE Student_ID = '" + appeal.Get_Student_ID() + "' AND ActiveCourse_ID = '" + appeal.Get_Course_ID() + "' AND Lecturer_ID = '" + appeal.Get_Lecturer_ID() + "'", con.GetCon());
                SqlDataReader rdr = com.ExecuteReader();

                while (rdr.Read())
                {
                }
                rdr.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            con.CloseCon();
        }