예제 #1
0
 public AdminForm(List<UserFaculty> fl, List<UserStudent> sl, List<Course> cl, UserAdmin adm)
 {
     state = adminstate.asadmin;
     InitializeComponent();
     admin = adm;
     FacultyList = fl;
     StudentList = sl;
     Courses = cl;
     initdgv();
 }
예제 #2
0
 public AdminForm(List<UserFaculty> fl, List<UserStudent> sl, List<Course> cl, UserAdmin adm)
 {
     state = adminstate.dflt;
     InitializeComponent();
     admin = adm;
     FacultyList = fl;
     StudentList = sl;
     Courses = cl;
     hidethings();
 }
예제 #3
0
 public AdminForm(List <UserFaculty> fl, List <UserStudent> sl, List <Course> cl, UserAdmin adm)
 {
     state = adminstate.asadmin;
     InitializeComponent();
     admin       = adm;
     FacultyList = fl;
     StudentList = sl;
     Courses     = cl;
     initdgv();
 }
예제 #4
0
 public AdminForm(List<UserFaculty> fl, List<UserStudent> sl, List<Course> cl, UserAdmin adm, UserStudent std)
 {
     InitializeComponent();
     state = adminstate.asstudent;
     asthisstudent = std;
     button1.Text = "Add " + asthisstudent.UserName + " to Course.";
     logoutBtn.Text = "Logout as " + asthisstudent.UserName;
     admin = adm;
     FacultyList = fl;
     StudentList = sl;
     Courses = cl;
     initdgv();
 }
예제 #5
0
 public AdminForm(List <UserFaculty> fl, List <UserStudent> sl, List <Course> cl, UserAdmin adm, UserStudent std)
 {
     InitializeComponent();
     state          = adminstate.asstudent;
     asthisstudent  = std;
     button1.Text   = "Add " + asthisstudent.UserName + " to Course.";
     logoutBtn.Text = "Logout as " + asthisstudent.UserName;
     admin          = adm;
     FacultyList    = fl;
     StudentList    = sl;
     Courses        = cl;
     initdgv();
 }
예제 #6
0
 private void ViewStudents(object sender, EventArgs e)
 {
     switch (state)
     {
         case adminstate.student:
             {
                 state = adminstate.dflt;
                 button3.Enabled = true;
                 button4.Enabled = true;
                 hidethings();
             } break;
         case adminstate.dflt:
             {
                 button3.Enabled = false;
                 button4.Enabled = false;
                 IVS();
             } break;
     }
 }
예제 #7
0
 //"Inner View Students." I wanted to call it without event arguments.
 private void IVS()
 {
     this.Text = "Viewing List of Students";
     state = adminstate.student;
     studstate = studentstate.sviewall;
     dataGridView1.DataSource = StudentList;
     dataGridView1.Show();
     FastRegButton.Hide();
     button1.Enabled = true;
     button1.Text = "View Student Courses";
     button1.Show();
     killButton.Show();
     AdvisorButton.Enabled = true;
     AdvisorButton.Show();
 }
예제 #8
0
 private void button4_Click(object sender, EventArgs e)
 {
     switch (state)
     {
         case adminstate.dflt:
             {
                 state = adminstate.crs;
                 coursebase();
             } break;
         case adminstate.crs:
             {
                 state = adminstate.dflt;
                 StudentButton.Enabled = true;
                 button3.Enabled = true;
                 hidethings();
             } break;
     }
 }
예제 #9
0
 private void button3_Click(object sender, EventArgs e)
 {
     switch (state)
     {
         case adminstate.dflt:
             {
                 state = adminstate.faculty;
                 dataGridView1.DataSource = FacultyList;
                 dataGridView1.Show();
                 this.Text = "Viewing Faculty List";
                 StudentButton.Enabled = false;
                 button4.Enabled = false;
                 killButton.Show();
                 button1.Show();
             } break;
         case adminstate.faculty:
             {
                 state = adminstate.dflt;
                 StudentButton.Enabled = true;
                 button4.Enabled = true;
                 hidethings();
             } break;
     }
 }