Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e) //edit
        {
            if (textBox1.TextLength != 0 && textBox2.TextLength != 0 && textBox3.TextLength != 0 && Regex.IsMatch(textBox3.Text.ToString(), @"^(\d{11})$"))
            {
                SQLRec.EditPatient(id, textBox1.Text, textBox2.Text, textBox3.Text);
                MessageBox.Show("Zmieniono dane pacjenta");
                this.Controls.Clear();
                this.Visible = false;
                this.Parent.Hide();

                textb.Text = "changed";
            }
            else
            {
                MessageBox.Show("Brak Danych lub błędny pesel");
            }
        }