private void button1_Click(object sender, EventArgs e) { if (textBox1.Text != "" && textBox2.Text != "" && textBox3.Text != "" && textBox4.Text != "" && maskedTextBox1.Text != "") { Hide(); int mode = 0; if (button1.Text == "Добавить") { mode = 1; } else { mode = 2; } EditLS edit = new EditLS(mode, Convert.ToInt32(label8.Text), comboBox2.SelectedIndex + 1, comboBox1.Text, textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text, maskedTextBox1.Text); edit.ShowDialog(); Close(); } }
private void buttonEdit_Click(object sender, EventArgs e) { Hide(); EditLS newedit = new EditLS(); newedit.ShowDialog(); Show(); //Close(); }