コード例 #1
0
        private void Remove_super_Click(object sender, EventArgs e)
        {
            string remove = Remove_sup.Text;

            if (remove == "")
            {
                MessageBox.Show("You didn't enter a last name! Please, enter a last name.", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                if ((MessageBox.Show("Are you sure that you wish to remove this supervisor?", "Exit SomerenAdministration?",
                                     MessageBoxButtons.YesNo, MessageBoxIcon.Question,
                                     MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes))
                {
                    SomerenUI.RemoveSuper(remove);

                    panel1.Controls.Clear();
                    Remove_sup.Clear();

                    groupBox1.Text = "Supervisors";
                    panel1.Controls.Add(Remove_super);
                    panel1.Controls.Add(Remove_sup);
                    panel1.Controls.Add(Remove_s);
                    panel1.Controls.Add(Add_super);
                    panel1.Controls.Add(Add_sup);
                    panel1.Controls.Add(Add_s);
                    panel1.Controls.Add(SomerenUI.showListSupervisors());
                    MessageBox.Show("The supervisor was successfully removed!", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
コード例 #2
0
        private void begeleidersToolStripMenuItem_Click(object sender, EventArgs e)
        {
            panel1.Controls.Clear();
            groupBox1.Text = "Supervisors";

            panel1.Controls.Add(Remove_super);
            panel1.Controls.Add(Remove_sup);
            panel1.Controls.Add(Remove_s);
            panel1.Controls.Add(Add_super);
            panel1.Controls.Add(Add_sup);
            panel1.Controls.Add(Add_s);
            panel1.Controls.Add(SomerenUI.showListSupervisors());
        }
コード例 #3
0
        private void Add_super_Click(object sender, EventArgs e)
        {
            string add = Add_sup.Text;

            if (add == "")
            {
                MessageBox.Show("You didn't enter a last name! Please, enter a last name.", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            SomerenUI.AddSuper(add);

            panel1.Controls.Clear();
            Add_sup.Clear();

            groupBox1.Text = "Supervisors";
            panel1.Controls.Add(Remove_super);
            panel1.Controls.Add(Remove_sup);
            panel1.Controls.Add(Remove_s);
            panel1.Controls.Add(Add_super);
            panel1.Controls.Add(Add_sup);
            panel1.Controls.Add(Add_s);
            panel1.Controls.Add(SomerenUI.showListSupervisors());
        }