Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string option_selected = lb_options.Text;

            switch (option_selected)
            {
            case "צפייה במערכת":
                this.Hide();
                new viewShT(l_name.Text, tutor.getID()).ShowDialog();             ////////////
                this.Show();
                break;

            case "שינויים במערכת למתרגל":
                this.Hide();
                new Requests_Tutors(tutor.getUserName(), tutor.getPassword()).ShowDialog();            ////////////
                this.Show();
                break;

            case "העדפות מתרגל":
                this.Hide();
                new TutorPreferences(tutor.getID()).ShowDialog();                   ////////////////////
                this.Show();
                break;

            case "צפייה במכסת שעות נוכחית":
                this.Hide();
                new DisplayAmountHoursTutors(this.tutor.getID()).ShowDialog();                   ////////////////////
                this.Show();
                break;

            case "צפייה ברשימת קורסים לפי סמסטר":
                this.Hide();
                new DisplayCoursesBySemester().ShowDialog();
                this.Show();
                break;

            case "צפייה ברשימת סטודנטים לקורס":               ///
                this.Hide();
                new StudentsList_L_T(tutor.getFirstName() + " " + tutor.getLastName()).ShowDialog();
                this.Show();
                break;

            case "הודעות אישיות":               //
                this.Hide();
                new Readmess(tutor.getID()).ShowDialog();
                this.Show();
                break;

            case "עדכון פרטים אישיים":
                this.Hide();
                new Update_User_Info(this.tutor).ShowDialog();           ////////////
                this.Show();
                break;

            default:
                MessageBox.Show("Please choose option!");

                break;
            }
        }
Example #2
0
        private void btn_Lecturer_Address_Confirm_Click(object sender, EventArgs e)
        {
            if (txtB_Address_New.Text.Length > 0 || Check_Letters_And_Numbers_Only(txtB_Address_New.Text))
            {
                if (lecturer != null)
                {
                    lecDB.Update_Address(txtB_Address_New.Text, lecturer.getID());
                }
                else if (tutor != null)
                {
                    tutDB.Update_Address(txtB_Address_New.Text, tutor.getID());
                }
                else if (student != null)
                {
                    stuDB.Update_Address(txtB_Address_New.Text, student.getID());
                }
                else if (secretary != null)
                {
                    secDB.Update_Address(txtB_Address_New.Text, secretary.getID());
                }
                btn_Address_Cancell.PerformClick();
            }

            else
            {
                MessageBox.Show("כתובת בלתי חוקית");
            }
        }
Example #3
0
 public string Get_ID()
 {
     if (student != null)
     {
         return(student.getID());
     }
     else if (professor != null)
     {
         return(professor.getID());
     }
     else if (doctor != null)
     {
         return(doctor.getID());
     }
     else if (junior != null)
     {
         return(junior.getID());
     }
     else if (tutor != null)
     {
         return(tutor.getID());
     }
     else if (secretary != null)
     {
         return(secretary.getID());
     }
     else if (deptManager != null)
     {
         return(deptManager.getID());
     }
     else
     {
         return("Can't get the users ID.");
     }
 }