private void Button1_Click(object sender, EventArgs e) { StudentsArray.needResize(); if (radioButton1.Checked) { PaidStudent paidStudent = new PaidStudent(textBox1.Text, Convert.ToByte(comboBox1.GetItemText(comboBox1.SelectedItem)), int.Parse(textBox2.Text)); StudentsArray.addStudent(paidStudent); comboBox2.Items.Add(textBox1.Text); } else if (radioButton2.Checked) { StateStudent stateStudent = new StateStudent(textBox1.Text, Convert.ToByte(comboBox1.GetItemText(comboBox1.SelectedItem)), int.Parse(textBox2.Text)); StudentsArray.addStudent(stateStudent); comboBox2.Items.Add(textBox1.Text); } }
private void Button2_Click_1(object sender, EventArgs e) { richTextBox1.Text = StudentsArray.getAllStudent(); }
private void Button4_Click(object sender, EventArgs e) { richTextBox1.Text = StudentsArray.getStudent(comboBox2.GetItemText(comboBox2.SelectedItem)); }