private void button1_Click(object sender, EventArgs e)
        {
            string examCode = "";

            /* ExaminationsSearchCriteria examinationSearchCriteria = new ExaminationsSearchCriteria();
             * examinationSearchCriteria.setExaminationName(comboBox1.Text);
             * //MessageBox.Show(comboBox1.Text);
             * var resExa = SQLDoc.GetLaboratoryExamination(examinationSearchCriteria);
             *
             * foreach (var order in resExa)
             * {
             *   examCode = order.examDictionaryTable.Exam_Code;
             *
             * }*/
            examCode = SQLDoc.GetExamCode(comboBox1.Text.ToString()).First().Exam_Code.ToString();
            int idAppointment = Int32.Parse(IDVis);


            {
                if (examCode != "")
                {
                    if (procedure == 1)
                    {
                        SQLDoc.insertLabolatoryExamination(idAppointment, examCode, textBox5.Text);
                        Panel P = new Panel();
                        P.Controls.Clear();
                        this.Hide();
                        this.Parent.Controls.Add(new LabolatoryExaminantion(idpat, IDVis, 2));
                    }
                    else if (procedure == 2)
                    {
                        int idExamination = Int32.Parse(textBox10.Text);
                        SQLDoc.updateLabolatoryExamination(idExamination, examCode, textBox5.Text);
                        Panel P = new Panel();
                        P.Controls.Clear();
                        this.Hide();
                        this.Parent.Controls.Add(new LabolatoryExaminantion(idpat, IDVis, procedure));
                    }
                }
                else
                {
                    MessageBox.Show("Wymagane dane: rodzaj badania.");
                }
            }
        }