Beispiel #1
0
        public MainForm()
        {
            InitializeComponent();
            //Console.WriteLine(Width + "  " + Height);
            textBox7.Text = DateTime.Today.ToLongDateString();
            OleDbConnection aConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MedLab_DataBase.mdb");

#pragma warning disable CS0219 // The variable 'i' is assigned but its value is never used
            int i = 0;
#pragma warning restore CS0219 // The variable 'i' is assigned but its value is never used
            try
            {
                //aConnection.Open();
                //OleDbCommand aCommand = new OleDbCommand("SELECT * FROM Hematologie", aConnection);
                //OleDbDataReader myreader = aCommand.ExecuteReader(CommandBehavior.CloseConnection);
                //while (myreader.Read())
                // {
                //    s1[i++] = myreader.GetString(1)+"   "+myreader.GetString(5);

                // }
                checkedListBox1.Items.AddRange(s1);

                checkedListBox2.Items.AddRange(s2);

                checkedListBox4.Items.AddRange(s4);

                checkedListBox3.Items.AddRange(s3);
            }

#pragma warning disable CS0168 // The variable 'exc' is declared but never used
            catch (Exception exc)
#pragma warning restore CS0168 // The variable 'exc' is declared but never used
            {
            }
            dataGridViewX1.Columns.Add("nr_crt", "Nr crt");
            dataGridViewX1.Columns.Add("analize", "Examen clinic");
            dataGridViewX1.Columns.Add("rezultate", "Rezultat");
            PDFWriter pw = new PDFWriter();
            PDFWriter.write_pdf();
            aut = new Autentificare();
        }
Beispiel #2
0
        public MainForm()
        {
            InitializeComponent();
            //Console.WriteLine(Width + "  " + Height);
            textBox7.Text = DateTime.Today.ToLongDateString();
            OleDbConnection aConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MedLab_DataBase.mdb");
               int i=0;
            try
            {
                //aConnection.Open();
                //OleDbCommand aCommand = new OleDbCommand("SELECT * FROM Hematologie", aConnection);
                //OleDbDataReader myreader = aCommand.ExecuteReader(CommandBehavior.CloseConnection);
                //while (myreader.Read())
               // {
                //    s1[i++] = myreader.GetString(1)+"   "+myreader.GetString(5);

               // }
                checkedListBox1.Items.AddRange(s1);

                checkedListBox2.Items.AddRange(s2);

                checkedListBox4.Items.AddRange(s4);

                checkedListBox3.Items.AddRange(s3);

            }

            catch (Exception exc)
            {

            }
                    dataGridViewX1.Columns.Add("nr_crt", "Nr crt");
            dataGridViewX1.Columns.Add("analize", "Examen clinic");
            dataGridViewX1.Columns.Add("rezultate", "Rezultat");
            PDFWriter pw = new PDFWriter();
            PDFWriter.write_pdf();
            aut = new Autentificare();
        }