public HistoryLaboratoryExamination(int IDP)
        {
            idpat = IDP;
            InitializeComponent();


            var a = SQLDoc.GetLab(IDP);

            Mainlist.Items.Clear();

            foreach (var order in a)
            {
                ListViewItem lvi = new ListViewItem(order.laboratoryExaminationTable.Id_Examination.ToString());
                lvi.SubItems.Add(order.appointmentTable.Date_Appointment.ToString()); //data
                lvi.SubItems.Add(order.staffTable.Surname);                           //nazwisko lekarza
                lvi.SubItems.Add(order.laboratoryExaminationTable.State);             //stan


                Mainlist.Items.Add(lvi);
            }
            Mainlist.FullRowSelect = true;
            Mainlist.GridLines     = true;
        }