示例#1
0
        private void btnStudents_Click(object sender, EventArgs e)
        {
            frmStudents Students = new frmStudents();

            Students.Show();
            this.Hide();
        }
 public void CheckPreviousForm()
 {
     if (GlobalVariables.PreviousForm == "StudentTable")
     {
         frmStudents StudentTable = new frmStudents();
         StudentTable.Show();
         this.Hide();
     }
     else if (GlobalVariables.PreviousForm == "TeacherTable")
     {
         frmTeachers TeacherTable = new frmTeachers();
         TeacherTable.Show();
         this.Hide();
     }
     else if (GlobalVariables.PreviousForm == "InstrumentTable")
     {
         frmInstrument InstrumentTable = new frmInstrument();
         InstrumentTable.Show();
         this.Hide();
     }
     else if (GlobalVariables.PreviousForm == "RoomTable")
     {
         frmRoom RoomTable = new frmRoom();
         RoomTable.Show();
         this.Hide();
     }
     else if (GlobalVariables.PreviousForm == "GradeTable")
     {
         frmGrade GradeTable = new frmGrade();
         GradeTable.Show();
         this.Hide();
     }
     else if (GlobalVariables.PreviousForm == "LessonBundleTable")
     {
         frmLessonBundle LessonBundleTable = new frmLessonBundle();
         LessonBundleTable.Show();
         this.Hide();
     }
     else if (GlobalVariables.PreviousForm == "Menu")
     {
         frmPrivateTuition Menu = new frmPrivateTuition();
         Menu.Show();
         this.Hide();
     }
     else if (GlobalVariables.PreviousForm == "ScheduledLessonTable")
     {
         frmScheduleTable Schedule = new frmScheduleTable();
         Schedule.Show();
         this.Hide();
     }
     else if (GlobalVariables.PreviousForm == "PurchasedLessonBundleTable")
     {
         PurchasedLessonBundles Purchase = new PurchasedLessonBundles();
         Purchase.Show();
         this.Hide();
     }
 }