Пример #1
0
 private void Button1_Click(object sender, EventArgs e)
 {
     if (radioButton1.Checked)
     {
         PaidStudent paidStudent = new PaidStudent(textBox1.Text, Convert.ToByte(comboBox1.GetItemText(comboBox1.SelectedItem)), int.Parse(textBox2.Text));
         StudentsList.add(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));
         StudentsList.add(stateStudent);
         comboBox2.Items.Add(textBox1.Text);
     }
 }
Пример #2
0
 private void Button3_Click(object sender, EventArgs e)
 {
     richTextBox1.Text = StudentsList.getAll();
 }
Пример #3
0
 private void Button2_Click(object sender, EventArgs e)
 {
     richTextBox1.Text = StudentsList.get(comboBox2.GetItemText(comboBox2.SelectedItem));
 }