예제 #1
0
        public void fadd_Patient_button1_Click(Fadd_Patient fp, TextBox textBox1, TextBox textBox2, TextBox textBox3, RadioButton radioButton2, Label label5)
        {
            string first_name = fadd_Patient_check_first_name(textBox1);
            string last_name  = fadd_Patient_check_last_name(textBox1, textBox2);
            long   pesel      = fadd_Patient_check_pesel(textBox1, textBox3);
            string gender     = "M";

            if (radioButton2.Checked)
            {
                gender = "K";
            }

            if (first_name != null & last_name != null & pesel > 0)
            {
                string command = $"INSERT INTO test_patient (pesel, first_name, last_name, gender) VALUES ({pesel}, '{first_name}', '{last_name}', '{gender}');";
                session.Execute(command);
                fp.Hide();
            }
            else
            {
                label5.Text = "Co najmniej jedna wartość jest błędna!";
            }
        }
예제 #2
0
 public void fadd_Patient_button2_Click(Fadd_Patient fp)
 {
     fp.Hide();
 }