Пример #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         Met10 m = new Met10();
         m.Delete(comboBox1.Items[comboBox1.SelectedIndex].ToString());
         this.Close();
     }
     catch { MessageBox.Show("Error"); }
 }
Пример #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         Met10 d = new Met10();
         d.ADD(textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text);
         this.Close();
     }
     catch (ArgumentOutOfRangeException) { MessageBox.Show("Не все поля заполнены"); }
     catch { MessageBox.Show("Error"); }
 }
Пример #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         Met10 m = new Met10();
         m.Edit(Convert.ToInt32(comboBox1.Items[comboBox1.SelectedIndex]), textBox1.Text, textBox2.Text, textBox4.Text, textBox5.Text);
         this.Close();
     }
     catch (ArgumentOutOfRangeException) { MessageBox.Show("Не все поля заполнены"); }
     catch { MessageBox.Show("Error"); }
 }