Ejemplo n.º 1
0
        private void Button2_Click(object sender, EventArgs e)
        {
            int i = listBox.SelectedIndex;

            if (this.del_radioButton.Checked == true)
            {
                string  name = this.listBox.SelectedItem.ToString();
                Student ss   = new Student();
                ss.name = name;
                this.Refresh();
                if (i >= 0)
                {
                    s.Remove(ss);

                    this.listBox.DataSource = null;
                    this.listBox.DataSource = s;
                }
            }
            else
            {
                AddStudent ass = new AddStudent(s, i);
                ass.ShowDialog();
            }
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            AddStudent add = new AddStudent(students);

            add.Show();
        }