Ejemplo n.º 1
0
 public void RegisterBtn_Click(object sender, EventArgs e)
 {
     if (DaySECombo.SelectedItem == null)
     {
         MessageBox.Show("You have to select a lecturer!", "ERROR", MessageBoxButtons.OK);
         return;
     }
     (Globals.LoggedUser as Classes.Student).registertoCourse(CourseIdText.Text.ToString(), DaySECombo.GetItemText(DaySECombo.SelectedItem));
     this.Close();
 }
        private void RegisterBtn_Click(object sender, EventArgs e)
        {
            if (DaySECombo.SelectedItem == null)
            {
                MessageBox.Show("You have to select a lecturer!", "ERROR", MessageBoxButtons.OK);
                return;
            }
            if (Res == false)
            {
                MessageBox.Show("Note: No lessons was found, No changes has been done!", "NOTE", MessageBoxButtons.OK);
                this.Close();
                return;
            }
            Boolean res = false;

            res = Globals.GlobalSecretary.addcourseStudent(CourseIdText.Text.ToString(), _ID, DaySECombo.GetItemText(DaySECombo.SelectedItem));
            if (res)
            {
                MessageBox.Show("Successfully added course:" + CourseNameText.Text.ToString() + "' to" + "ID:" + _ID);
            }
            this.Close();
        }