Guest User

Untitled

a guest
Jun 25th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. private void button1_Click(object sender, EventArgs e)
  2. {
  3. if (textBox1.Text != String.Empty && textBox2.Text != String.Empty && textBox3.Text != String.Empty && textBox4.Text != String.Empty && maskedTextBox1.Text != String.Empty)
  4. {
  5. tablTableAdapter = tablTableAdapter.Insert(Convert.ToInt32(numericUpDown1.Value), textBox1.Text);
  6. tablTableAdapter = tablTableAdapter.Insert(Convert.ToInt32(numericUpDown2.Value), textBox2.Text);
  7. tablTableAdapter = tablTableAdapter.Insert(Convert.ToInt32(numericUpDown3.Value), textBox3.Text);
  8. tablTableAdapter = tablTableAdapter.Insert(Convert.ToInt32(numericUpDown4.Value), textBox4.Text);
  9. tablTableAdapter = tablTableAdapter.Insert(Convert.ToInt32(numericUpDown5.Value), textBox5.Text);
  10. tablTableAdapter = tablTableAdapter.Insert(Convert.ToInt32(numericUpDown6.Value), textBox6.Text);
  11. MessageBox.Show("Добавлено!");
  12. Close();
  13. }
  14. else
  15. MessageBox.Show("Не все поля были заполнены!");
  16. }
Add Comment
Please, Sign In to add comment