private void button1_Click(object sender, EventArgs e) { if (Check()) { WorkWithBD.EditJudge(Id, textBox1.Text, textBox2.Text, textBox3.Text, dateTimePicker1.Value.ToString("yyyyMMdd"), numericUpDown1.Value.ToString()); this.Close(); } }