Beispiel #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            c = new Calcul();
            bool ok = true,ok2=true;
            try
            {
                viewDatePersTableAdapter.Fill(dateMedDataSet.ViewDatePers);
            }
            catch
            {
                ok = false;
            }
            try
            {
                statisticaTableAdapter.Fill(dateMedDataSet.Statistica);
            }
            catch
            {
                ok2 = false;
            }
            DataTable dt = dateMedDataSet.ViewDatePers;
            DataTable dt2 = dateMedDataSet.Statistica;
            if (ok == true)
            {
                if (istoriccomboBox.Text != "Selectati" && valcomboBox.Text != "Selectati")
                {
                    if (istoriccomboBox.Text == "Diabet Zaharat Parinti")
                    {
                        numelistBox.Items.Clear();
                        indicelistBox.Items.Clear();
                        datelistBox.Items.Clear();
                        otherlistBox.Items.Clear();
                        valoarelabel.Text = istoriccomboBox.Text;
                        foreach (DataRow row in dt.Rows)
                        {
                            if (row["DZP"].ToString() == valcomboBox.Text)
                            {
                                numelistBox.Items.Add(row["Nume"]);
                                indicelistBox.Items.Add(row["DZP"]);
                                ctr++;
                                paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                #region Alte Valori2
                                if (comboBox2.Text == "CNP")
                                {
                                    otherlabel.Text = comboBox2.Text;
                                    otherlistBox.Items.Add(row["CNP"]);
                                }
                                if (comboBox2.Text == "Ocupatie")
                                {
                                    otherlabel.Text = comboBox2.Text;
                                    otherlistBox.Items.Add(row["Ocupatie"]);
                                }
                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                {
                                    otherlistBox.Items.Add(row["DZP"]);
                                    otherlabel.Text = comboBox2.Text;
                                }
                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                {
                                    otherlabel.Text = comboBox2.Text;
                                    otherlistBox.Items.Add(row["DZF"]);
                                }
                                if (comboBox2.Text == "Boala Cardiovasculara")
                                {
                                    otherlabel.Text = comboBox2.Text;
                                    otherlistBox.Items.Add(row["BoliCardio"]);
                                }
                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                {
                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                    otherlistBox.Items.Add(row["HAFam"]);
                                }
                                if (comboBox2.Text == "Dislipidemie")
                                {
                                    otherlabel.Text = comboBox2.Text;
                                    otherlistBox.Items.Add(row["Dislipidemie"]);
                                }
                                if (comboBox2.Text == "Obezitate")
                                {
                                    otherlabel.Text = comboBox2.Text;
                                    otherlistBox.Items.Add(row["Obezitate"]);
                                }
                                if (comboBox2.Text == "Morti Subite")
                                {
                                    otherlabel.Text = comboBox2.Text;
                                    otherlistBox.Items.Add(row["MortiSubite"]);
                                }
                                if (comboBox2.Text == "Copil Macrosom")
                                {
                                    otherlabel.Text = comboBox2.Text;
                                    otherlistBox.Items.Add(row["CopilMacro"]);
                                }
                                if (comboBox2.Text == "Diabet Gestational")
                                {
                                    otherlabel.Text = comboBox2.Text;
                                    otherlistBox.Items.Add(row["DiabetG"]);

                                }
                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                {
                                    otherlabel.Text = comboBox2.Text;
                                    otherlistBox.Items.Add(row["CardioIschemica"]);
                                }
                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                {
                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                    otherlistBox.Items.Add(row["HAPers"]);
                                }
                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                {
                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                    otherlistBox.Items.Add(row["IMAVC"]);
                                }
                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                {
                                    otherlabel.Text = comboBox2.Text;
                                    otherlistBox.Items.Add(row["STGlucoza"]);
                                }
                                if (comboBox2.Text == "Varsta")
                                {
                                    otherlabel.Text = comboBox2.Text;
                                    otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                }
                                if (ok2 == true)
                                {
                                    foreach (DataRow row2 in dt2.Rows)
                                    {
                                        if (row["CNP"].ToString() == row2["CNP"].ToString())
                                        {
                                            if (comboBox2.Text == "Fumat")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                if (row2["Fumat"].ToString() == "DA")
                                                    otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                else
                                                    otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                            }
                                            if (comboBox2.Text == "Activitate Fizica")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                            }
                                            if (comboBox2.Text == "Masa Corporala")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                            }
                                            if (comboBox2.Text == "Inaltime")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                            }
                                            if (comboBox2.Text == "Circumferinta Abdominala")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                            }
                                            if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                            }
                                            if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                            }
                                            if (comboBox2.Text == "Glicemie")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                            }
                                            if (comboBox2.Text == "HDL Colesterol")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                            }
                                            if (comboBox2.Text == "LDL Colesterol")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                            }
                                            if (comboBox2.Text == "Trigliceride")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                            }
                                            if (comboBox2.Text == "Indice de masa corporala")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                imc = imcf.ToString();
                                                imcf = (float)Convert.ToDouble(imc);
                                                otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                            }
                                            if (comboBox2.Text == "Risc Cardiovascular")
                                            {
                                                int rcvs;
                                                rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                            }
                                        }
                                    }
                                }
                                #endregion
                            }
                            else
                                if (valcomboBox.Text == "Toate Valorile")
                                {
                                    numelistBox.Items.Add(row["Nume"]);
                                    indicelistBox.Items.Add(row["DZP"]);
                                    ctr++;
                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                    #region Alte Valori2
                                    if (comboBox2.Text == "CNP")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["CNP"]);
                                    }
                                    if (comboBox2.Text == "Ocupatie")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["Ocupatie"]);
                                    }
                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                    {
                                        otherlistBox.Items.Add(row["DZP"]);
                                        otherlabel.Text = comboBox2.Text;
                                    }
                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["DZF"]);
                                    }
                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["BoliCardio"]);
                                    }
                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                    {
                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                        otherlistBox.Items.Add(row["HAFam"]);
                                    }
                                    if (comboBox2.Text == "Dislipidemie")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["Dislipidemie"]);
                                    }
                                    if (comboBox2.Text == "Obezitate")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["Obezitate"]);
                                    }
                                    if (comboBox2.Text == "Morti Subite")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["MortiSubite"]);
                                    }
                                    if (comboBox2.Text == "Copil Macrosom")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["CopilMacro"]);
                                    }
                                    if (comboBox2.Text == "Diabet Gestational")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["DiabetG"]);

                                    }
                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["CardioIschemica"]);
                                    }
                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                    {
                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                        otherlistBox.Items.Add(row["HAPers"]);
                                    }
                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                    {
                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                        otherlistBox.Items.Add(row["IMAVC"]);
                                    }
                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["STGlucoza"]);
                                    }
                                    if (comboBox2.Text == "Varsta")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                    }
                                    if (ok2 == true)
                                    {
                                        foreach (DataRow row2 in dt2.Rows)
                                        {
                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                            {
                                                if (comboBox2.Text == "Fumat")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    if (row2["Fumat"].ToString() == "DA")
                                                        otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    else
                                                        otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Activitate Fizica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Masa Corporala")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Inaltime")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Circumferinta Abdominala")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Glicemie")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "HDL Colesterol")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "LDL Colesterol")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Trigliceride")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Indice de masa corporala")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                    imc = imcf.ToString();
                                                    imcf = (float)Convert.ToDouble(imc);
                                                    otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Risc Cardiovascular")
                                                {
                                                    int rcvs;
                                                    rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                            }
                                        }
                                    }
                                    #endregion
                                }
                        }
                        ctr = 0;
                    }
                    else
                        if (istoriccomboBox.Text == "Diabet Zaharat Frati")
                        {
                            numelistBox.Items.Clear();
                            indicelistBox.Items.Clear();
                            datelistBox.Items.Clear();
                            otherlistBox.Items.Clear();
                            valoarelabel.Text = istoriccomboBox.Text;
                            foreach (DataRow row in dt.Rows)
                            {
                                if (row["DZF"].ToString() == valcomboBox.Text)
                                {
                                    numelistBox.Items.Add(row["Nume"]);
                                    indicelistBox.Items.Add(row["DZF"]);
                                    ctr++;
                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                    #region Alte Valori2
                                    if (comboBox2.Text == "CNP")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["CNP"]);
                                    }
                                    if (comboBox2.Text == "Ocupatie")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["Ocupatie"]);
                                    }
                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                    {
                                        otherlistBox.Items.Add(row["DZP"]);
                                        otherlabel.Text = comboBox2.Text;
                                    }
                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["DZF"]);
                                    }
                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["BoliCardio"]);
                                    }
                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                    {
                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                        otherlistBox.Items.Add(row["HAFam"]);
                                    }
                                    if (comboBox2.Text == "Dislipidemie")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["Dislipidemie"]);
                                    }
                                    if (comboBox2.Text == "Obezitate")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["Obezitate"]);
                                    }
                                    if (comboBox2.Text == "Morti Subite")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["MortiSubite"]);
                                    }
                                    if (comboBox2.Text == "Copil Macrosom")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["CopilMacro"]);
                                    }
                                    if (comboBox2.Text == "Diabet Gestational")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["DiabetG"]);

                                    }
                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["CardioIschemica"]);
                                    }
                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                    {
                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                        otherlistBox.Items.Add(row["HAPers"]);
                                    }
                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                    {
                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                        otherlistBox.Items.Add(row["IMAVC"]);
                                    }
                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["STGlucoza"]);
                                    }
                                    if (comboBox2.Text == "Varsta")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                    }
                                    if (ok2 == true)
                                    {
                                        foreach (DataRow row2 in dt2.Rows)
                                        {
                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                            {
                                                if (comboBox2.Text == "Fumat")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    if (row2["Fumat"].ToString() == "DA")
                                                        otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    else
                                                        otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Activitate Fizica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Masa Corporala")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Inaltime")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Circumferinta Abdominala")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Glicemie")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "HDL Colesterol")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "LDL Colesterol")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Trigliceride")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Indice de masa corporala")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                    imc = imcf.ToString();
                                                    imcf = (float)Convert.ToDouble(imc);
                                                    otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                                if (comboBox2.Text == "Risc Cardiovascular")
                                                {
                                                    int rcvs;
                                                    rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                }
                                            }
                                        }
                                    }
                                    #endregion
                                }
                                else
                                    if (valcomboBox.Text == "Toate Valorile")
                                    {
                                        numelistBox.Items.Add(row["Nume"]);
                                        indicelistBox.Items.Add(row["DZF"]);
                                        ctr++;
                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                        #region Alte Valori2
                                        if (comboBox2.Text == "CNP")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["CNP"]);
                                        }
                                        if (comboBox2.Text == "Ocupatie")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["Ocupatie"]);
                                        }
                                        if (comboBox2.Text == "Diabet Zaharat Parinti")
                                        {
                                            otherlistBox.Items.Add(row["DZP"]);
                                            otherlabel.Text = comboBox2.Text;
                                        }
                                        if (comboBox2.Text == "Diabet Zaharat Frati")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["DZF"]);
                                        }
                                        if (comboBox2.Text == "Boala Cardiovasculara")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["BoliCardio"]);
                                        }
                                        if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                        {
                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                            otherlistBox.Items.Add(row["HAFam"]);
                                        }
                                        if (comboBox2.Text == "Dislipidemie")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["Dislipidemie"]);
                                        }
                                        if (comboBox2.Text == "Obezitate")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["Obezitate"]);
                                        }
                                        if (comboBox2.Text == "Morti Subite")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["MortiSubite"]);
                                        }
                                        if (comboBox2.Text == "Copil Macrosom")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["CopilMacro"]);
                                        }
                                        if (comboBox2.Text == "Diabet Gestational")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["DiabetG"]);

                                        }
                                        if (comboBox2.Text == "Cardiopatie Ischemica")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["CardioIschemica"]);
                                        }
                                        if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                        {
                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                            otherlistBox.Items.Add(row["HAPers"]);
                                        }
                                        if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                        {
                                            otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                            otherlistBox.Items.Add(row["IMAVC"]);
                                        }
                                        if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["STGlucoza"]);
                                        }
                                        if (comboBox2.Text == "Varsta")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                        }
                                        if (ok2 == true)
                                        {
                                            foreach (DataRow row2 in dt2.Rows)
                                            {
                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                {
                                                    if (comboBox2.Text == "Fumat")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        if (row2["Fumat"].ToString() == "DA")
                                                            otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        else
                                                            otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Activitate Fizica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Masa Corporala")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Inaltime")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Glicemie")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "HDL Colesterol")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "LDL Colesterol")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Trigliceride")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Indice de masa corporala")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                        imc = imcf.ToString();
                                                        imcf = (float)Convert.ToDouble(imc);
                                                        otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Risc Cardiovascular")
                                                    {
                                                        int rcvs;
                                                        rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                }
                                            }
                                        }
                                        #endregion
                                    }
                            }
                            ctr = 0;
                        }
                        else
                            if (istoriccomboBox.Text == "Boala Cardiovasculara")
                            {
                                numelistBox.Items.Clear();
                                indicelistBox.Items.Clear();
                                datelistBox.Items.Clear();
                                otherlistBox.Items.Clear();
                                valoarelabel.Text = istoriccomboBox.Text;
                                foreach (DataRow row in dt.Rows)
                                {
                                    if (row["BoliCardio"].ToString() == valcomboBox.Text)
                                    {
                                        numelistBox.Items.Add(row["Nume"]);
                                        indicelistBox.Items.Add(row["BoliCardio"]);
                                        ctr++;
                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                        #region Alte Valori2
                                        if (comboBox2.Text == "CNP")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["CNP"]);
                                        }
                                        if (comboBox2.Text == "Ocupatie")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["Ocupatie"]);
                                        }
                                        if (comboBox2.Text == "Diabet Zaharat Parinti")
                                        {
                                            otherlistBox.Items.Add(row["DZP"]);
                                            otherlabel.Text = comboBox2.Text;
                                        }
                                        if (comboBox2.Text == "Diabet Zaharat Frati")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["DZF"]);
                                        }
                                        if (comboBox2.Text == "Boala Cardiovasculara")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["BoliCardio"]);
                                        }
                                        if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                        {
                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                            otherlistBox.Items.Add(row["HAFam"]);
                                        }
                                        if (comboBox2.Text == "Dislipidemie")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["Dislipidemie"]);
                                        }
                                        if (comboBox2.Text == "Obezitate")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["Obezitate"]);
                                        }
                                        if (comboBox2.Text == "Morti Subite")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["MortiSubite"]);
                                        }
                                        if (comboBox2.Text == "Copil Macrosom")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["CopilMacro"]);
                                        }
                                        if (comboBox2.Text == "Diabet Gestational")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["DiabetG"]);

                                        }
                                        if (comboBox2.Text == "Cardiopatie Ischemica")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["CardioIschemica"]);
                                        }
                                        if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                        {
                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                            otherlistBox.Items.Add(row["HAPers"]);
                                        }
                                        if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                        {
                                            otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                            otherlistBox.Items.Add(row["IMAVC"]);
                                        }
                                        if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["STGlucoza"]);
                                        }
                                        if (comboBox2.Text == "Varsta")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                        }
                                        if (ok2 == true)
                                        {
                                            foreach (DataRow row2 in dt2.Rows)
                                            {
                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                {
                                                    if (comboBox2.Text == "Fumat")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        if (row2["Fumat"].ToString() == "DA")
                                                            otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        else
                                                            otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Activitate Fizica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Masa Corporala")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Inaltime")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Glicemie")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "HDL Colesterol")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "LDL Colesterol")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Trigliceride")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Indice de masa corporala")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                        imc = imcf.ToString();
                                                        imcf = (float)Convert.ToDouble(imc);
                                                        otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                    if (comboBox2.Text == "Risc Cardiovascular")
                                                    {
                                                        int rcvs;
                                                        rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                    }
                                                }
                                            }
                                        }
                                        #endregion
                                    }
                                    else
                                        if (valcomboBox.Text == "Toate Valorile")
                                        {
                                            numelistBox.Items.Add(row["Nume"]);
                                            indicelistBox.Items.Add(row["BoliCardio"]);
                                            ctr++;
                                            paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                            #region Alte Valori2
                                            if (comboBox2.Text == "CNP")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["CNP"]);
                                            }
                                            if (comboBox2.Text == "Ocupatie")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["Ocupatie"]);
                                            }
                                            if (comboBox2.Text == "Diabet Zaharat Parinti")
                                            {
                                                otherlistBox.Items.Add(row["DZP"]);
                                                otherlabel.Text = comboBox2.Text;
                                            }
                                            if (comboBox2.Text == "Diabet Zaharat Frati")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["DZF"]);
                                            }
                                            if (comboBox2.Text == "Boala Cardiovasculara")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["BoliCardio"]);
                                            }
                                            if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                            {
                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                otherlistBox.Items.Add(row["HAFam"]);
                                            }
                                            if (comboBox2.Text == "Dislipidemie")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["Dislipidemie"]);
                                            }
                                            if (comboBox2.Text == "Obezitate")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["Obezitate"]);
                                            }
                                            if (comboBox2.Text == "Morti Subite")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["MortiSubite"]);
                                            }
                                            if (comboBox2.Text == "Copil Macrosom")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["CopilMacro"]);
                                            }
                                            if (comboBox2.Text == "Diabet Gestational")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["DiabetG"]);

                                            }
                                            if (comboBox2.Text == "Cardiopatie Ischemica")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["CardioIschemica"]);
                                            }
                                            if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                            {
                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                otherlistBox.Items.Add(row["HAPers"]);
                                            }
                                            if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                            {
                                                otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                otherlistBox.Items.Add(row["IMAVC"]);
                                            }
                                            if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["STGlucoza"]);
                                            }
                                            if (comboBox2.Text == "Varsta")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                            }
                                            if (ok2 == true)
                                            {
                                                foreach (DataRow row2 in dt2.Rows)
                                                {
                                                    if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                    {
                                                        if (comboBox2.Text == "Fumat")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            if (row2["Fumat"].ToString() == "DA")
                                                                otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            else
                                                                otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Activitate Fizica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Masa Corporala")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Inaltime")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Glicemie")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "HDL Colesterol")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "LDL Colesterol")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Trigliceride")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Indice de masa corporala")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                            imc = imcf.ToString();
                                                            imcf = (float)Convert.ToDouble(imc);
                                                            otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Risc Cardiovascular")
                                                        {
                                                            int rcvs;
                                                            rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                    }
                                                }
                                            }
                                            #endregion
                                        }
                                }
                                ctr = 0;
                            }
                            else
                                if (istoriccomboBox.Text == "Hipertensiune Arteriala(familie)")
                                {
                                    numelistBox.Items.Clear();
                                    indicelistBox.Items.Clear();
                                    datelistBox.Items.Clear();
                                    otherlistBox.Items.Clear();
                                    valoarelabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                    foreach (DataRow row in dt.Rows)
                                    {
                                        if (row["HAFam"].ToString() == valcomboBox.Text)
                                        {
                                            numelistBox.Items.Add(row["Nume"]);
                                            indicelistBox.Items.Add(row["HAFam"]);
                                            ctr++;
                                            paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                            #region Alte Valori2
                                            if (comboBox2.Text == "CNP")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["CNP"]);
                                            }
                                            if (comboBox2.Text == "Ocupatie")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["Ocupatie"]);
                                            }
                                            if (comboBox2.Text == "Diabet Zaharat Parinti")
                                            {
                                                otherlistBox.Items.Add(row["DZP"]);
                                                otherlabel.Text = comboBox2.Text;
                                            }
                                            if (comboBox2.Text == "Diabet Zaharat Frati")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["DZF"]);
                                            }
                                            if (comboBox2.Text == "Boala Cardiovasculara")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["BoliCardio"]);
                                            }
                                            if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                            {
                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                otherlistBox.Items.Add(row["HAFam"]);
                                            }
                                            if (comboBox2.Text == "Dislipidemie")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["Dislipidemie"]);
                                            }
                                            if (comboBox2.Text == "Obezitate")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["Obezitate"]);
                                            }
                                            if (comboBox2.Text == "Morti Subite")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["MortiSubite"]);
                                            }
                                            if (comboBox2.Text == "Copil Macrosom")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["CopilMacro"]);
                                            }
                                            if (comboBox2.Text == "Diabet Gestational")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["DiabetG"]);

                                            }
                                            if (comboBox2.Text == "Cardiopatie Ischemica")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["CardioIschemica"]);
                                            }
                                            if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                            {
                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                otherlistBox.Items.Add(row["HAPers"]);
                                            }
                                            if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                            {
                                                otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                otherlistBox.Items.Add(row["IMAVC"]);
                                            }
                                            if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["STGlucoza"]);
                                            }
                                            if (comboBox2.Text == "Varsta")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                            }
                                            if (ok2 == true)
                                            {
                                                foreach (DataRow row2 in dt2.Rows)
                                                {
                                                    if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                    {
                                                        if (comboBox2.Text == "Fumat")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            if (row2["Fumat"].ToString() == "DA")
                                                                otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            else
                                                                otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Activitate Fizica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Masa Corporala")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Inaltime")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Glicemie")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "HDL Colesterol")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "LDL Colesterol")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Trigliceride")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Indice de masa corporala")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                            imc = imcf.ToString();
                                                            imcf = (float)Convert.ToDouble(imc);
                                                            otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                        if (comboBox2.Text == "Risc Cardiovascular")
                                                        {
                                                            int rcvs;
                                                            rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                        }
                                                    }
                                                }
                                            }
                                            #endregion
                                        }
                                        else
                                            if (valcomboBox.Text == "Toate Valorile")
                                            {
                                                numelistBox.Items.Add(row["Nume"]);
                                                indicelistBox.Items.Add(row["HAFam"]);
                                                ctr++;
                                                paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                #region Alte Valori2
                                                if (comboBox2.Text == "CNP")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["CNP"]);
                                                }
                                                if (comboBox2.Text == "Ocupatie")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["Ocupatie"]);
                                                }
                                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                {
                                                    otherlistBox.Items.Add(row["DZP"]);
                                                    otherlabel.Text = comboBox2.Text;
                                                }
                                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["DZF"]);
                                                }
                                                if (comboBox2.Text == "Boala Cardiovasculara")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["BoliCardio"]);
                                                }
                                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                {
                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                    otherlistBox.Items.Add(row["HAFam"]);
                                                }
                                                if (comboBox2.Text == "Dislipidemie")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["Dislipidemie"]);
                                                }
                                                if (comboBox2.Text == "Obezitate")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["Obezitate"]);
                                                }
                                                if (comboBox2.Text == "Morti Subite")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["MortiSubite"]);
                                                }
                                                if (comboBox2.Text == "Copil Macrosom")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["CopilMacro"]);
                                                }
                                                if (comboBox2.Text == "Diabet Gestational")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["DiabetG"]);

                                                }
                                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["CardioIschemica"]);
                                                }
                                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                {
                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                    otherlistBox.Items.Add(row["HAPers"]);
                                                }
                                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                {
                                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                    otherlistBox.Items.Add(row["IMAVC"]);
                                                }
                                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["STGlucoza"]);
                                                }
                                                if (comboBox2.Text == "Varsta")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                }
                                                if (ok2 == true)
                                                {
                                                    foreach (DataRow row2 in dt2.Rows)
                                                    {
                                                        if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                        {
                                                            if (comboBox2.Text == "Fumat")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                if (row2["Fumat"].ToString() == "DA")
                                                                    otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                else
                                                                    otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Activitate Fizica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Masa Corporala")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Inaltime")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Circumferinta Abdominala")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Glicemie")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "HDL Colesterol")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "LDL Colesterol")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Trigliceride")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Indice de masa corporala")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                imc = imcf.ToString();
                                                                imcf = (float)Convert.ToDouble(imc);
                                                                otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Risc Cardiovascular")
                                                            {
                                                                int rcvs;
                                                                rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                        }
                                                    }
                                                }
                                                #endregion
                                            }
                                    }
                                    ctr = 0;
                                }
                                else
                                    if (istoriccomboBox.Text == "Dislipidemie")
                                    {
                                        numelistBox.Items.Clear();
                                        indicelistBox.Items.Clear();
                                        datelistBox.Items.Clear();
                                        otherlistBox.Items.Clear();
                                        valoarelabel.Text = istoriccomboBox.Text;
                                        foreach (DataRow row in dt.Rows)
                                        {
                                            if (row["Dislipidemie"].ToString() == valcomboBox.Text)
                                            {
                                                numelistBox.Items.Add(row["Nume"]);
                                                indicelistBox.Items.Add(row["Dislipidemie"]);
                                                ctr++;
                                                paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                #region Alte Valori2
                                                if (comboBox2.Text == "CNP")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["CNP"]);
                                                }
                                                if (comboBox2.Text == "Ocupatie")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["Ocupatie"]);
                                                }
                                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                {
                                                    otherlistBox.Items.Add(row["DZP"]);
                                                    otherlabel.Text = comboBox2.Text;
                                                }
                                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["DZF"]);
                                                }
                                                if (comboBox2.Text == "Boala Cardiovasculara")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["BoliCardio"]);
                                                }
                                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                {
                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                    otherlistBox.Items.Add(row["HAFam"]);
                                                }
                                                if (comboBox2.Text == "Dislipidemie")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["Dislipidemie"]);
                                                }
                                                if (comboBox2.Text == "Obezitate")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["Obezitate"]);
                                                }
                                                if (comboBox2.Text == "Morti Subite")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["MortiSubite"]);
                                                }
                                                if (comboBox2.Text == "Copil Macrosom")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["CopilMacro"]);
                                                }
                                                if (comboBox2.Text == "Diabet Gestational")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["DiabetG"]);

                                                }
                                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["CardioIschemica"]);
                                                }
                                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                {
                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                    otherlistBox.Items.Add(row["HAPers"]);
                                                }
                                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                {
                                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                    otherlistBox.Items.Add(row["IMAVC"]);
                                                }
                                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["STGlucoza"]);
                                                }
                                                if (comboBox2.Text == "Varsta")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                }
                                                if (ok2 == true)
                                                {
                                                    foreach (DataRow row2 in dt2.Rows)
                                                    {
                                                        if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                        {
                                                            if (comboBox2.Text == "Fumat")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                if (row2["Fumat"].ToString() == "DA")
                                                                    otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                else
                                                                    otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Activitate Fizica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Masa Corporala")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Inaltime")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Circumferinta Abdominala")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Glicemie")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "HDL Colesterol")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "LDL Colesterol")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Trigliceride")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Indice de masa corporala")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                imc = imcf.ToString();
                                                                imcf = (float)Convert.ToDouble(imc);
                                                                otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                            if (comboBox2.Text == "Risc Cardiovascular")
                                                            {
                                                                int rcvs;
                                                                rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                            }
                                                        }
                                                    }
                                                }
                                                #endregion
                                            }
                                            else
                                                if (valcomboBox.Text == "Toate Valorile")
                                                {
                                                    numelistBox.Items.Add(row["Nume"]);
                                                    indicelistBox.Items.Add(row["Dislipidemie"]);
                                                    ctr++;
                                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                    #region Alte Valori2
                                                    if (comboBox2.Text == "CNP")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["CNP"]);
                                                    }
                                                    if (comboBox2.Text == "Ocupatie")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["Ocupatie"]);
                                                    }
                                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                    {
                                                        otherlistBox.Items.Add(row["DZP"]);
                                                        otherlabel.Text = comboBox2.Text;
                                                    }
                                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["DZF"]);
                                                    }
                                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["BoliCardio"]);
                                                    }
                                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                    {
                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                        otherlistBox.Items.Add(row["HAFam"]);
                                                    }
                                                    if (comboBox2.Text == "Dislipidemie")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["Dislipidemie"]);
                                                    }
                                                    if (comboBox2.Text == "Obezitate")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["Obezitate"]);
                                                    }
                                                    if (comboBox2.Text == "Morti Subite")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["MortiSubite"]);
                                                    }
                                                    if (comboBox2.Text == "Copil Macrosom")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["CopilMacro"]);
                                                    }
                                                    if (comboBox2.Text == "Diabet Gestational")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["DiabetG"]);

                                                    }
                                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["CardioIschemica"]);
                                                    }
                                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                    {
                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                        otherlistBox.Items.Add(row["HAPers"]);
                                                    }
                                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                    {
                                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                        otherlistBox.Items.Add(row["IMAVC"]);
                                                    }
                                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["STGlucoza"]);
                                                    }
                                                    if (comboBox2.Text == "Varsta")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                    }
                                                    if (ok2 == true)
                                                    {
                                                        foreach (DataRow row2 in dt2.Rows)
                                                        {
                                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                            {
                                                                if (comboBox2.Text == "Fumat")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    if (row2["Fumat"].ToString() == "DA")
                                                                        otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    else
                                                                        otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Activitate Fizica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Masa Corporala")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Inaltime")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Circumferinta Abdominala")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Glicemie")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "HDL Colesterol")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "LDL Colesterol")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Trigliceride")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Indice de masa corporala")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                    imc = imcf.ToString();
                                                                    imcf = (float)Convert.ToDouble(imc);
                                                                    otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Risc Cardiovascular")
                                                                {
                                                                    int rcvs;
                                                                    rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                            }
                                                        }
                                                    }
                                                    #endregion
                                                }
                                        }
                                        ctr = 0;
                                    }
                                    else
                                        if (istoriccomboBox.Text == "Obezitate")
                                        {
                                            numelistBox.Items.Clear();
                                            indicelistBox.Items.Clear();
                                            datelistBox.Items.Clear();
                                            otherlistBox.Items.Clear();
                                            valoarelabel.Text = istoriccomboBox.Text;
                                            foreach (DataRow row in dt.Rows)
                                            {
                                                if (row["Obezitate"].ToString() == valcomboBox.Text)
                                                {
                                                    numelistBox.Items.Add(row["Nume"]);
                                                    indicelistBox.Items.Add(row["Obezitate"]);
                                                    ctr++;
                                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                    #region Alte Valori2
                                                    if (comboBox2.Text == "CNP")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["CNP"]);
                                                    }
                                                    if (comboBox2.Text == "Ocupatie")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["Ocupatie"]);
                                                    }
                                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                    {
                                                        otherlistBox.Items.Add(row["DZP"]);
                                                        otherlabel.Text = comboBox2.Text;
                                                    }
                                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["DZF"]);
                                                    }
                                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["BoliCardio"]);
                                                    }
                                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                    {
                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                        otherlistBox.Items.Add(row["HAFam"]);
                                                    }
                                                    if (comboBox2.Text == "Dislipidemie")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["Dislipidemie"]);
                                                    }
                                                    if (comboBox2.Text == "Obezitate")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["Obezitate"]);
                                                    }
                                                    if (comboBox2.Text == "Morti Subite")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["MortiSubite"]);
                                                    }
                                                    if (comboBox2.Text == "Copil Macrosom")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["CopilMacro"]);
                                                    }
                                                    if (comboBox2.Text == "Diabet Gestational")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["DiabetG"]);

                                                    }
                                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["CardioIschemica"]);
                                                    }
                                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                    {
                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                        otherlistBox.Items.Add(row["HAPers"]);
                                                    }
                                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                    {
                                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                        otherlistBox.Items.Add(row["IMAVC"]);
                                                    }
                                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["STGlucoza"]);
                                                    }
                                                    if (comboBox2.Text == "Varsta")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                    }
                                                    if (ok2 == true)
                                                    {
                                                        foreach (DataRow row2 in dt2.Rows)
                                                        {
                                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                            {
                                                                if (comboBox2.Text == "Fumat")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    if (row2["Fumat"].ToString() == "DA")
                                                                        otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    else
                                                                        otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Activitate Fizica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Masa Corporala")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Inaltime")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Circumferinta Abdominala")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Glicemie")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "HDL Colesterol")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "LDL Colesterol")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Trigliceride")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Indice de masa corporala")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                    imc = imcf.ToString();
                                                                    imcf = (float)Convert.ToDouble(imc);
                                                                    otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                                if (comboBox2.Text == "Risc Cardiovascular")
                                                                {
                                                                    int rcvs;
                                                                    rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                }
                                                            }
                                                        }
                                                    }
                                                    #endregion
                                                }
                                                else
                                                    if (valcomboBox.Text == "Toate Valorile")
                                                    {
                                                        numelistBox.Items.Add(row["Nume"]);
                                                        indicelistBox.Items.Add(row["Obezitate"]);
                                                        ctr++;
                                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                        #region Alte Valori2
                                                        if (comboBox2.Text == "CNP")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["CNP"]);
                                                        }
                                                        if (comboBox2.Text == "Ocupatie")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["Ocupatie"]);
                                                        }
                                                        if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                        {
                                                            otherlistBox.Items.Add(row["DZP"]);
                                                            otherlabel.Text = comboBox2.Text;
                                                        }
                                                        if (comboBox2.Text == "Diabet Zaharat Frati")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["DZF"]);
                                                        }
                                                        if (comboBox2.Text == "Boala Cardiovasculara")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["BoliCardio"]);
                                                        }
                                                        if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                        {
                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                            otherlistBox.Items.Add(row["HAFam"]);
                                                        }
                                                        if (comboBox2.Text == "Dislipidemie")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["Dislipidemie"]);
                                                        }
                                                        if (comboBox2.Text == "Obezitate")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["Obezitate"]);
                                                        }
                                                        if (comboBox2.Text == "Morti Subite")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["MortiSubite"]);
                                                        }
                                                        if (comboBox2.Text == "Copil Macrosom")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["CopilMacro"]);
                                                        }
                                                        if (comboBox2.Text == "Diabet Gestational")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["DiabetG"]);

                                                        }
                                                        if (comboBox2.Text == "Cardiopatie Ischemica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["CardioIschemica"]);
                                                        }
                                                        if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                        {
                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                            otherlistBox.Items.Add(row["HAPers"]);
                                                        }
                                                        if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                        {
                                                            otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                            otherlistBox.Items.Add(row["IMAVC"]);
                                                        }
                                                        if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["STGlucoza"]);
                                                        }
                                                        if (comboBox2.Text == "Varsta")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                        }
                                                        if (ok2 == true)
                                                        {
                                                            foreach (DataRow row2 in dt2.Rows)
                                                            {
                                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                {
                                                                    if (comboBox2.Text == "Fumat")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        if (row2["Fumat"].ToString() == "DA")
                                                                            otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        else
                                                                            otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Activitate Fizica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Masa Corporala")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Inaltime")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Glicemie")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "HDL Colesterol")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "LDL Colesterol")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Trigliceride")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Indice de masa corporala")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                        imc = imcf.ToString();
                                                                        imcf = (float)Convert.ToDouble(imc);
                                                                        otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Risc Cardiovascular")
                                                                    {
                                                                        int rcvs;
                                                                        rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                }
                                                            }
                                                        }
                                                        #endregion
                                                    }
                                            }
                                            ctr = 0;
                                        }
                                        else
                                            if (istoriccomboBox.Text == "Morti Subite")
                                            {
                                                numelistBox.Items.Clear();
                                                indicelistBox.Items.Clear();
                                                datelistBox.Items.Clear();
                                                otherlistBox.Items.Clear();
                                                valoarelabel.Text = istoriccomboBox.Text;
                                                foreach (DataRow row in dt.Rows)
                                                {
                                                    if (row["MortiSubite"].ToString() == valcomboBox.Text)
                                                    {
                                                        numelistBox.Items.Add(row["Nume"]);
                                                        indicelistBox.Items.Add(row["MortiSubite"]);
                                                        ctr++;
                                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                        #region Alte Valori2
                                                        if (comboBox2.Text == "CNP")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["CNP"]);
                                                        }
                                                        if (comboBox2.Text == "Ocupatie")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["Ocupatie"]);
                                                        }
                                                        if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                        {
                                                            otherlistBox.Items.Add(row["DZP"]);
                                                            otherlabel.Text = comboBox2.Text;
                                                        }
                                                        if (comboBox2.Text == "Diabet Zaharat Frati")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["DZF"]);
                                                        }
                                                        if (comboBox2.Text == "Boala Cardiovasculara")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["BoliCardio"]);
                                                        }
                                                        if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                        {
                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                            otherlistBox.Items.Add(row["HAFam"]);
                                                        }
                                                        if (comboBox2.Text == "Dislipidemie")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["Dislipidemie"]);
                                                        }
                                                        if (comboBox2.Text == "Obezitate")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["Obezitate"]);
                                                        }
                                                        if (comboBox2.Text == "Morti Subite")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["MortiSubite"]);
                                                        }
                                                        if (comboBox2.Text == "Copil Macrosom")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["CopilMacro"]);
                                                        }
                                                        if (comboBox2.Text == "Diabet Gestational")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["DiabetG"]);

                                                        }
                                                        if (comboBox2.Text == "Cardiopatie Ischemica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["CardioIschemica"]);
                                                        }
                                                        if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                        {
                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                            otherlistBox.Items.Add(row["HAPers"]);
                                                        }
                                                        if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                        {
                                                            otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                            otherlistBox.Items.Add(row["IMAVC"]);
                                                        }
                                                        if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["STGlucoza"]);
                                                        }
                                                        if (comboBox2.Text == "Varsta")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                        }
                                                        if (ok2 == true)
                                                        {
                                                            foreach (DataRow row2 in dt2.Rows)
                                                            {
                                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                {
                                                                    if (comboBox2.Text == "Fumat")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        if (row2["Fumat"].ToString() == "DA")
                                                                            otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        else
                                                                            otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Activitate Fizica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Masa Corporala")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Inaltime")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Glicemie")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "HDL Colesterol")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "LDL Colesterol")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Trigliceride")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Indice de masa corporala")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                        imc = imcf.ToString();
                                                                        imcf = (float)Convert.ToDouble(imc);
                                                                        otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                    if (comboBox2.Text == "Risc Cardiovascular")
                                                                    {
                                                                        int rcvs;
                                                                        rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                    }
                                                                }
                                                            }
                                                        }
                                                        #endregion
                                                    }
                                                    else
                                                        if (valcomboBox.Text == "Toate Valorile")
                                                        {
                                                            numelistBox.Items.Add(row["Nume"]);
                                                            indicelistBox.Items.Add(row["MortiSubite"]);
                                                            ctr++;
                                                            paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                            #region Alte Valori2
                                                            if (comboBox2.Text == "CNP")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["CNP"]);
                                                            }
                                                            if (comboBox2.Text == "Ocupatie")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["Ocupatie"]);
                                                            }
                                                            if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                            {
                                                                otherlistBox.Items.Add(row["DZP"]);
                                                                otherlabel.Text = comboBox2.Text;
                                                            }
                                                            if (comboBox2.Text == "Diabet Zaharat Frati")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["DZF"]);
                                                            }
                                                            if (comboBox2.Text == "Boala Cardiovasculara")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["BoliCardio"]);
                                                            }
                                                            if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                            {
                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                otherlistBox.Items.Add(row["HAFam"]);
                                                            }
                                                            if (comboBox2.Text == "Dislipidemie")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["Dislipidemie"]);
                                                            }
                                                            if (comboBox2.Text == "Obezitate")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["Obezitate"]);
                                                            }
                                                            if (comboBox2.Text == "Morti Subite")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["MortiSubite"]);
                                                            }
                                                            if (comboBox2.Text == "Copil Macrosom")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["CopilMacro"]);
                                                            }
                                                            if (comboBox2.Text == "Diabet Gestational")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["DiabetG"]);

                                                            }
                                                            if (comboBox2.Text == "Cardiopatie Ischemica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["CardioIschemica"]);
                                                            }
                                                            if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                            {
                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                otherlistBox.Items.Add(row["HAPers"]);
                                                            }
                                                            if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                            {
                                                                otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                otherlistBox.Items.Add(row["IMAVC"]);
                                                            }
                                                            if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["STGlucoza"]);
                                                            }
                                                            if (comboBox2.Text == "Varsta")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                            }
                                                            if (ok2 == true)
                                                            {
                                                                foreach (DataRow row2 in dt2.Rows)
                                                                {
                                                                    if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                    {
                                                                        if (comboBox2.Text == "Fumat")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            if (row2["Fumat"].ToString() == "DA")
                                                                                otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                            else
                                                                                otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Activitate Fizica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Masa Corporala")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Inaltime")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Glicemie")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "HDL Colesterol")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "LDL Colesterol")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Trigliceride")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Indice de masa corporala")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                            imc = imcf.ToString();
                                                                            imcf = (float)Convert.ToDouble(imc);
                                                                            otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Risc Cardiovascular")
                                                                        {
                                                                            int rcvs;
                                                                            rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                            #endregion
                                                        }
                                                }
                                                ctr = 0;
                                            }
                                            else
                                                if (istoriccomboBox.Text == "Copil Macrosom")
                                                {
                                                    numelistBox.Items.Clear();
                                                    indicelistBox.Items.Clear();
                                                    datelistBox.Items.Clear();
                                                    otherlistBox.Items.Clear();
                                                    valoarelabel.Text = istoriccomboBox.Text;
                                                    foreach (DataRow row in dt.Rows)
                                                    {
                                                        if (row["CopilMacro"].ToString() == valcomboBox.Text)
                                                        {
                                                            numelistBox.Items.Add(row["Nume"]);
                                                            indicelistBox.Items.Add(row["CopilMacro"]);
                                                            ctr++;
                                                            paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                            #region Alte Valori2
                                                            if (comboBox2.Text == "CNP")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["CNP"]);
                                                            }
                                                            if (comboBox2.Text == "Ocupatie")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["Ocupatie"]);
                                                            }
                                                            if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                            {
                                                                otherlistBox.Items.Add(row["DZP"]);
                                                                otherlabel.Text = comboBox2.Text;
                                                            }
                                                            if (comboBox2.Text == "Diabet Zaharat Frati")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["DZF"]);
                                                            }
                                                            if (comboBox2.Text == "Boala Cardiovasculara")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["BoliCardio"]);
                                                            }
                                                            if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                            {
                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                otherlistBox.Items.Add(row["HAFam"]);
                                                            }
                                                            if (comboBox2.Text == "Dislipidemie")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["Dislipidemie"]);
                                                            }
                                                            if (comboBox2.Text == "Obezitate")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["Obezitate"]);
                                                            }
                                                            if (comboBox2.Text == "Morti Subite")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["MortiSubite"]);
                                                            }
                                                            if (comboBox2.Text == "Copil Macrosom")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["CopilMacro"]);
                                                            }
                                                            if (comboBox2.Text == "Diabet Gestational")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["DiabetG"]);

                                                            }
                                                            if (comboBox2.Text == "Cardiopatie Ischemica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["CardioIschemica"]);
                                                            }
                                                            if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                            {
                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                otherlistBox.Items.Add(row["HAPers"]);
                                                            }
                                                            if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                            {
                                                                otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                otherlistBox.Items.Add(row["IMAVC"]);
                                                            }
                                                            if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["STGlucoza"]);
                                                            }
                                                            if (comboBox2.Text == "Varsta")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                            }
                                                            if (ok2 == true)
                                                            {
                                                                foreach (DataRow row2 in dt2.Rows)
                                                                {
                                                                    if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                    {
                                                                        if (comboBox2.Text == "Fumat")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            if (row2["Fumat"].ToString() == "DA")
                                                                                otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                            else
                                                                                otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Activitate Fizica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Masa Corporala")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Inaltime")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Glicemie")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "HDL Colesterol")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "LDL Colesterol")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Trigliceride")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Indice de masa corporala")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                            imc = imcf.ToString();
                                                                            imcf = (float)Convert.ToDouble(imc);
                                                                            otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                        if (comboBox2.Text == "Risc Cardiovascular")
                                                                        {
                                                                            int rcvs;
                                                                            rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                            #endregion
                                                        }
                                                        else
                                                            if (valcomboBox.Text == "Toate Valorile")
                                                            {
                                                                numelistBox.Items.Add(row["Nume"]);
                                                                indicelistBox.Items.Add(row["CopilMacro"]);
                                                                ctr++;
                                                                paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                #region Alte Valori2
                                                                if (comboBox2.Text == "CNP")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["CNP"]);
                                                                }
                                                                if (comboBox2.Text == "Ocupatie")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["Ocupatie"]);
                                                                }
                                                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                {
                                                                    otherlistBox.Items.Add(row["DZP"]);
                                                                    otherlabel.Text = comboBox2.Text;
                                                                }
                                                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["DZF"]);
                                                                }
                                                                if (comboBox2.Text == "Boala Cardiovasculara")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["BoliCardio"]);
                                                                }
                                                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                {
                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                    otherlistBox.Items.Add(row["HAFam"]);
                                                                }
                                                                if (comboBox2.Text == "Dislipidemie")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["Dislipidemie"]);
                                                                }
                                                                if (comboBox2.Text == "Obezitate")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["Obezitate"]);
                                                                }
                                                                if (comboBox2.Text == "Morti Subite")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["MortiSubite"]);
                                                                }
                                                                if (comboBox2.Text == "Copil Macrosom")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["CopilMacro"]);
                                                                }
                                                                if (comboBox2.Text == "Diabet Gestational")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["DiabetG"]);

                                                                }
                                                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["CardioIschemica"]);
                                                                }
                                                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                {
                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                    otherlistBox.Items.Add(row["HAPers"]);
                                                                }
                                                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                {
                                                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                    otherlistBox.Items.Add(row["IMAVC"]);
                                                                }
                                                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["STGlucoza"]);
                                                                }
                                                                if (comboBox2.Text == "Varsta")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                }
                                                                if (ok2 == true)
                                                                {
                                                                    foreach (DataRow row2 in dt2.Rows)
                                                                    {
                                                                        if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                        {
                                                                            if (comboBox2.Text == "Fumat")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                if (row2["Fumat"].ToString() == "DA")
                                                                                    otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                else
                                                                                    otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                            }
                                                                            if (comboBox2.Text == "Activitate Fizica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                            }
                                                                            if (comboBox2.Text == "Masa Corporala")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                            }
                                                                            if (comboBox2.Text == "Inaltime")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                            }
                                                                            if (comboBox2.Text == "Circumferinta Abdominala")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                            }
                                                                            if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                            }
                                                                            if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                            }
                                                                            if (comboBox2.Text == "Glicemie")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                            }
                                                                            if (comboBox2.Text == "HDL Colesterol")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                            }
                                                                            if (comboBox2.Text == "LDL Colesterol")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                            }
                                                                            if (comboBox2.Text == "Trigliceride")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                            }
                                                                            if (comboBox2.Text == "Indice de masa corporala")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                                imc = imcf.ToString();
                                                                                imcf = (float)Convert.ToDouble(imc);
                                                                                otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                            }
                                                                            if (comboBox2.Text == "Risc Cardiovascular")
                                                                            {
                                                                                int rcvs;
                                                                                rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                                #endregion
                                                            }
                                                    }
                                                    ctr = 0;
                                                }
                                                else
                                                    if (istoriccomboBox.Text == "Diabet Gestational")
                                                    {
                                                        numelistBox.Items.Clear();
                                                        indicelistBox.Items.Clear();
                                                        datelistBox.Items.Clear();
                                                        otherlistBox.Items.Clear();
                                                        valoarelabel.Text = istoriccomboBox.Text;
                                                        foreach (DataRow row in dt.Rows)
                                                        {
                                                            if (row["Sex"].ToString() == "Feminin")
                                                            {
                                                                if (row["DiabetG"].ToString() == valcomboBox.Text)
                                                                {
                                                                    numelistBox.Items.Add(row["Nume"]);//???????????
                                                                    indicelistBox.Items.Add(row["DiabetG"]);
                                                                    ctr++;
                                                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                    #region Alte Valori2
                                                                    if (comboBox2.Text == "CNP")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["CNP"]);
                                                                    }
                                                                    if (comboBox2.Text == "Ocupatie")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["Ocupatie"]);
                                                                    }
                                                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                    {
                                                                        otherlistBox.Items.Add(row["DZP"]);
                                                                        otherlabel.Text = comboBox2.Text;
                                                                    }
                                                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["DZF"]);
                                                                    }
                                                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["BoliCardio"]);
                                                                    }
                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                    {
                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                        otherlistBox.Items.Add(row["HAFam"]);
                                                                    }
                                                                    if (comboBox2.Text == "Dislipidemie")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["Dislipidemie"]);
                                                                    }
                                                                    if (comboBox2.Text == "Obezitate")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["Obezitate"]);
                                                                    }
                                                                    if (comboBox2.Text == "Morti Subite")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["MortiSubite"]);
                                                                    }
                                                                    if (comboBox2.Text == "Copil Macrosom")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["CopilMacro"]);
                                                                    }
                                                                    if (comboBox2.Text == "Diabet Gestational")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["DiabetG"]);

                                                                    }
                                                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["CardioIschemica"]);
                                                                    }
                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                    {
                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                        otherlistBox.Items.Add(row["HAPers"]);
                                                                    }
                                                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                    {
                                                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                        otherlistBox.Items.Add(row["IMAVC"]);
                                                                    }
                                                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["STGlucoza"]);
                                                                    }
                                                                    if (comboBox2.Text == "Varsta")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                    }
                                                                    if (ok2 == true)
                                                                    {
                                                                        foreach (DataRow row2 in dt2.Rows)
                                                                        {
                                                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                            {
                                                                                if (comboBox2.Text == "Fumat")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    if (row2["Fumat"].ToString() == "DA")
                                                                                        otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    else
                                                                                        otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Activitate Fizica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Masa Corporala")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Inaltime")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Circumferinta Abdominala")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Glicemie")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "HDL Colesterol")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "LDL Colesterol")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Trigliceride")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Indice de masa corporala")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                                    imc = imcf.ToString();
                                                                                    imcf = (float)Convert.ToDouble(imc);
                                                                                    otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Risc Cardiovascular")
                                                                                {
                                                                                    int rcvs;
                                                                                    rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                    #endregion
                                                                }
                                                                else
                                                                    if (valcomboBox.Text == "Toate Valorile")
                                                                    {
                                                                        numelistBox.Items.Add(row["Nume"]);
                                                                        indicelistBox.Items.Add(row["DiabetG"]);
                                                                        ctr++;
                                                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                        #region Alte Valori2
                                                                        if (comboBox2.Text == "CNP")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["CNP"]);
                                                                        }
                                                                        if (comboBox2.Text == "Ocupatie")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["Ocupatie"]);
                                                                        }
                                                                        if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                        {
                                                                            otherlistBox.Items.Add(row["DZP"]);
                                                                            otherlabel.Text = comboBox2.Text;
                                                                        }
                                                                        if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["DZF"]);
                                                                        }
                                                                        if (comboBox2.Text == "Boala Cardiovasculara")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["BoliCardio"]);
                                                                        }
                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                        {
                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                            otherlistBox.Items.Add(row["HAFam"]);
                                                                        }
                                                                        if (comboBox2.Text == "Dislipidemie")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["Dislipidemie"]);
                                                                        }
                                                                        if (comboBox2.Text == "Obezitate")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["Obezitate"]);
                                                                        }
                                                                        if (comboBox2.Text == "Morti Subite")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["MortiSubite"]);
                                                                        }
                                                                        if (comboBox2.Text == "Copil Macrosom")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["CopilMacro"]);
                                                                        }
                                                                        if (comboBox2.Text == "Diabet Gestational")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["DiabetG"]);

                                                                        }
                                                                        if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["CardioIschemica"]);
                                                                        }
                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                        {
                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                            otherlistBox.Items.Add(row["HAPers"]);
                                                                        }
                                                                        if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                        {
                                                                            otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                            otherlistBox.Items.Add(row["IMAVC"]);
                                                                        }
                                                                        if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["STGlucoza"]);
                                                                        }
                                                                        if (comboBox2.Text == "Varsta")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                        }
                                                                        if (ok2 == true)
                                                                        {
                                                                            foreach (DataRow row2 in dt2.Rows)
                                                                            {
                                                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                {
                                                                                    if (comboBox2.Text == "Fumat")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        if (row2["Fumat"].ToString() == "DA")
                                                                                            otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        else
                                                                                            otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Activitate Fizica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Masa Corporala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Inaltime")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Glicemie")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "HDL Colesterol")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "LDL Colesterol")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Trigliceride")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Indice de masa corporala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                                        imc = imcf.ToString();
                                                                                        imcf = (float)Convert.ToDouble(imc);
                                                                                        otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Risc Cardiovascular")
                                                                                    {
                                                                                        int rcvs;
                                                                                        rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                        #endregion
                                                                    }
                                                            }
                                                        }
                                                        ctr = 0;
                                                    }
                                                    else
                                                        if (istoriccomboBox.Text == "Cardiopatie Ischemica")
                                                        {
                                                            numelistBox.Items.Clear();
                                                            indicelistBox.Items.Clear();
                                                            datelistBox.Items.Clear();
                                                            otherlistBox.Items.Clear();
                                                            valoarelabel.Text = istoriccomboBox.Text;
                                                            foreach (DataRow row in dt.Rows)
                                                            {
                                                                if (row["CardioIschemica"].ToString() == valcomboBox.Text)
                                                                {
                                                                    numelistBox.Items.Add(row["Nume"]);
                                                                    indicelistBox.Items.Add(row["CardioIschemica"]);
                                                                    ctr++;
                                                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                    #region Alte Valori2
                                                                    if (comboBox2.Text == "CNP")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["CNP"]);
                                                                    }
                                                                    if (comboBox2.Text == "Ocupatie")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["Ocupatie"]);
                                                                    }
                                                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                    {
                                                                        otherlistBox.Items.Add(row["DZP"]);
                                                                        otherlabel.Text = comboBox2.Text;
                                                                    }
                                                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["DZF"]);
                                                                    }
                                                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["BoliCardio"]);
                                                                    }
                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                    {
                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                        otherlistBox.Items.Add(row["HAFam"]);
                                                                    }
                                                                    if (comboBox2.Text == "Dislipidemie")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["Dislipidemie"]);
                                                                    }
                                                                    if (comboBox2.Text == "Obezitate")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["Obezitate"]);
                                                                    }
                                                                    if (comboBox2.Text == "Morti Subite")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["MortiSubite"]);
                                                                    }
                                                                    if (comboBox2.Text == "Copil Macrosom")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["CopilMacro"]);
                                                                    }
                                                                    if (comboBox2.Text == "Diabet Gestational")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["DiabetG"]);

                                                                    }
                                                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["CardioIschemica"]);
                                                                    }
                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                    {
                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                        otherlistBox.Items.Add(row["HAPers"]);
                                                                    }
                                                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                    {
                                                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                        otherlistBox.Items.Add(row["IMAVC"]);
                                                                    }
                                                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["STGlucoza"]);
                                                                    }
                                                                    if (comboBox2.Text == "Varsta")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                    }
                                                                    if (ok2 == true)
                                                                    {
                                                                        foreach (DataRow row2 in dt2.Rows)
                                                                        {
                                                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                            {
                                                                                if (comboBox2.Text == "Fumat")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    if (row2["Fumat"].ToString() == "DA")
                                                                                        otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    else
                                                                                        otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Activitate Fizica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Masa Corporala")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Inaltime")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Circumferinta Abdominala")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Glicemie")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "HDL Colesterol")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "LDL Colesterol")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Trigliceride")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Indice de masa corporala")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                                    imc = imcf.ToString();
                                                                                    imcf = (float)Convert.ToDouble(imc);
                                                                                    otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                                if (comboBox2.Text == "Risc Cardiovascular")
                                                                                {
                                                                                    int rcvs;
                                                                                    rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                    #endregion
                                                                }
                                                                else
                                                                    if (valcomboBox.Text == "Toate Valorile")
                                                                    {
                                                                        numelistBox.Items.Add(row["Nume"]);
                                                                        indicelistBox.Items.Add(row["CardioIschemica"]);
                                                                        ctr++;
                                                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                        #region Alte Valori2
                                                                        if (comboBox2.Text == "CNP")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["CNP"]);
                                                                        }
                                                                        if (comboBox2.Text == "Ocupatie")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["Ocupatie"]);
                                                                        }
                                                                        if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                        {
                                                                            otherlistBox.Items.Add(row["DZP"]);
                                                                            otherlabel.Text = comboBox2.Text;
                                                                        }
                                                                        if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["DZF"]);
                                                                        }
                                                                        if (comboBox2.Text == "Boala Cardiovasculara")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["BoliCardio"]);
                                                                        }
                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                        {
                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                            otherlistBox.Items.Add(row["HAFam"]);
                                                                        }
                                                                        if (comboBox2.Text == "Dislipidemie")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["Dislipidemie"]);
                                                                        }
                                                                        if (comboBox2.Text == "Obezitate")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["Obezitate"]);
                                                                        }
                                                                        if (comboBox2.Text == "Morti Subite")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["MortiSubite"]);
                                                                        }
                                                                        if (comboBox2.Text == "Copil Macrosom")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["CopilMacro"]);
                                                                        }
                                                                        if (comboBox2.Text == "Diabet Gestational")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["DiabetG"]);

                                                                        }
                                                                        if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["CardioIschemica"]);
                                                                        }
                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                        {
                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                            otherlistBox.Items.Add(row["HAPers"]);
                                                                        }
                                                                        if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                        {
                                                                            otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                            otherlistBox.Items.Add(row["IMAVC"]);
                                                                        }
                                                                        if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["STGlucoza"]);
                                                                        }
                                                                        if (comboBox2.Text == "Varsta")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                        }
                                                                        if (ok2 == true)
                                                                        {
                                                                            foreach (DataRow row2 in dt2.Rows)
                                                                            {
                                                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                {
                                                                                    if (comboBox2.Text == "Fumat")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        if (row2["Fumat"].ToString() == "DA")
                                                                                            otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        else
                                                                                            otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Activitate Fizica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Masa Corporala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Inaltime")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Glicemie")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "HDL Colesterol")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "LDL Colesterol")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Trigliceride")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Indice de masa corporala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                                        imc = imcf.ToString();
                                                                                        imcf = (float)Convert.ToDouble(imc);
                                                                                        otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Risc Cardiovascular")
                                                                                    {
                                                                                        int rcvs;
                                                                                        rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                        #endregion
                                                                    }
                                                            }
                                                            ctr = 0;
                                                        }
                                                        else
                                                            if (istoriccomboBox.Text == "Hipertensiune Arteriala(personala)")
                                                            {
                                                                numelistBox.Items.Clear();
                                                                indicelistBox.Items.Clear();
                                                                datelistBox.Items.Clear();
                                                                otherlistBox.Items.Clear();
                                                                valoarelabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                foreach (DataRow row in dt.Rows)
                                                                {
                                                                    if (row["HAPers"].ToString() == valcomboBox.Text)
                                                                    {
                                                                        numelistBox.Items.Add(row["Nume"]);
                                                                        indicelistBox.Items.Add(row["HAPers"]);
                                                                        ctr++;
                                                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                        #region Alte Valori2
                                                                        if (comboBox2.Text == "CNP")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["CNP"]);
                                                                        }
                                                                        if (comboBox2.Text == "Ocupatie")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["Ocupatie"]);
                                                                        }
                                                                        if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                        {
                                                                            otherlistBox.Items.Add(row["DZP"]);
                                                                            otherlabel.Text = comboBox2.Text;
                                                                        }
                                                                        if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["DZF"]);
                                                                        }
                                                                        if (comboBox2.Text == "Boala Cardiovasculara")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["BoliCardio"]);
                                                                        }
                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                        {
                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                            otherlistBox.Items.Add(row["HAFam"]);
                                                                        }
                                                                        if (comboBox2.Text == "Dislipidemie")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["Dislipidemie"]);
                                                                        }
                                                                        if (comboBox2.Text == "Obezitate")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["Obezitate"]);
                                                                        }
                                                                        if (comboBox2.Text == "Morti Subite")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["MortiSubite"]);
                                                                        }
                                                                        if (comboBox2.Text == "Copil Macrosom")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["CopilMacro"]);
                                                                        }
                                                                        if (comboBox2.Text == "Diabet Gestational")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["DiabetG"]);

                                                                        }
                                                                        if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["CardioIschemica"]);
                                                                        }
                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                        {
                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                            otherlistBox.Items.Add(row["HAPers"]);
                                                                        }
                                                                        if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                        {
                                                                            otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                            otherlistBox.Items.Add(row["IMAVC"]);
                                                                        }
                                                                        if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["STGlucoza"]);
                                                                        }
                                                                        if (comboBox2.Text == "Varsta")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                        }
                                                                        if (ok2 == true)
                                                                        {
                                                                            foreach (DataRow row2 in dt2.Rows)
                                                                            {
                                                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                {
                                                                                    if (comboBox2.Text == "Fumat")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        if (row2["Fumat"].ToString() == "DA")
                                                                                            otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        else
                                                                                            otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Activitate Fizica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Masa Corporala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Inaltime")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Glicemie")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "HDL Colesterol")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "LDL Colesterol")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Trigliceride")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Indice de masa corporala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                                        imc = imcf.ToString();
                                                                                        imcf = (float)Convert.ToDouble(imc);
                                                                                        otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Risc Cardiovascular")
                                                                                    {
                                                                                        int rcvs;
                                                                                        rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                        #endregion
                                                                    }
                                                                    else
                                                                        if (valcomboBox.Text == "Toate Valorile")
                                                                        {
                                                                            numelistBox.Items.Add(row["Nume"]);
                                                                            indicelistBox.Items.Add(row["HAPers"]);
                                                                            ctr++;
                                                                            paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                            #region Alte Valori2
                                                                            if (comboBox2.Text == "CNP")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["CNP"]);
                                                                            }
                                                                            if (comboBox2.Text == "Ocupatie")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["Ocupatie"]);
                                                                            }
                                                                            if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                            {
                                                                                otherlistBox.Items.Add(row["DZP"]);
                                                                                otherlabel.Text = comboBox2.Text;
                                                                            }
                                                                            if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["DZF"]);
                                                                            }
                                                                            if (comboBox2.Text == "Boala Cardiovasculara")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["BoliCardio"]);
                                                                            }
                                                                            if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                            {
                                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                otherlistBox.Items.Add(row["HAFam"]);
                                                                            }
                                                                            if (comboBox2.Text == "Dislipidemie")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["Dislipidemie"]);
                                                                            }
                                                                            if (comboBox2.Text == "Obezitate")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["Obezitate"]);
                                                                            }
                                                                            if (comboBox2.Text == "Morti Subite")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["MortiSubite"]);
                                                                            }
                                                                            if (comboBox2.Text == "Copil Macrosom")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["CopilMacro"]);
                                                                            }
                                                                            if (comboBox2.Text == "Diabet Gestational")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["DiabetG"]);

                                                                            }
                                                                            if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["CardioIschemica"]);
                                                                            }
                                                                            if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                            {
                                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                otherlistBox.Items.Add(row["HAPers"]);
                                                                            }
                                                                            if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                            {
                                                                                otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                otherlistBox.Items.Add(row["IMAVC"]);
                                                                            }
                                                                            if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["STGlucoza"]);
                                                                            }
                                                                            if (comboBox2.Text == "Varsta")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                            }
                                                                            if (ok2 == true)
                                                                            {
                                                                                foreach (DataRow row2 in dt2.Rows)
                                                                                {
                                                                                    if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                    {
                                                                                        if (comboBox2.Text == "Fumat")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            if (row2["Fumat"].ToString() == "DA")
                                                                                                otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            else
                                                                                                otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Activitate Fizica")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Masa Corporala")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Inaltime")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Glicemie")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "HDL Colesterol")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "LDL Colesterol")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Trigliceride")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Indice de masa corporala")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                                            imc = imcf.ToString();
                                                                                            imcf = (float)Convert.ToDouble(imc);
                                                                                            otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Risc Cardiovascular")
                                                                                        {
                                                                                            int rcvs;
                                                                                            rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                            #endregion
                                                                        }
                                                                }
                                                                ctr = 0;
                                                            }
                                                            else
                                                                if (istoriccomboBox.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                {
                                                                    numelistBox.Items.Clear();
                                                                    indicelistBox.Items.Clear();
                                                                    datelistBox.Items.Clear();
                                                                    otherlistBox.Items.Clear();
                                                                    valoarelabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                    foreach (DataRow row in dt.Rows)
                                                                    {
                                                                        if (row["IMAVC"].ToString() == valcomboBox.Text)
                                                                        {
                                                                            numelistBox.Items.Add(row["Nume"]);
                                                                            indicelistBox.Items.Add(row["IMAVC"]);
                                                                            ctr++;
                                                                            paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                            #region Alte Valori2
                                                                            if (comboBox2.Text == "CNP")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["CNP"]);
                                                                            }
                                                                            if (comboBox2.Text == "Ocupatie")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["Ocupatie"]);
                                                                            }
                                                                            if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                            {
                                                                                otherlistBox.Items.Add(row["DZP"]);
                                                                                otherlabel.Text = comboBox2.Text;
                                                                            }
                                                                            if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["DZF"]);
                                                                            }
                                                                            if (comboBox2.Text == "Boala Cardiovasculara")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["BoliCardio"]);
                                                                            }
                                                                            if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                            {
                                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                otherlistBox.Items.Add(row["HAFam"]);
                                                                            }
                                                                            if (comboBox2.Text == "Dislipidemie")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["Dislipidemie"]);
                                                                            }
                                                                            if (comboBox2.Text == "Obezitate")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["Obezitate"]);
                                                                            }
                                                                            if (comboBox2.Text == "Morti Subite")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["MortiSubite"]);
                                                                            }
                                                                            if (comboBox2.Text == "Copil Macrosom")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["CopilMacro"]);
                                                                            }
                                                                            if (comboBox2.Text == "Diabet Gestational")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["DiabetG"]);

                                                                            }
                                                                            if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["CardioIschemica"]);
                                                                            }
                                                                            if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                            {
                                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                otherlistBox.Items.Add(row["HAPers"]);
                                                                            }
                                                                            if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                            {
                                                                                otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                otherlistBox.Items.Add(row["IMAVC"]);
                                                                            }
                                                                            if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["STGlucoza"]);
                                                                            }
                                                                            if (comboBox2.Text == "Varsta")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                            }
                                                                            if (ok2 == true)
                                                                            {
                                                                                foreach (DataRow row2 in dt2.Rows)
                                                                                {
                                                                                    if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                    {
                                                                                        if (comboBox2.Text == "Fumat")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            if (row2["Fumat"].ToString() == "DA")
                                                                                                otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            else
                                                                                                otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Activitate Fizica")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Masa Corporala")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Inaltime")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Glicemie")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "HDL Colesterol")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "LDL Colesterol")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Trigliceride")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Indice de masa corporala")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                                            imc = imcf.ToString();
                                                                                            imcf = (float)Convert.ToDouble(imc);
                                                                                            otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Risc Cardiovascular")
                                                                                        {
                                                                                            int rcvs;
                                                                                            rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                            #endregion
                                                                        }
                                                                        else
                                                                            if (valcomboBox.Text == "Toate Valorile")
                                                                            {
                                                                                numelistBox.Items.Add(row["Nume"]);
                                                                                indicelistBox.Items.Add(row["IMAVC"]);
                                                                                ctr++;
                                                                                paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                                #region Alte Valori2
                                                                                if (comboBox2.Text == "CNP")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["CNP"]);
                                                                                }
                                                                                if (comboBox2.Text == "Ocupatie")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["Ocupatie"]);
                                                                                }
                                                                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                {
                                                                                    otherlistBox.Items.Add(row["DZP"]);
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                }
                                                                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["DZF"]);
                                                                                }
                                                                                if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["BoliCardio"]);
                                                                                }
                                                                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                {
                                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                    otherlistBox.Items.Add(row["HAFam"]);
                                                                                }
                                                                                if (comboBox2.Text == "Dislipidemie")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["Dislipidemie"]);
                                                                                }
                                                                                if (comboBox2.Text == "Obezitate")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["Obezitate"]);
                                                                                }
                                                                                if (comboBox2.Text == "Morti Subite")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["MortiSubite"]);
                                                                                }
                                                                                if (comboBox2.Text == "Copil Macrosom")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["CopilMacro"]);
                                                                                }
                                                                                if (comboBox2.Text == "Diabet Gestational")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["DiabetG"]);

                                                                                }
                                                                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["CardioIschemica"]);
                                                                                }
                                                                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                {
                                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                    otherlistBox.Items.Add(row["HAPers"]);
                                                                                }
                                                                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                {
                                                                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                    otherlistBox.Items.Add(row["IMAVC"]);
                                                                                }
                                                                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["STGlucoza"]);
                                                                                }
                                                                                if (comboBox2.Text == "Varsta")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                                }
                                                                                if (ok2 == true)
                                                                                {
                                                                                    foreach (DataRow row2 in dt2.Rows)
                                                                                    {
                                                                                        if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                        {
                                                                                            if (comboBox2.Text == "Fumat")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                if (row2["Fumat"].ToString() == "DA")
                                                                                                    otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                                else
                                                                                                    otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Activitate Fizica")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Masa Corporala")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Inaltime")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Circumferinta Abdominala")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Glicemie")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "HDL Colesterol")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "LDL Colesterol")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Trigliceride")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Indice de masa corporala")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                                                imc = imcf.ToString();
                                                                                                imcf = (float)Convert.ToDouble(imc);
                                                                                                otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Risc Cardiovascular")
                                                                                            {
                                                                                                int rcvs;
                                                                                                rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                                #endregion
                                                                            }
                                                                    }
                                                                    ctr = 0;
                                                                }
                                                                else
                                                                    if (istoriccomboBox.Text == "Scaderea Tolerantei La Glucoza")
                                                                    {
                                                                        numelistBox.Items.Clear();
                                                                        indicelistBox.Items.Clear();
                                                                        datelistBox.Items.Clear();
                                                                        otherlistBox.Items.Clear();
                                                                        valoarelabel.Text = "Scaderea Tolerantei" + "\n" + "La Glucoza";
                                                                        foreach (DataRow row in dt.Rows)
                                                                        {
                                                                            if (row["STGlucoza"].ToString() == valcomboBox.Text)
                                                                            {
                                                                                numelistBox.Items.Add(row["Nume"]);
                                                                                indicelistBox.Items.Add(row["STGlucoza"]);
                                                                                ctr++;
                                                                                paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                                #region Alte Valori2
                                                                                if (comboBox2.Text == "CNP")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["CNP"]);
                                                                                }
                                                                                if (comboBox2.Text == "Ocupatie")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["Ocupatie"]);
                                                                                }
                                                                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                {
                                                                                    otherlistBox.Items.Add(row["DZP"]);
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                }
                                                                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["DZF"]);
                                                                                }
                                                                                if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["BoliCardio"]);
                                                                                }
                                                                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                {
                                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                    otherlistBox.Items.Add(row["HAFam"]);
                                                                                }
                                                                                if (comboBox2.Text == "Dislipidemie")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["Dislipidemie"]);
                                                                                }
                                                                                if (comboBox2.Text == "Obezitate")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["Obezitate"]);
                                                                                }
                                                                                if (comboBox2.Text == "Morti Subite")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["MortiSubite"]);
                                                                                }
                                                                                if (comboBox2.Text == "Copil Macrosom")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["CopilMacro"]);
                                                                                }
                                                                                if (comboBox2.Text == "Diabet Gestational")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["DiabetG"]);

                                                                                }
                                                                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["CardioIschemica"]);
                                                                                }
                                                                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                {
                                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                    otherlistBox.Items.Add(row["HAPers"]);
                                                                                }
                                                                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                {
                                                                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                    otherlistBox.Items.Add(row["IMAVC"]);
                                                                                }
                                                                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["STGlucoza"]);
                                                                                }
                                                                                if (comboBox2.Text == "Varsta")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                                }
                                                                                if (ok2 == true)
                                                                                {
                                                                                    foreach (DataRow row2 in dt2.Rows)
                                                                                    {
                                                                                        if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                        {
                                                                                            if (comboBox2.Text == "Fumat")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                if (row2["Fumat"].ToString() == "DA")
                                                                                                    otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                                else
                                                                                                    otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Activitate Fizica")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Masa Corporala")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Inaltime")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Circumferinta Abdominala")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Glicemie")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "HDL Colesterol")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "LDL Colesterol")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Trigliceride")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Indice de masa corporala")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                                                imc = imcf.ToString();
                                                                                                imcf = (float)Convert.ToDouble(imc);
                                                                                                otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Risc Cardiovascular")
                                                                                            {
                                                                                                int rcvs;
                                                                                                rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                                #endregion
                                                                            }
                                                                            else
                                                                                if (valcomboBox.Text == "Toate Valorile")
                                                                                {
                                                                                    numelistBox.Items.Add(row["Nume"]);
                                                                                    indicelistBox.Items.Add(row["STGlucoza"]);
                                                                                    ctr++;
                                                                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                                    #region Alte Valori2
                                                                                    if (comboBox2.Text == "CNP")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["CNP"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Ocupatie")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["Ocupatie"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                    {
                                                                                        otherlistBox.Items.Add(row["DZP"]);
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                    }
                                                                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["DZF"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["BoliCardio"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                    {
                                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                        otherlistBox.Items.Add(row["HAFam"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Dislipidemie")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["Dislipidemie"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Obezitate")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["Obezitate"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Morti Subite")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["MortiSubite"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Copil Macrosom")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["CopilMacro"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Diabet Gestational")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["DiabetG"]);

                                                                                    }
                                                                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["CardioIschemica"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                    {
                                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                        otherlistBox.Items.Add(row["HAPers"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                    {
                                                                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                        otherlistBox.Items.Add(row["IMAVC"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["STGlucoza"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Varsta")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                                    }
                                                                                    if (ok2 == true)
                                                                                    {
                                                                                        foreach (DataRow row2 in dt2.Rows)
                                                                                        {
                                                                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                            {
                                                                                                if (comboBox2.Text == "Fumat")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    if (row2["Fumat"].ToString() == "DA")
                                                                                                        otherlistBox.Items.Add(row2["Fumat"] + " (" + row2["Nrtigar"] + ") " + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                                    else
                                                                                                        otherlistBox.Items.Add(row2["Fumat"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Activitate Fizica")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["ActFizica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Masa Corporala")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["G"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Inaltime")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["H"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Circumferinta Abdominala")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["Ca"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["TaSistolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["TaDiastolica"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Glicemie")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["Glicemie"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "HDL Colesterol")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["HDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "LDL Colesterol")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["LDLCol"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Trigliceride")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["Tg"] + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Indice de masa corporala")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    imcf = c.IMC(row2["G"].ToString(), row2["H"].ToString());
                                                                                                    imc = imcf.ToString();
                                                                                                    imcf = (float)Convert.ToDouble(imc);
                                                                                                    otherlistBox.Items.Add(imcf + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Risc Cardiovascular")
                                                                                                {
                                                                                                    int rcvs;
                                                                                                    rcvs = c.RCV(row2["LDLCol"].ToString(), row2["CNP"].ToString(), row2["TaSistolica"].ToString(), row2["Fumat"].ToString(), Convert.ToDateTime(row2["Date"]).ToShortDateString().ToString());
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(rcvs + "    " + Convert.ToDateTime(row2["Date"]).ToShortDateString() + "   " + row2["Nume"]);
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                    #endregion
                                                                                }
                                                                        }
                                                                        ctr = 0;
                                                                    }
                }
                else
                {
                    MessageBox.Show("Selectati o valoare pentru a vedea statistica");
                }
            }
            else
                MessageBox.Show("Am întâmpinat probleme la încărcarea datelor!");
            int s = 0;
            for (int i = 1; i <= numelistBox.Items.Count; i++)
                s += i;
            if (s == 0)
                paclabel.Text = "";
        }
Beispiel #2
0
 private void chartcomboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     c = new Calcul();
     DataTable dt = dateMedDataSet.Statistica;
     chart1.ChartAreas["Default"].AxisX.IntervalType = DateTimeIntervalType.Days;
     if (usr == true)
     {
         if (chartcomboBox.Text == "Greutate")
         {
             listBox1.Items.Clear();
             listBox2.Items.Clear();
             textlabel.Text = "Greutate";
             chart1.Series["Greutate"].Points.Clear();
             chart1.Series["Circumferinta Abdominala"].Points.Clear();
             chart1.Series["Glicemie"].Points.Clear();
             chart1.Series["Trigliceride"].Points.Clear();
             chart1.Series["HDL Colesterol"].Points.Clear();
             chart1.Series["LDL Colesterol"].Points.Clear();
             chart1.Series["Control"].Points.Clear();
             chart1.Series["TAD"].Points.Clear();
             chart1.Series["TAS"].Points.Clear();
             chart1.Series["IMC"].Points.Clear();
             chart1.Series["RCV"].Points.Clear();
             foreach (DataRow row in dt.Rows)
             {
                 chart1.Series["Greutate"].Points.AddXY(Convert.ToDateTime(row["Date"]), row["G"]);
                 chart1.Series["Control"].Points.AddXY(Convert.ToDateTime(row["Date"]), row["G"]);
                 listBox1.Items.Add(row["G"]);
                 listBox2.Items.Add(row["Date"]);
             }
         }
         else
             if (chartcomboBox.Text == "Circumferinta abdominala")
             {
                 listBox1.Items.Clear();
                 listBox2.Items.Clear();
                 textlabel.Text = "Circumferinta abdominala";
                 chart1.Series["Circumferinta Abdominala"].Points.Clear();
                 chart1.Series["Control"].Points.Clear();
                 chart1.Series["Greutate"].Points.Clear();
                 chart1.Series["Glicemie"].Points.Clear();
                 chart1.Series["Trigliceride"].Points.Clear();
                 chart1.Series["HDL Colesterol"].Points.Clear();
                 chart1.Series["LDL Colesterol"].Points.Clear();
                 chart1.Series["TAD"].Points.Clear();
                 chart1.Series["TAS"].Points.Clear();
                 chart1.Series["IMC"].Points.Clear();
                 chart1.Series["RCV"].Points.Clear();
                 foreach (DataRow row in dt.Rows)
                 {
                     chart1.Series["Circumferinta Abdominala"].Points.AddXY(Convert.ToDateTime(row["Date"]), row["CA"]);
                     chart1.Series["Control"].Points.AddXY(Convert.ToDateTime(row["Date"]), row["CA"]);
                     listBox1.Items.Add(row["CA"]);
                     listBox2.Items.Add(row["Date"]);
                 }
             }
             else
                 if (chartcomboBox.Text == "Glicemie")
                 {
                     listBox1.Items.Clear();
                     listBox2.Items.Clear();
                     textlabel.Text = "Glicemie";
                     chart1.Series["Glicemie"].Points.Clear();
                     chart1.Series["Control"].Points.Clear();
                     chart1.Series["Greutate"].Points.Clear();
                     chart1.Series["Circumferinta Abdominala"].Points.Clear();
                     chart1.Series["Trigliceride"].Points.Clear();
                     chart1.Series["HDL Colesterol"].Points.Clear();
                     chart1.Series["LDL Colesterol"].Points.Clear();
                     chart1.Series["TAD"].Points.Clear();
                     chart1.Series["TAS"].Points.Clear();
                     chart1.Series["IMC"].Points.Clear();
                     chart1.Series["RCV"].Points.Clear();
                     foreach (DataRow row in dt.Rows)
                     {
                         chart1.Series["Glicemie"].Points.AddXY(Convert.ToDateTime(row["Date"]), row["Glicemie"]);
                         chart1.Series["Control"].Points.AddXY(Convert.ToDateTime(row["Date"]), row["Glicemie"]);
                         listBox1.Items.Add(row["Glicemie"]);
                         listBox2.Items.Add(row["Date"]);
                     }
                 }
                 else
                     if (chartcomboBox.Text == "Trigliceride")
                     {
                         listBox1.Items.Clear();
                         listBox2.Items.Clear();
                         textlabel.Text = "Trigliceride";
                         chart1.Series["Trigliceride"].Points.Clear();
                         chart1.Series["RCV"].Points.Clear();
                         chart1.Series["Control"].Points.Clear();
                         chart1.Series["Greutate"].Points.Clear();
                         chart1.Series["Circumferinta Abdominala"].Points.Clear();
                         chart1.Series["Glicemie"].Points.Clear();
                         chart1.Series["HDL Colesterol"].Points.Clear();
                         chart1.Series["LDL Colesterol"].Points.Clear();
                         chart1.Series["TAD"].Points.Clear();
                         chart1.Series["TAS"].Points.Clear();
                         chart1.Series["IMC"].Points.Clear();
                         foreach (DataRow row in dt.Rows)
                         {
                             chart1.Series["Trigliceride"].Points.AddXY(Convert.ToDateTime(row["Date"]), row["Tg"]);
                             chart1.Series["Control"].Points.AddXY(Convert.ToDateTime(row["Date"]), row["Tg"]);
                             listBox1.Items.Add(row["Tg"]);
                             listBox2.Items.Add(row["Date"]);
                         }
                     }
                     else
                         if (chartcomboBox.Text == "HDL Colesterol")
                         {
                             listBox1.Items.Clear();
                             listBox2.Items.Clear();
                             textlabel.Text = chartcomboBox.Text;
                             chart1.Series["HDL Colesterol"].Points.Clear();
                             chart1.Series["RCV"].Points.Clear();
                             chart1.Series["Control"].Points.Clear();
                             chart1.Series["Greutate"].Points.Clear();
                             chart1.Series["Circumferinta Abdominala"].Points.Clear();
                             chart1.Series["Glicemie"].Points.Clear();
                             chart1.Series["Trigliceride"].Points.Clear();
                             chart1.Series["LDL Colesterol"].Points.Clear();
                             chart1.Series["TAD"].Points.Clear();
                             chart1.Series["TAS"].Points.Clear();
                             chart1.Series["IMC"].Points.Clear();
                             foreach (DataRow row in dt.Rows)
                             {
                                 chart1.Series["HDL Colesterol"].Points.AddXY(Convert.ToDateTime(row["Date"]), row["HDLCol"]);
                                 chart1.Series["Control"].Points.AddXY(Convert.ToDateTime(row["Date"]), row["HDLCol"]);
                                 listBox1.Items.Add(row["HDLCol"]);
                                 listBox2.Items.Add(row["Date"]);
                             }
                         }
                         else
                             if (chartcomboBox.Text == "LDL Colesterol")
                             {
                                 listBox1.Items.Clear();
                                 listBox2.Items.Clear();
                                 textlabel.Text = chartcomboBox.Text;
                                 chart1.Series["LDL Colesterol"].Points.Clear();
                                 chart1.Series["RCV"].Points.Clear();
                                 chart1.Series["Control"].Points.Clear();
                                 chart1.Series["Greutate"].Points.Clear();
                                 chart1.Series["Circumferinta Abdominala"].Points.Clear();
                                 chart1.Series["Glicemie"].Points.Clear();
                                 chart1.Series["Trigliceride"].Points.Clear();
                                 chart1.Series["HDL Colesterol"].Points.Clear();
                                 chart1.Series["TAD"].Points.Clear();
                                 chart1.Series["TAS"].Points.Clear();
                                 chart1.Series["IMC"].Points.Clear();
                                 foreach (DataRow row in dt.Rows)
                                 {
                                     chart1.Series["LDL Colesterol"].Points.AddXY(Convert.ToDateTime(row["Date"]), row["LDLCol"]);
                                     chart1.Series["Control"].Points.AddXY(Convert.ToDateTime(row["Date"]), row["LDLCol"]);
                                     listBox1.Items.Add(row["LDLCol"]);
                                     listBox2.Items.Add(row["Date"]);
                                 }
                             }
                             else
                                 if (chartcomboBox.Text == "Tensiune arteriala sistolica")
                                 {
                                     listBox1.Items.Clear();
                                     listBox2.Items.Clear();
                                     textlabel.Text = chartcomboBox.Text;
                                     chart1.Series["TAS"].Points.Clear();
                                     chart1.Series["Control"].Points.Clear();
                                     chart1.Series["Greutate"].Points.Clear();
                                     chart1.Series["Circumferinta Abdominala"].Points.Clear();
                                     chart1.Series["Glicemie"].Points.Clear();
                                     chart1.Series["Trigliceride"].Points.Clear();
                                     chart1.Series["HDL Colesterol"].Points.Clear();
                                     chart1.Series["LDL Colesterol"].Points.Clear();
                                     chart1.Series["IMC"].Points.Clear();
                                     chart1.Series["TAD"].Points.Clear();
                                     chart1.Series["RCV"].Points.Clear();
                                     foreach (DataRow row in dt.Rows)
                                     {
                                         chart1.Series["TAS"].Points.AddXY(Convert.ToDateTime(row["Date"]), row["TaSistolica"]);
                                         chart1.Series["Control"].Points.AddXY(Convert.ToDateTime(row["Date"]), row["TaSistolica"]);
                                         listBox1.Items.Add(row["TaSistolica"]);
                                         listBox2.Items.Add(row["Date"]);
                                     }
                                 }
                                 else
                                     if (chartcomboBox.Text == "Tensiune arteriala diastolica")
                                     {
                                         listBox1.Items.Clear();
                                         listBox2.Items.Clear();
                                         textlabel.Text = chartcomboBox.Text;
                                         chart1.Series["TAD"].Points.Clear();
                                         chart1.Series["Control"].Points.Clear();
                                         chart1.Series["Greutate"].Points.Clear();
                                         chart1.Series["Circumferinta Abdominala"].Points.Clear();
                                         chart1.Series["Glicemie"].Points.Clear();
                                         chart1.Series["Trigliceride"].Points.Clear();
                                         chart1.Series["HDL Colesterol"].Points.Clear();
                                         chart1.Series["LDL Colesterol"].Points.Clear();
                                         chart1.Series["TAS"].Points.Clear();
                                         chart1.Series["IMC"].Points.Clear();
                                         chart1.Series["RCV"].Points.Clear();
                                         foreach (DataRow row in dt.Rows)
                                         {
                                             chart1.Series["TAD"].Points.AddXY(Convert.ToDateTime(row["Date"]), row["TaDiastolica"]);
                                             chart1.Series["Control"].Points.AddXY(Convert.ToDateTime(row["Date"]), row["TaDiastolica"]);
                                             listBox1.Items.Add(row["TaDiastolica"]);
                                             listBox2.Items.Add(row["Date"]);
                                         }
                                     }
                                     else
                                         if (chartcomboBox.Text == "Indice De Masa Corporala")
                                         {
                                             float imcf;
                                             string imc;
                                             listBox1.Items.Clear();
                                             listBox2.Items.Clear();
                                             textlabel.Text = chartcomboBox.Text;
                                             chart1.Series["IMC"].Points.Clear();
                                             chart1.Series["Control"].Points.Clear();
                                             chart1.Series["Greutate"].Points.Clear();
                                             chart1.Series["Circumferinta Abdominala"].Points.Clear();
                                             chart1.Series["Glicemie"].Points.Clear();
                                             chart1.Series["Trigliceride"].Points.Clear();
                                             chart1.Series["HDL Colesterol"].Points.Clear();
                                             chart1.Series["LDL Colesterol"].Points.Clear();
                                             chart1.Series["TAS"].Points.Clear();
                                             chart1.Series["TAD"].Points.Clear();
                                             chart1.Series["RCV"].Points.Clear();
                                             foreach (DataRow row in dt.Rows)
                                             {
                                                 imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                 imc = imcf.ToString();
                                                 imcf = (float)Convert.ToDouble(imc);
                                                 chart1.Series["IMC"].Points.AddXY(Convert.ToDateTime(row["Date"]), imcf);
                                                 chart1.Series["Control"].Points.AddXY(Convert.ToDateTime(row["Date"]), imcf);
                                                 listBox1.Items.Add(imcf);
                                                 listBox2.Items.Add(row["Date"]);
                                             }
                                         }
                                         else
                                             if (chartcomboBox.Text == "Risc Cardiovascular")
                                             {
                                                 int rcv;
                                                 listBox1.Items.Clear();
                                                 listBox2.Items.Clear();
                                                 textlabel.Text = chartcomboBox.Text;
                                                 chart1.Series["IMC"].Points.Clear();
                                                 chart1.Series["Control"].Points.Clear();
                                                 chart1.Series["Greutate"].Points.Clear();
                                                 chart1.Series["Circumferinta Abdominala"].Points.Clear();
                                                 chart1.Series["Glicemie"].Points.Clear();
                                                 chart1.Series["Trigliceride"].Points.Clear();
                                                 chart1.Series["HDL Colesterol"].Points.Clear();
                                                 chart1.Series["LDL Colesterol"].Points.Clear();
                                                 chart1.Series["TAS"].Points.Clear();
                                                 chart1.Series["TAD"].Points.Clear();
                                                 chart1.Series["RCV"].Points.Clear();
                                                 foreach (DataRow row in dt.Rows)
                                                 {
                                                     rcv = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                     chart1.Series["RCV"].Points.AddXY(Convert.ToDateTime(row["Date"]), rcv);
                                                     chart1.Series["Control"].Points.AddXY(Convert.ToDateTime(row["Date"]), rcv);
                                                     listBox1.Items.Add(rcv);
                                                     listBox2.Items.Add(row["Date"]);
                                                 }
                                             }
                                             else
                                             {
                                                 listBox1.Items.Clear();
                                                 listBox2.Items.Clear();
                                                 textlabel.Text = "Valoare";
                                                 chart1.Series["IMC"].Points.Clear();
                                                 chart1.Series["Control"].Points.Clear();
                                                 chart1.Series["Greutate"].Points.Clear();
                                                 chart1.Series["Circumferinta Abdominala"].Points.Clear();
                                                 chart1.Series["Glicemie"].Points.Clear();
                                                 chart1.Series["Trigliceride"].Points.Clear();
                                                 chart1.Series["HDL Colesterol"].Points.Clear();
                                                 chart1.Series["LDL Colesterol"].Points.Clear();
                                                 chart1.Series["TAS"].Points.Clear();
                                                 chart1.Series["TAD"].Points.Clear();
                                                 chart1.Series["RCV"].Points.Clear();
                                             }
     }
 }
Beispiel #3
0
        private void afisbutton_Click(object sender, EventArgs e)
        {
            c = new Calcul();
            bool ok = true,ok2=true;
            try
            {
               this.statisticaTableAdapter.Fill(dateMedDataSet.Statistica);
            }
            catch
            {
                ok = false;
                MessageBox.Show("Vă rugăm reîncercați.");
            }
            try
            {
                viewDatePersTableAdapter.Fill(dateMedDataSet.ViewDatePers);
            }
            catch
            {
                ok2 = false;
                MessageBox.Show("Vă rugăm reîncercați.");
            }
            DataTable dt = dateMedDataSet.Statistica;
            DataTable dt2 = dateMedDataSet.ViewDatePers;
            if (FromtextBox.Text != "" && TotextBox.Text != "")
            {
                from = int.Parse(FromtextBox.Text);
                to = int.Parse(TotextBox.Text);
            }
            if (ok == true)
            {
                if (controlcomboBox.Text != "Selectati")
                {
                    if (controlcomboBox.Text == "Fumat")
                    {

                        numelistBox.Items.Clear();
                        datelistBox.Items.Clear();
                        indicelistBox.Items.Clear();
                        otherlistBox.Items.Clear();
                        valoarelabel.Text = controlcomboBox.Text;
                        foreach (DataRow row in dt.Rows)
                        {
                            if (row["Fumat"].ToString() == comboBox1.Text)
                            {
                                if (comboBox1.Text == "DA")
                                {
                                    fum = row["Fumat"] + " ( " + row["Nrtigar"] + " )";
                                    indicelistBox.Items.Add(fum);
                                    #region Alte valori
                                        if (comboBox2.Text == "CNP")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["CNP"]);
                                        }
                                        if(comboBox2.Text=="Fumat")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            if (row["Fumat"].ToString() == "DA")
                                                otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                            else
                                                otherlistBox.Items.Add(row["Fumat"]);
                                        }
                                        if (comboBox2.Text == "Activitate Fizica")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["ActFizica"]);
                                        }
                                        if (comboBox2.Text == "Masa Corporala")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["G"]);
                                        }
                                        if (comboBox2.Text == "Inaltime")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["H"]);
                                        }
                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["Ca"]);
                                        }
                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["TaSistolica"]);
                                        }
                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["TaDiastolica"]);
                                        }
                                        if (comboBox2.Text == "Glicemie")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["Glicemie"]);
                                        }
                                        if (comboBox2.Text == "HDL Colesterol")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["HDLCol"]);
                                        }
                                        if (comboBox2.Text == "LDL Colesterol")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["LDLCol"]);
                                        }
                                        if (comboBox2.Text == "Trigliceride")
                                        {
                                            otherlistBox.Items.Add(row["Tg"]);
                                            otherlabel.Text = comboBox2.Text;
                                        }
                                        if (comboBox2.Text == "Indice de masa corporala")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                            imc = imcf.ToString();
                                            imcf = (float)Convert.ToDouble(imc);
                                            otherlistBox.Items.Add(imcf);
                                        }
                                        if (comboBox2.Text == "Varsta")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(),now));
                                        }
                                        if (comboBox2.Text == "Risc Cardiovascular")
                                        {
                                            int rcvs;
                                            rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(),Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(rcvs);
                                        }
                                        if (ok2 == true)
                                        {
                                            foreach (DataRow row2 in dt2.Rows)
                                            {
                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                {
                                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["DZP"]);
                                                    }
                                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["DZF"]);
                                                    }
                                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["BoliCardio"]);
                                                    }
                                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                    {
                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                        otherlistBox.Items.Add(row2["HAFam"]);
                                                    }
                                                    if (comboBox2.Text == "Dislipidemie")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                    }
                                                    if (comboBox2.Text == "Obezitate")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["Obezitate"]);
                                                    }
                                                    if (comboBox2.Text == "Morti Subite")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["MortiSubite"]);
                                                    }
                                                    if (comboBox2.Text == "Ocupatie")
                                                    {
                                                        otherlistBox.Items.Add(row2["Ocupatie"]);
                                                        otherlabel.Text = comboBox2.Text;
                                                    }
                                                    if (comboBox2.Text == "Diabet Gestational")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["DiabetG"]);
                                                    }
                                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                    }
                                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                    {
                                                        otherlabel.Text="Hipertensiune Arteriala"+"\n" +"(personala)";
                                                        otherlistBox.Items.Add(row2["HAPers"]);
                                                    }
                                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                    {
                                                        otherlabel.Text = "Infarct Miocardic"+"\n" +"Accident Vascular Cerebral";
                                                        otherlistBox.Items.Add(row2["IMAVC"]);
                                                    }
                                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["STGlucoza"]);
                                                    }
                                                    if (comboBox2.Text == "Copil Macrosom")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["CopilMacro"]);
                                                    }
                                                }
                                            }
                                        }
                                #endregion
                                    ctr++;
                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();

                                }
                                else
                                    if (comboBox1.Text == "NU")
                                    {
                                        fum = row["Fumat"].ToString();
                                        indicelistBox.Items.Add(fum);
                                        #region Alte valori
                                        if (comboBox2.Text == "CNP")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["CNP"]);
                                        }
                                        if (comboBox2.Text == "Fumat")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            if (row["Fumat"].ToString() == "DA")
                                                otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                            else
                                                otherlistBox.Items.Add(row["Fumat"]);
                                        }
                                        if (comboBox2.Text == "Activitate Fizica")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["ActFizica"]);
                                        }
                                        if (comboBox2.Text == "Masa Corporala")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["G"]);
                                        }
                                        if (comboBox2.Text == "Inaltime")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["H"]);
                                        }
                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["Ca"]);
                                        }
                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["TaSistolica"]);
                                        }
                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["TaDiastolica"]);
                                        }
                                        if (comboBox2.Text == "Glicemie")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["Glicemie"]);
                                        }
                                        if (comboBox2.Text == "HDL Colesterol")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["HDLCol"]);
                                        }
                                        if (comboBox2.Text == "LDL Colesterol")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["LDLCol"]);
                                        }
                                        if (comboBox2.Text == "Trigliceride")
                                        {
                                            otherlistBox.Items.Add(row["Tg"]);
                                            otherlabel.Text = comboBox2.Text;
                                        }
                                        if (comboBox2.Text == "Indice de masa corporala")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                            imc = imcf.ToString();
                                            imcf = (float)Convert.ToDouble(imc);
                                            otherlistBox.Items.Add(imcf);
                                        }
                                        if (comboBox2.Text == "Varsta")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                        }
                                        if (comboBox2.Text == "Risc Cardiovascular")
                                        {
                                            int rcvs;
                                            rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(rcvs);
                                        }
                                        if (ok2 == true)
                                        {
                                            foreach (DataRow row2 in dt2.Rows)
                                            {
                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                {
                                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["DZP"]);
                                                    }
                                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["DZF"]);
                                                    }
                                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["BoliCardio"]);
                                                    }
                                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                    {
                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                        otherlistBox.Items.Add(row2["HAFam"]);
                                                    }
                                                    if (comboBox2.Text == "Dislipidemie")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                    }
                                                    if (comboBox2.Text == "Obezitate")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["Obezitate"]);
                                                    }
                                                    if (comboBox2.Text == "Morti Subite")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["MortiSubite"]);
                                                    }
                                                    if (comboBox2.Text == "Ocupatie")
                                                    {
                                                        otherlistBox.Items.Add(row2["Ocupatie"]);
                                                        otherlabel.Text = comboBox2.Text;
                                                    }
                                                    if (comboBox2.Text == "Diabet Gestational")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["DiabetG"]);
                                                    }
                                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                    }
                                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                    {
                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                        otherlistBox.Items.Add(row2["HAPers"]);
                                                    }
                                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                    {
                                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                        otherlistBox.Items.Add(row2["IMAVC"]);
                                                    }
                                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["STGlucoza"]);
                                                    }
                                                    if (comboBox2.Text == "Copil Macrosom")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["CopilMacro"]);
                                                    }
                                                }
                                            }
                                        }
                                        #endregion
                                        ctr++;
                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();

                                    }
                                numelistBox.Items.Add(row["Nume"]);
                                datelistBox.Items.Add(row["Date"]);
                            }
                            else
                                if (comboBox1.Text == "Toate Valorile")
                                {
                                    if (row["Fumat"].ToString() == "DA")
                                        indicelistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                    else
                                        indicelistBox.Items.Add(row["Fumat"]);
                                    numelistBox.Items.Add(row["Nume"]);
                                    datelistBox.Items.Add(row["Date"]);
                                    #region Alte valori
                                    if (comboBox2.Text == "CNP")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["CNP"]);
                                    }
                                    if (comboBox2.Text == "Fumat")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        if (row["Fumat"].ToString() == "DA")
                                            otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                        else
                                            otherlistBox.Items.Add(row["Fumat"]);
                                    }
                                    if (comboBox2.Text == "Activitate Fizica")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["ActFizica"]);
                                    }
                                    if (comboBox2.Text == "Masa Corporala")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["G"]);
                                    }
                                    if (comboBox2.Text == "Inaltime")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["H"]);
                                    }
                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["Ca"]);
                                    }
                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["TaSistolica"]);
                                    }
                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["TaDiastolica"]);
                                    }
                                    if (comboBox2.Text == "Glicemie")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["Glicemie"]);
                                    }
                                    if (comboBox2.Text == "HDL Colesterol")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["HDLCol"]);
                                    }
                                    if (comboBox2.Text == "LDL Colesterol")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["LDLCol"]);
                                    }
                                    if (comboBox2.Text == "Trigliceride")
                                    {
                                        otherlistBox.Items.Add(row["Tg"]);
                                        otherlabel.Text = comboBox2.Text;
                                    }
                                    if (comboBox2.Text == "Indice de masa corporala")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                        imc = imcf.ToString();
                                        imcf = (float)Convert.ToDouble(imc);
                                        otherlistBox.Items.Add(imcf);
                                    }
                                    if (comboBox2.Text == "Varsta")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                    }
                                    if (comboBox2.Text == "Risc Cardiovascular")
                                    {
                                        int rcvs;
                                        rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(rcvs);
                                    }
                                    if (ok2 == true)
                                    {
                                        foreach (DataRow row2 in dt2.Rows)
                                        {
                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                            {
                                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["DZP"]);
                                                }
                                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["DZF"]);
                                                }
                                                if (comboBox2.Text == "Boala Cardiovasculara")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["BoliCardio"]);
                                                }
                                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                {
                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                    otherlistBox.Items.Add(row2["HAFam"]);
                                                }
                                                if (comboBox2.Text == "Dislipidemie")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                }
                                                if (comboBox2.Text == "Obezitate")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["Obezitate"]);
                                                }
                                                if (comboBox2.Text == "Morti Subite")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["MortiSubite"]);
                                                }
                                                if (comboBox2.Text == "Ocupatie")
                                                {
                                                    otherlistBox.Items.Add(row2["Ocupatie"]);
                                                    otherlabel.Text = comboBox2.Text;
                                                }
                                                if (comboBox2.Text == "Diabet Gestational")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["DiabetG"]);
                                                }
                                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                }
                                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                {
                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                    otherlistBox.Items.Add(row2["HAPers"]);
                                                }
                                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                {
                                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                    otherlistBox.Items.Add(row2["IMAVC"]);
                                                }
                                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["STGlucoza"]);
                                                }
                                                if (comboBox2.Text == "Copil Macrosom")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["CopilMacro"]);
                                                }
                                            }
                                        }
                                    }
                                    #endregion
                                    ctr++;
                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();

                                }
                        }
                        ctr = 0;
                    }
                    else
                        if (controlcomboBox.Text == "Activitate Fizica")
                        {
                            numelistBox.Items.Clear();
                            datelistBox.Items.Clear();
                            indicelistBox.Items.Clear();
                            otherlistBox.Items.Clear();
                            valoarelabel.Text = controlcomboBox.Text;
                            foreach (DataRow row in dt.Rows)
                            {
                                if (row["ActFizica"].ToString() == comboBox1.Text)
                                {
                                    indicelistBox.Items.Add(row["ActFizica"]);
                                    numelistBox.Items.Add(row["Nume"]);
                                    datelistBox.Items.Add(row["Date"]);
                                    ctr++;
                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                    #region Alte valori
                                    if (comboBox2.Text == "CNP")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["CNP"]);
                                    }
                                    if (comboBox2.Text == "Fumat")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        if (row["Fumat"].ToString() == "DA")
                                            otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                        else
                                            otherlistBox.Items.Add(row["Fumat"]);
                                    }
                                    if (comboBox2.Text == "Activitate Fizica")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["ActFizica"]);
                                    }
                                    if (comboBox2.Text == "Masa Corporala")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["G"]);
                                    }
                                    if (comboBox2.Text == "Inaltime")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["H"]);
                                    }
                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["Ca"]);
                                    }
                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["TaSistolica"]);
                                    }
                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["TaDiastolica"]);
                                    }
                                    if (comboBox2.Text == "Glicemie")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["Glicemie"]);
                                    }
                                    if (comboBox2.Text == "HDL Colesterol")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["HDLCol"]);
                                    }
                                    if (comboBox2.Text == "LDL Colesterol")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(row["LDLCol"]);
                                    }
                                    if (comboBox2.Text == "Trigliceride")
                                    {
                                        otherlistBox.Items.Add(row["Tg"]);
                                        otherlabel.Text = comboBox2.Text;
                                    }
                                    if (comboBox2.Text == "Indice de masa corporala")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                        imc = imcf.ToString();
                                        imcf = (float)Convert.ToDouble(imc);
                                        otherlistBox.Items.Add(imcf);
                                    }
                                    if (comboBox2.Text == "Varsta")
                                    {
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                    }
                                    if (comboBox2.Text == "Risc Cardiovascular")
                                    {
                                        int rcvs;
                                        rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                        otherlabel.Text = comboBox2.Text;
                                        otherlistBox.Items.Add(rcvs);
                                    }
                                    if (ok2 == true)
                                    {
                                        foreach (DataRow row2 in dt2.Rows)
                                        {
                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                            {
                                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["DZP"]);
                                                }
                                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["DZF"]);
                                                }
                                                if (comboBox2.Text == "Boala Cardiovasculara")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["BoliCardio"]);
                                                }
                                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                {
                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                    otherlistBox.Items.Add(row2["HAFam"]);
                                                }
                                                if (comboBox2.Text == "Dislipidemie")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                }
                                                if (comboBox2.Text == "Obezitate")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["Obezitate"]);
                                                }
                                                if (comboBox2.Text == "Morti Subite")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["MortiSubite"]);
                                                }
                                                if (comboBox2.Text == "Ocupatie")
                                                {
                                                    otherlistBox.Items.Add(row2["Ocupatie"]);
                                                    otherlabel.Text = comboBox2.Text;
                                                }
                                                if (comboBox2.Text == "Diabet Gestational")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["DiabetG"]);
                                                }
                                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                }
                                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                {
                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                    otherlistBox.Items.Add(row2["HAPers"]);
                                                }
                                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                {
                                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                    otherlistBox.Items.Add(row2["IMAVC"]);
                                                }
                                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["STGlucoza"]);
                                                }
                                                if (comboBox2.Text == "Copil Macrosom")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row2["CopilMacro"]);
                                                }
                                            }
                                        }
                                    }
                                    #endregion
                                }
                                else
                                    if (comboBox1.Text == "Toate Valorile")
                                    {
                                        indicelistBox.Items.Add(row["ActFizica"]);
                                        numelistBox.Items.Add(row["Nume"]);
                                        datelistBox.Items.Add(row["Date"]);
                                        ctr++;
                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                        #region Alte valori
                                        if (comboBox2.Text == "CNP")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["CNP"]);
                                        }
                                        if (comboBox2.Text == "Fumat")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            if (row["Fumat"].ToString() == "DA")
                                                otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                            else
                                                otherlistBox.Items.Add(row["Fumat"]);
                                        }
                                        if (comboBox2.Text == "Activitate Fizica")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["ActFizica"]);
                                        }
                                        if (comboBox2.Text == "Masa Corporala")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["G"]);
                                        }
                                        if (comboBox2.Text == "Inaltime")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["H"]);
                                        }
                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["Ca"]);
                                        }
                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["TaSistolica"]);
                                        }
                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["TaDiastolica"]);
                                        }
                                        if (comboBox2.Text == "Glicemie")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["Glicemie"]);
                                        }
                                        if (comboBox2.Text == "HDL Colesterol")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["HDLCol"]);
                                        }
                                        if (comboBox2.Text == "LDL Colesterol")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["LDLCol"]);
                                        }
                                        if (comboBox2.Text == "Trigliceride")
                                        {
                                            otherlistBox.Items.Add(row["Tg"]);
                                            otherlabel.Text = comboBox2.Text;
                                        }
                                        if (comboBox2.Text == "Indice de masa corporala")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                            imc = imcf.ToString();
                                            imcf = (float)Convert.ToDouble(imc);
                                            otherlistBox.Items.Add(imcf);
                                        }
                                        if (comboBox2.Text == "Varsta")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                        }
                                        if (comboBox2.Text == "Risc Cardiovascular")
                                        {
                                            int rcvs;
                                            rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(rcvs);
                                        }
                                        if (ok2 == true)
                                        {
                                            foreach (DataRow row2 in dt2.Rows)
                                            {
                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                {
                                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["DZP"]);
                                                    }
                                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["DZF"]);
                                                    }
                                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["BoliCardio"]);
                                                    }
                                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                    {
                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                        otherlistBox.Items.Add(row2["HAFam"]);
                                                    }
                                                    if (comboBox2.Text == "Dislipidemie")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                    }
                                                    if (comboBox2.Text == "Obezitate")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["Obezitate"]);
                                                    }
                                                    if (comboBox2.Text == "Morti Subite")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["MortiSubite"]);
                                                    }
                                                    if (comboBox2.Text == "Ocupatie")
                                                    {
                                                        otherlistBox.Items.Add(row2["Ocupatie"]);
                                                        otherlabel.Text = comboBox2.Text;
                                                    }
                                                    if (comboBox2.Text == "Diabet Gestational")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["DiabetG"]);
                                                    }
                                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                    }
                                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                    {
                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                        otherlistBox.Items.Add(row2["HAPers"]);
                                                    }
                                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                    {
                                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                        otherlistBox.Items.Add(row2["IMAVC"]);
                                                    }
                                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["STGlucoza"]);
                                                    }
                                                    if (comboBox2.Text == "Copil Macrosom")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["CopilMacro"]);
                                                    }
                                                }
                                            }
                                        }
                                        #endregion
                                    }
                            }
                            ctr = 0;
                        }
                        else
                            if (controlcomboBox.Text == "Masa Corporala")
                            {
                                numelistBox.Items.Clear();
                                datelistBox.Items.Clear();
                                indicelistBox.Items.Clear();
                                otherlistBox.Items.Clear();
                                valoarelabel.Text = controlcomboBox.Text;
                                foreach (DataRow row in dt.Rows)
                                {
                                    if (Convert.ToInt32(row["G"]) >= from &&Convert.ToInt32(row["G"]) <= to)
                                    {
                                        indicelistBox.Items.Add(row["G"]);
                                        numelistBox.Items.Add(row["Nume"]);
                                        datelistBox.Items.Add(row["Date"]);
                                        ctr++;
                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                        #region Alte valori
                                        if (comboBox2.Text == "CNP")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["CNP"]);
                                        }
                                        if (comboBox2.Text == "Fumat")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            if (row["Fumat"].ToString() == "DA")
                                                otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                            else
                                                otherlistBox.Items.Add(row["Fumat"]);
                                        }
                                        if (comboBox2.Text == "Activitate Fizica")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["ActFizica"]);
                                        }
                                        if (comboBox2.Text == "Masa Corporala")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["G"]);
                                        }
                                        if (comboBox2.Text == "Inaltime")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["H"]);
                                        }
                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["Ca"]);
                                        }
                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["TaSistolica"]);
                                        }
                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["TaDiastolica"]);
                                        }
                                        if (comboBox2.Text == "Glicemie")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["Glicemie"]);
                                        }
                                        if (comboBox2.Text == "HDL Colesterol")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["HDLCol"]);
                                        }
                                        if (comboBox2.Text == "LDL Colesterol")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(row["LDLCol"]);
                                        }
                                        if (comboBox2.Text == "Trigliceride")
                                        {
                                            otherlistBox.Items.Add(row["Tg"]);
                                            otherlabel.Text = comboBox2.Text;
                                        }
                                        if (comboBox2.Text == "Indice de masa corporala")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                            imc = imcf.ToString();
                                            imcf = (float)Convert.ToDouble(imc);
                                            otherlistBox.Items.Add(imcf);
                                        }
                                        if (comboBox2.Text == "Varsta")
                                        {
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                        }
                                        if (comboBox2.Text == "Risc Cardiovascular")
                                        {
                                            int rcvs;
                                            rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                            otherlabel.Text = comboBox2.Text;
                                            otherlistBox.Items.Add(rcvs);
                                        }
                                        if (ok2 == true)
                                        {
                                            foreach (DataRow row2 in dt2.Rows)
                                            {
                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                {
                                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["DZP"]);
                                                    }
                                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["DZF"]);
                                                    }
                                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["BoliCardio"]);
                                                    }
                                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                    {
                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                        otherlistBox.Items.Add(row2["HAFam"]);
                                                    }
                                                    if (comboBox2.Text == "Dislipidemie")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                    }
                                                    if (comboBox2.Text == "Obezitate")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["Obezitate"]);
                                                    }
                                                    if (comboBox2.Text == "Morti Subite")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["MortiSubite"]);
                                                    }
                                                    if (comboBox2.Text == "Ocupatie")
                                                    {
                                                        otherlistBox.Items.Add(row2["Ocupatie"]);
                                                        otherlabel.Text = comboBox2.Text;
                                                    }
                                                    if (comboBox2.Text == "Diabet Gestational")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["DiabetG"]);
                                                    }
                                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                    }
                                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                    {
                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                        otherlistBox.Items.Add(row2["HAPers"]);
                                                    }
                                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                    {
                                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                        otherlistBox.Items.Add(row2["IMAVC"]);
                                                    }
                                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["STGlucoza"]);
                                                    }
                                                    if (comboBox2.Text == "Copil Macrosom")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row2["CopilMacro"]);
                                                    }
                                                }
                                            }
                                        }
                                        #endregion
                                    }
                                    else
                                        if (from == 0 && Convert.ToInt32(row["G"]) <= to)
                                        {
                                            indicelistBox.Items.Add(row["G"]);
                                            numelistBox.Items.Add(row["Nume"]);
                                            datelistBox.Items.Add(row["Date"]);
                                            ctr++;
                                            paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                            #region Alte valori
                                            if (comboBox2.Text == "CNP")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["CNP"]);
                                            }
                                            if (comboBox2.Text == "Fumat")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                if (row["Fumat"].ToString() == "DA")
                                                    otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                else
                                                    otherlistBox.Items.Add(row["Fumat"]);
                                            }
                                            if (comboBox2.Text == "Activitate Fizica")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["ActFizica"]);
                                            }
                                            if (comboBox2.Text == "Masa Corporala")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["G"]);
                                            }
                                            if (comboBox2.Text == "Inaltime")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["H"]);
                                            }
                                            if (comboBox2.Text == "Circumferinta Abdominala")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["Ca"]);
                                            }
                                            if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["TaSistolica"]);
                                            }
                                            if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["TaDiastolica"]);
                                            }
                                            if (comboBox2.Text == "Glicemie")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["Glicemie"]);
                                            }
                                            if (comboBox2.Text == "HDL Colesterol")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["HDLCol"]);
                                            }
                                            if (comboBox2.Text == "LDL Colesterol")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["LDLCol"]);
                                            }
                                            if (comboBox2.Text == "Trigliceride")
                                            {
                                                otherlistBox.Items.Add(row["Tg"]);
                                                otherlabel.Text = comboBox2.Text;
                                            }
                                            if (comboBox2.Text == "Indice de masa corporala")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                imc = imcf.ToString();
                                                imcf = (float)Convert.ToDouble(imc);
                                                otherlistBox.Items.Add(imcf);
                                            }
                                            if (comboBox2.Text == "Varsta")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                            }
                                            if (comboBox2.Text == "Risc Cardiovascular")
                                            {
                                                int rcvs;
                                                rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(rcvs);
                                            }
                                            if (ok2 == true)
                                            {
                                                foreach (DataRow row2 in dt2.Rows)
                                                {
                                                    if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                    {
                                                        if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["DZP"]);
                                                        }
                                                        if (comboBox2.Text == "Diabet Zaharat Frati")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["DZF"]);
                                                        }
                                                        if (comboBox2.Text == "Boala Cardiovasculara")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["BoliCardio"]);
                                                        }
                                                        if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                        {
                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                            otherlistBox.Items.Add(row2["HAFam"]);
                                                        }
                                                        if (comboBox2.Text == "Dislipidemie")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                        }
                                                        if (comboBox2.Text == "Obezitate")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["Obezitate"]);
                                                        }
                                                        if (comboBox2.Text == "Morti Subite")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["MortiSubite"]);
                                                        }
                                                        if (comboBox2.Text == "Ocupatie")
                                                        {
                                                            otherlistBox.Items.Add(row2["Ocupatie"]);
                                                            otherlabel.Text = comboBox2.Text;
                                                        }
                                                        if (comboBox2.Text == "Diabet Gestational")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["DiabetG"]);
                                                        }
                                                        if (comboBox2.Text == "Cardiopatie Ischemica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                        }
                                                        if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                        {
                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                            otherlistBox.Items.Add(row2["HAPers"]);
                                                        }
                                                        if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                        {
                                                            otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                            otherlistBox.Items.Add(row2["IMAVC"]);
                                                        }
                                                        if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["STGlucoza"]);
                                                        }
                                                        if (comboBox2.Text == "Copil Macrosom")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["CopilMacro"]);
                                                        }
                                                    }
                                                }
                                            }
                                            #endregion
                                        }
                                        else
                                            if (from == 0 && to == 0)
                                            {

                                                indicelistBox.Items.Add(row["G"]);
                                                numelistBox.Items.Add(row["Nume"]);
                                                datelistBox.Items.Add(row["Date"]);
                                                ctr++;
                                                paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                #region Alte valori
                                                if (comboBox2.Text == "CNP")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["CNP"]);
                                                }
                                                if (comboBox2.Text == "Fumat")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    if (row["Fumat"].ToString() == "DA")
                                                        otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                    else
                                                        otherlistBox.Items.Add(row["Fumat"]);
                                                }
                                                if (comboBox2.Text == "Activitate Fizica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["ActFizica"]);
                                                }
                                                if (comboBox2.Text == "Masa Corporala")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["G"]);
                                                }
                                                if (comboBox2.Text == "Inaltime")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["H"]);
                                                }
                                                if (comboBox2.Text == "Circumferinta Abdominala")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["Ca"]);
                                                }
                                                if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["TaSistolica"]);
                                                }
                                                if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["TaDiastolica"]);
                                                }
                                                if (comboBox2.Text == "Glicemie")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["Glicemie"]);
                                                }
                                                if (comboBox2.Text == "HDL Colesterol")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["HDLCol"]);
                                                }
                                                if (comboBox2.Text == "LDL Colesterol")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["LDLCol"]);
                                                }
                                                if (comboBox2.Text == "Trigliceride")
                                                {
                                                    otherlistBox.Items.Add(row["Tg"]);
                                                    otherlabel.Text = comboBox2.Text;
                                                }
                                                if (comboBox2.Text == "Indice de masa corporala")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                    imc = imcf.ToString();
                                                    imcf = (float)Convert.ToDouble(imc);
                                                    otherlistBox.Items.Add(imcf);
                                                }
                                                if (comboBox2.Text == "Varsta")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                }
                                                if (comboBox2.Text == "Risc Cardiovascular")
                                                {
                                                    int rcvs;
                                                    rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(rcvs);
                                                }
                                                if (ok2 == true)
                                                {
                                                    foreach (DataRow row2 in dt2.Rows)
                                                    {
                                                        if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                        {
                                                            if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["DZP"]);
                                                            }
                                                            if (comboBox2.Text == "Diabet Zaharat Frati")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["DZF"]);
                                                            }
                                                            if (comboBox2.Text == "Boala Cardiovasculara")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["BoliCardio"]);
                                                            }
                                                            if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                            {
                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                otherlistBox.Items.Add(row2["HAFam"]);
                                                            }
                                                            if (comboBox2.Text == "Dislipidemie")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                            }
                                                            if (comboBox2.Text == "Obezitate")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["Obezitate"]);
                                                            }
                                                            if (comboBox2.Text == "Morti Subite")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["MortiSubite"]);
                                                            }
                                                            if (comboBox2.Text == "Ocupatie")
                                                            {
                                                                otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                otherlabel.Text = comboBox2.Text;
                                                            }
                                                            if (comboBox2.Text == "Diabet Gestational")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["DiabetG"]);
                                                            }
                                                            if (comboBox2.Text == "Cardiopatie Ischemica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                            }
                                                            if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                            {
                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                otherlistBox.Items.Add(row2["HAPers"]);
                                                            }
                                                            if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                            {
                                                                otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                otherlistBox.Items.Add(row2["IMAVC"]);
                                                            }
                                                            if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["STGlucoza"]);
                                                            }
                                                            if (comboBox2.Text == "Copil Macrosom")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["CopilMacro"]);
                                                            }
                                                        }
                                                    }
                                                }
                                                #endregion
                                            }

                                }
                                ctr = 0;
                            }
                            else
                                if (controlcomboBox.Text == "Inaltime")
                                {
                                    numelistBox.Items.Clear();
                                    datelistBox.Items.Clear();
                                    indicelistBox.Items.Clear();
                                    otherlistBox.Items.Clear();
                                    valoarelabel.Text = controlcomboBox.Text;
                                    foreach (DataRow row in dt.Rows)
                                    {
                                        if (Convert.ToInt32(row["H"]) >= from && Convert.ToInt32(row["H"]) <= to)
                                        {
                                            indicelistBox.Items.Add(row["H"]);
                                            numelistBox.Items.Add(row["Nume"]);
                                            datelistBox.Items.Add(row["Date"]);
                                            ctr++;
                                            paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                            #region Alte valori
                                            if (comboBox2.Text == "CNP")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["CNP"]);
                                            }
                                            if (comboBox2.Text == "Fumat")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                if (row["Fumat"].ToString() == "DA")
                                                    otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                else
                                                    otherlistBox.Items.Add(row["Fumat"]);
                                            }
                                            if (comboBox2.Text == "Activitate Fizica")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["ActFizica"]);
                                            }
                                            if (comboBox2.Text == "Masa Corporala")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["G"]);
                                            }
                                            if (comboBox2.Text == "Inaltime")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["H"]);
                                            }
                                            if (comboBox2.Text == "Circumferinta Abdominala")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["Ca"]);
                                            }
                                            if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["TaSistolica"]);
                                            }
                                            if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["TaDiastolica"]);
                                            }
                                            if (comboBox2.Text == "Glicemie")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["Glicemie"]);
                                            }
                                            if (comboBox2.Text == "HDL Colesterol")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["HDLCol"]);
                                            }
                                            if (comboBox2.Text == "LDL Colesterol")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(row["LDLCol"]);
                                            }
                                            if (comboBox2.Text == "Trigliceride")
                                            {
                                                otherlistBox.Items.Add(row["Tg"]);
                                                otherlabel.Text = comboBox2.Text;
                                            }
                                            if (comboBox2.Text == "Indice de masa corporala")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                imc = imcf.ToString();
                                                imcf = (float)Convert.ToDouble(imc);
                                                otherlistBox.Items.Add(imcf);
                                            }
                                            if (comboBox2.Text == "Varsta")
                                            {
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                            }
                                            if (comboBox2.Text == "Risc Cardiovascular")
                                            {
                                                int rcvs;
                                                rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                otherlabel.Text = comboBox2.Text;
                                                otherlistBox.Items.Add(rcvs);
                                            }
                                            if (ok2 == true)
                                            {
                                                foreach (DataRow row2 in dt2.Rows)
                                                {
                                                    if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                    {
                                                        if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["DZP"]);
                                                        }
                                                        if (comboBox2.Text == "Diabet Zaharat Frati")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["DZF"]);
                                                        }
                                                        if (comboBox2.Text == "Boala Cardiovasculara")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["BoliCardio"]);
                                                        }
                                                        if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                        {
                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                            otherlistBox.Items.Add(row2["HAFam"]);
                                                        }
                                                        if (comboBox2.Text == "Dislipidemie")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                        }
                                                        if (comboBox2.Text == "Obezitate")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["Obezitate"]);
                                                        }
                                                        if (comboBox2.Text == "Morti Subite")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["MortiSubite"]);
                                                        }
                                                        if (comboBox2.Text == "Ocupatie")
                                                        {
                                                            otherlistBox.Items.Add(row2["Ocupatie"]);
                                                            otherlabel.Text = comboBox2.Text;
                                                        }
                                                        if (comboBox2.Text == "Diabet Gestational")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["DiabetG"]);
                                                        }
                                                        if (comboBox2.Text == "Cardiopatie Ischemica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                        }
                                                        if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                        {
                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                            otherlistBox.Items.Add(row2["HAPers"]);
                                                        }
                                                        if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                        {
                                                            otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                            otherlistBox.Items.Add(row2["IMAVC"]);
                                                        }
                                                        if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["STGlucoza"]);
                                                        }
                                                        if (comboBox2.Text == "Copil Macrosom")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row2["CopilMacro"]);
                                                        }
                                                    }
                                                }
                                            }
                                            #endregion
                                        }
                                        else
                                            if (from == 0 && Convert.ToInt32(row["H"]) <= to)
                                            {
                                                indicelistBox.Items.Add(row["H"]);
                                                numelistBox.Items.Add(row["Nume"]);
                                                datelistBox.Items.Add(row["Date"]);
                                                ctr++;
                                                paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                #region Alte valori
                                                if (comboBox2.Text == "CNP")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["CNP"]);
                                                }
                                                if (comboBox2.Text == "Fumat")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    if (row["Fumat"].ToString() == "DA")
                                                        otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                    else
                                                        otherlistBox.Items.Add(row["Fumat"]);
                                                }
                                                if (comboBox2.Text == "Activitate Fizica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["ActFizica"]);
                                                }
                                                if (comboBox2.Text == "Masa Corporala")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["G"]);
                                                }
                                                if (comboBox2.Text == "Inaltime")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["H"]);
                                                }
                                                if (comboBox2.Text == "Circumferinta Abdominala")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["Ca"]);
                                                }
                                                if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["TaSistolica"]);
                                                }
                                                if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["TaDiastolica"]);
                                                }
                                                if (comboBox2.Text == "Glicemie")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["Glicemie"]);
                                                }
                                                if (comboBox2.Text == "HDL Colesterol")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["HDLCol"]);
                                                }
                                                if (comboBox2.Text == "LDL Colesterol")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["LDLCol"]);
                                                }
                                                if (comboBox2.Text == "Trigliceride")
                                                {
                                                    otherlistBox.Items.Add(row["Tg"]);
                                                    otherlabel.Text = comboBox2.Text;
                                                }
                                                if (comboBox2.Text == "Indice de masa corporala")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                    imc = imcf.ToString();
                                                    imcf = (float)Convert.ToDouble(imc);
                                                    otherlistBox.Items.Add(imcf);
                                                }
                                                if (comboBox2.Text == "Varsta")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                }
                                                if (comboBox2.Text == "Risc Cardiovascular")
                                                {
                                                    int rcvs;
                                                    rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(rcvs);
                                                }
                                                if (ok2 == true)
                                                {
                                                    foreach (DataRow row2 in dt2.Rows)
                                                    {
                                                        if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                        {
                                                            if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["DZP"]);
                                                            }
                                                            if (comboBox2.Text == "Diabet Zaharat Frati")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["DZF"]);
                                                            }
                                                            if (comboBox2.Text == "Boala Cardiovasculara")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["BoliCardio"]);
                                                            }
                                                            if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                            {
                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                otherlistBox.Items.Add(row2["HAFam"]);
                                                            }
                                                            if (comboBox2.Text == "Dislipidemie")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                            }
                                                            if (comboBox2.Text == "Obezitate")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["Obezitate"]);
                                                            }
                                                            if (comboBox2.Text == "Morti Subite")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["MortiSubite"]);
                                                            }
                                                            if (comboBox2.Text == "Ocupatie")
                                                            {
                                                                otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                otherlabel.Text = comboBox2.Text;
                                                            }
                                                            if (comboBox2.Text == "Diabet Gestational")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["DiabetG"]);
                                                            }
                                                            if (comboBox2.Text == "Cardiopatie Ischemica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                            }
                                                            if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                            {
                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                otherlistBox.Items.Add(row2["HAPers"]);
                                                            }
                                                            if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                            {
                                                                otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                otherlistBox.Items.Add(row2["IMAVC"]);
                                                            }
                                                            if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["STGlucoza"]);
                                                            }
                                                            if (comboBox2.Text == "Copil Macrosom")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["CopilMacro"]);
                                                            }
                                                        }
                                                    }
                                                }
                                                #endregion
                                            }
                                            else
                                                if (from == 0 && to == 0)
                                                {

                                                    indicelistBox.Items.Add(row["H"]);
                                                    numelistBox.Items.Add(row["Nume"]);
                                                    datelistBox.Items.Add(row["Date"]);
                                                    ctr++;
                                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                    #region Alte valori
                                                    if (comboBox2.Text == "CNP")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["CNP"]);
                                                    }
                                                    if (comboBox2.Text == "Fumat")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        if (row["Fumat"].ToString() == "DA")
                                                            otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                        else
                                                            otherlistBox.Items.Add(row["Fumat"]);
                                                    }
                                                    if (comboBox2.Text == "Activitate Fizica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["ActFizica"]);
                                                    }
                                                    if (comboBox2.Text == "Masa Corporala")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["G"]);
                                                    }
                                                    if (comboBox2.Text == "Inaltime")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["H"]);
                                                    }
                                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["Ca"]);
                                                    }
                                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["TaSistolica"]);
                                                    }
                                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["TaDiastolica"]);
                                                    }
                                                    if (comboBox2.Text == "Glicemie")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["Glicemie"]);
                                                    }
                                                    if (comboBox2.Text == "HDL Colesterol")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["HDLCol"]);
                                                    }
                                                    if (comboBox2.Text == "LDL Colesterol")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["LDLCol"]);
                                                    }
                                                    if (comboBox2.Text == "Trigliceride")
                                                    {
                                                        otherlistBox.Items.Add(row["Tg"]);
                                                        otherlabel.Text = comboBox2.Text;
                                                    }
                                                    if (comboBox2.Text == "Indice de masa corporala")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                        imc = imcf.ToString();
                                                        imcf = (float)Convert.ToDouble(imc);
                                                        otherlistBox.Items.Add(imcf);
                                                    }
                                                    if (comboBox2.Text == "Varsta")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                    }
                                                    if (comboBox2.Text == "Risc Cardiovascular")
                                                    {
                                                        int rcvs;
                                                        rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(rcvs);
                                                    }
                                                    if (ok2 == true)
                                                    {
                                                        foreach (DataRow row2 in dt2.Rows)
                                                        {
                                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                            {
                                                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["DZP"]);
                                                                }
                                                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["DZF"]);
                                                                }
                                                                if (comboBox2.Text == "Boala Cardiovasculara")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                }
                                                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                {
                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                    otherlistBox.Items.Add(row2["HAFam"]);
                                                                }
                                                                if (comboBox2.Text == "Dislipidemie")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                }
                                                                if (comboBox2.Text == "Obezitate")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["Obezitate"]);
                                                                }
                                                                if (comboBox2.Text == "Morti Subite")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                }
                                                                if (comboBox2.Text == "Ocupatie")
                                                                {
                                                                    otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                    otherlabel.Text = comboBox2.Text;
                                                                }
                                                                if (comboBox2.Text == "Diabet Gestational")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["DiabetG"]);
                                                                }
                                                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                }
                                                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                {
                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                    otherlistBox.Items.Add(row2["HAPers"]);
                                                                }
                                                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                {
                                                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                    otherlistBox.Items.Add(row2["IMAVC"]);
                                                                }
                                                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                }
                                                                if (comboBox2.Text == "Copil Macrosom")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                }
                                                            }
                                                        }
                                                    }
                                                    #endregion
                                                }

                                    }
                                    ctr = 0;
                                }
                                else
                                    if (controlcomboBox.Text == "Tensiune Arteriala Sistolica")
                                    {
                                        numelistBox.Items.Clear();
                                        datelistBox.Items.Clear();
                                        indicelistBox.Items.Clear();
                                        otherlistBox.Items.Clear();
                                        valoarelabel.Text = controlcomboBox.Text;
                                        foreach (DataRow row in dt.Rows)
                                        {
                                            if (Convert.ToInt32(row["TaSistolica"]) >= from && Convert.ToInt32(row["TaSistolica"]) <= to)
                                            {
                                                indicelistBox.Items.Add(row["TaSistolica"]);
                                                numelistBox.Items.Add(row["Nume"]);
                                                datelistBox.Items.Add(row["Date"]);
                                                ctr++;
                                                paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                #region Alte valori
                                                if (comboBox2.Text == "CNP")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["CNP"]);
                                                }
                                                if (comboBox2.Text == "Fumat")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    if (row["Fumat"].ToString() == "DA")
                                                        otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                    else
                                                        otherlistBox.Items.Add(row["Fumat"]);
                                                }
                                                if (comboBox2.Text == "Activitate Fizica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["ActFizica"]);
                                                }
                                                if (comboBox2.Text == "Masa Corporala")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["G"]);
                                                }
                                                if (comboBox2.Text == "Inaltime")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["H"]);
                                                }
                                                if (comboBox2.Text == "Circumferinta Abdominala")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["Ca"]);
                                                }
                                                if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["TaSistolica"]);
                                                }
                                                if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["TaDiastolica"]);
                                                }
                                                if (comboBox2.Text == "Glicemie")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["Glicemie"]);
                                                }
                                                if (comboBox2.Text == "HDL Colesterol")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["HDLCol"]);
                                                }
                                                if (comboBox2.Text == "LDL Colesterol")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(row["LDLCol"]);
                                                }
                                                if (comboBox2.Text == "Trigliceride")
                                                {
                                                    otherlistBox.Items.Add(row["Tg"]);
                                                    otherlabel.Text = comboBox2.Text;
                                                }
                                                if (comboBox2.Text == "Indice de masa corporala")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                    imc = imcf.ToString();
                                                    imcf = (float)Convert.ToDouble(imc);
                                                    otherlistBox.Items.Add(imcf);
                                                }
                                                if (comboBox2.Text == "Varsta")
                                                {
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                }
                                                if (comboBox2.Text == "Risc Cardiovascular")
                                                {
                                                    int rcvs;
                                                    rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                    otherlabel.Text = comboBox2.Text;
                                                    otherlistBox.Items.Add(rcvs);
                                                }
                                                if (ok2 == true)
                                                {
                                                    foreach (DataRow row2 in dt2.Rows)
                                                    {
                                                        if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                        {
                                                            if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["DZP"]);
                                                            }
                                                            if (comboBox2.Text == "Diabet Zaharat Frati")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["DZF"]);
                                                            }
                                                            if (comboBox2.Text == "Boala Cardiovasculara")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["BoliCardio"]);
                                                            }
                                                            if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                            {
                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                otherlistBox.Items.Add(row2["HAFam"]);
                                                            }
                                                            if (comboBox2.Text == "Dislipidemie")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                            }
                                                            if (comboBox2.Text == "Obezitate")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["Obezitate"]);
                                                            }
                                                            if (comboBox2.Text == "Morti Subite")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["MortiSubite"]);
                                                            }
                                                            if (comboBox2.Text == "Ocupatie")
                                                            {
                                                                otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                otherlabel.Text = comboBox2.Text;
                                                            }
                                                            if (comboBox2.Text == "Diabet Gestational")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["DiabetG"]);
                                                            }
                                                            if (comboBox2.Text == "Cardiopatie Ischemica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                            }
                                                            if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                            {
                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                otherlistBox.Items.Add(row2["HAPers"]);
                                                            }
                                                            if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                            {
                                                                otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                otherlistBox.Items.Add(row2["IMAVC"]);
                                                            }
                                                            if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["STGlucoza"]);
                                                            }
                                                            if (comboBox2.Text == "Copil Macrosom")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row2["CopilMacro"]);
                                                            }
                                                        }
                                                    }
                                                }
                                                #endregion
                                            }
                                            else
                                                if (from == 0 && Convert.ToInt32(row["TaSistolica"]) <= to)
                                                {
                                                    indicelistBox.Items.Add(row["TaSistolica"]);
                                                    numelistBox.Items.Add(row["Nume"]);
                                                    datelistBox.Items.Add(row["Date"]);
                                                    ctr++;
                                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                    #region Alte valori
                                                    if (comboBox2.Text == "CNP")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["CNP"]);
                                                    }
                                                    if (comboBox2.Text == "Fumat")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        if (row["Fumat"].ToString() == "DA")
                                                            otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                        else
                                                            otherlistBox.Items.Add(row["Fumat"]);
                                                    }
                                                    if (comboBox2.Text == "Activitate Fizica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["ActFizica"]);
                                                    }
                                                    if (comboBox2.Text == "Masa Corporala")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["G"]);
                                                    }
                                                    if (comboBox2.Text == "Inaltime")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["H"]);
                                                    }
                                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["Ca"]);
                                                    }
                                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["TaSistolica"]);
                                                    }
                                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["TaDiastolica"]);
                                                    }
                                                    if (comboBox2.Text == "Glicemie")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["Glicemie"]);
                                                    }
                                                    if (comboBox2.Text == "HDL Colesterol")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["HDLCol"]);
                                                    }
                                                    if (comboBox2.Text == "LDL Colesterol")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["LDLCol"]);
                                                    }
                                                    if (comboBox2.Text == "Trigliceride")
                                                    {
                                                        otherlistBox.Items.Add(row["Tg"]);
                                                        otherlabel.Text = comboBox2.Text;
                                                    }
                                                    if (comboBox2.Text == "Indice de masa corporala")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                        imc = imcf.ToString();
                                                        imcf = (float)Convert.ToDouble(imc);
                                                        otherlistBox.Items.Add(imcf);
                                                    }
                                                    if (comboBox2.Text == "Varsta")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                    }
                                                    if (comboBox2.Text == "Risc Cardiovascular")
                                                    {
                                                        int rcvs;
                                                        rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(rcvs);
                                                    }
                                                    if (ok2 == true)
                                                    {
                                                        foreach (DataRow row2 in dt2.Rows)
                                                        {
                                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                            {
                                                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["DZP"]);
                                                                }
                                                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["DZF"]);
                                                                }
                                                                if (comboBox2.Text == "Boala Cardiovasculara")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                }
                                                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                {
                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                    otherlistBox.Items.Add(row2["HAFam"]);
                                                                }
                                                                if (comboBox2.Text == "Dislipidemie")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                }
                                                                if (comboBox2.Text == "Obezitate")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["Obezitate"]);
                                                                }
                                                                if (comboBox2.Text == "Morti Subite")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                }
                                                                if (comboBox2.Text == "Ocupatie")
                                                                {
                                                                    otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                    otherlabel.Text = comboBox2.Text;
                                                                }
                                                                if (comboBox2.Text == "Diabet Gestational")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["DiabetG"]);
                                                                }
                                                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                }
                                                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                {
                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                    otherlistBox.Items.Add(row2["HAPers"]);
                                                                }
                                                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                {
                                                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                    otherlistBox.Items.Add(row2["IMAVC"]);
                                                                }
                                                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                }
                                                                if (comboBox2.Text == "Copil Macrosom")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                }
                                                            }
                                                        }
                                                    }
                                                    #endregion
                                                }
                                                else
                                                    if (from == 0 && to == 0)
                                                    {

                                                        indicelistBox.Items.Add(row["TaSistolica"]);
                                                        numelistBox.Items.Add(row["Nume"]);
                                                        datelistBox.Items.Add(row["Date"]);
                                                        ctr++;
                                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                        #region Alte valori
                                                        if (comboBox2.Text == "CNP")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["CNP"]);
                                                        }
                                                        if (comboBox2.Text == "Fumat")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            if (row["Fumat"].ToString() == "DA")
                                                                otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                            else
                                                                otherlistBox.Items.Add(row["Fumat"]);
                                                        }
                                                        if (comboBox2.Text == "Activitate Fizica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["ActFizica"]);
                                                        }
                                                        if (comboBox2.Text == "Masa Corporala")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["G"]);
                                                        }
                                                        if (comboBox2.Text == "Inaltime")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["H"]);
                                                        }
                                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["Ca"]);
                                                        }
                                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["TaSistolica"]);
                                                        }
                                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["TaDiastolica"]);
                                                        }
                                                        if (comboBox2.Text == "Glicemie")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["Glicemie"]);
                                                        }
                                                        if (comboBox2.Text == "HDL Colesterol")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["HDLCol"]);
                                                        }
                                                        if (comboBox2.Text == "LDL Colesterol")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["LDLCol"]);
                                                        }
                                                        if (comboBox2.Text == "Trigliceride")
                                                        {
                                                            otherlistBox.Items.Add(row["Tg"]);
                                                            otherlabel.Text = comboBox2.Text;
                                                        }
                                                        if (comboBox2.Text == "Indice de masa corporala")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                            imc = imcf.ToString();
                                                            imcf = (float)Convert.ToDouble(imc);
                                                            otherlistBox.Items.Add(imcf);
                                                        }
                                                        if (comboBox2.Text == "Varsta")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                        }
                                                        if (comboBox2.Text == "Risc Cardiovascular")
                                                        {
                                                            int rcvs;
                                                            rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(rcvs);
                                                        }
                                                        if (ok2 == true)
                                                        {
                                                            foreach (DataRow row2 in dt2.Rows)
                                                            {
                                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                {
                                                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["DZP"]);
                                                                    }
                                                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["DZF"]);
                                                                    }
                                                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                    }
                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                    {
                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                        otherlistBox.Items.Add(row2["HAFam"]);
                                                                    }
                                                                    if (comboBox2.Text == "Dislipidemie")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                    }
                                                                    if (comboBox2.Text == "Obezitate")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["Obezitate"]);
                                                                    }
                                                                    if (comboBox2.Text == "Morti Subite")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                    }
                                                                    if (comboBox2.Text == "Ocupatie")
                                                                    {
                                                                        otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                        otherlabel.Text = comboBox2.Text;
                                                                    }
                                                                    if (comboBox2.Text == "Diabet Gestational")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["DiabetG"]);
                                                                    }
                                                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                    }
                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                    {
                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                        otherlistBox.Items.Add(row2["HAPers"]);
                                                                    }
                                                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                    {
                                                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                        otherlistBox.Items.Add(row2["IMAVC"]);
                                                                    }
                                                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                    }
                                                                    if (comboBox2.Text == "Copil Macrosom")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                    }
                                                                }
                                                            }
                                                        }
                                                        #endregion
                                                    }

                                        }
                                        ctr = 0;
                                    }
                                    else
                                        if (controlcomboBox.Text == "Circumferinta Abdominala")
                                        {
                                            numelistBox.Items.Clear();
                                            datelistBox.Items.Clear();
                                            indicelistBox.Items.Clear();
                                            otherlistBox.Items.Clear();
                                            valoarelabel.Text = controlcomboBox.Text;
                                            foreach (DataRow row in dt.Rows)
                                            {
                                                if (Convert.ToInt32(row["Ca"]) >= from && Convert.ToInt32(row["Ca"]) <= to)
                                                {
                                                    indicelistBox.Items.Add(row["Ca"]);
                                                    numelistBox.Items.Add(row["Nume"]);
                                                    datelistBox.Items.Add(row["Date"]);
                                                    ctr++;
                                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                    #region Alte valori
                                                    if (comboBox2.Text == "CNP")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["CNP"]);
                                                    }
                                                    if (comboBox2.Text == "Fumat")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        if (row["Fumat"].ToString() == "DA")
                                                            otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                        else
                                                            otherlistBox.Items.Add(row["Fumat"]);
                                                    }
                                                    if (comboBox2.Text == "Activitate Fizica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["ActFizica"]);
                                                    }
                                                    if (comboBox2.Text == "Masa Corporala")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["G"]);
                                                    }
                                                    if (comboBox2.Text == "Inaltime")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["H"]);
                                                    }
                                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["Ca"]);
                                                    }
                                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["TaSistolica"]);
                                                    }
                                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["TaDiastolica"]);
                                                    }
                                                    if (comboBox2.Text == "Glicemie")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["Glicemie"]);
                                                    }
                                                    if (comboBox2.Text == "HDL Colesterol")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["HDLCol"]);
                                                    }
                                                    if (comboBox2.Text == "LDL Colesterol")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(row["LDLCol"]);
                                                    }
                                                    if (comboBox2.Text == "Trigliceride")
                                                    {
                                                        otherlistBox.Items.Add(row["Tg"]);
                                                        otherlabel.Text = comboBox2.Text;
                                                    }
                                                    if (comboBox2.Text == "Indice de masa corporala")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                        imc = imcf.ToString();
                                                        imcf = (float)Convert.ToDouble(imc);
                                                        otherlistBox.Items.Add(imcf);
                                                    }
                                                    if (comboBox2.Text == "Varsta")
                                                    {
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                    }
                                                    if (comboBox2.Text == "Risc Cardiovascular")
                                                    {
                                                        int rcvs;
                                                        rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                        otherlabel.Text = comboBox2.Text;
                                                        otherlistBox.Items.Add(rcvs);
                                                    }
                                                    if (ok2 == true)
                                                    {
                                                        foreach (DataRow row2 in dt2.Rows)
                                                        {
                                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                            {
                                                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["DZP"]);
                                                                }
                                                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["DZF"]);
                                                                }
                                                                if (comboBox2.Text == "Boala Cardiovasculara")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                }
                                                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                {
                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                    otherlistBox.Items.Add(row2["HAFam"]);
                                                                }
                                                                if (comboBox2.Text == "Dislipidemie")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                }
                                                                if (comboBox2.Text == "Obezitate")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["Obezitate"]);
                                                                }
                                                                if (comboBox2.Text == "Morti Subite")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                }
                                                                if (comboBox2.Text == "Ocupatie")
                                                                {
                                                                    otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                    otherlabel.Text = comboBox2.Text;
                                                                }
                                                                if (comboBox2.Text == "Diabet Gestational")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["DiabetG"]);
                                                                }
                                                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                }
                                                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                {
                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                    otherlistBox.Items.Add(row2["HAPers"]);
                                                                }
                                                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                {
                                                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                    otherlistBox.Items.Add(row2["IMAVC"]);
                                                                }
                                                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                }
                                                                if (comboBox2.Text == "Copil Macrosom")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                }
                                                            }
                                                        }
                                                    }
                                                    #endregion
                                                }
                                                else
                                                    if (from == 0 && Convert.ToInt32(row["Ca"]) <= to)
                                                    {
                                                        indicelistBox.Items.Add(row["Ca"]);
                                                        numelistBox.Items.Add(row["Nume"]);
                                                        datelistBox.Items.Add(row["Date"]);
                                                        ctr++;
                                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                        #region Alte valori
                                                        if (comboBox2.Text == "CNP")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["CNP"]);
                                                        }
                                                        if (comboBox2.Text == "Fumat")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            if (row["Fumat"].ToString() == "DA")
                                                                otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                            else
                                                                otherlistBox.Items.Add(row["Fumat"]);
                                                        }
                                                        if (comboBox2.Text == "Activitate Fizica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["ActFizica"]);
                                                        }
                                                        if (comboBox2.Text == "Masa Corporala")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["G"]);
                                                        }
                                                        if (comboBox2.Text == "Inaltime")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["H"]);
                                                        }
                                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["Ca"]);
                                                        }
                                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["TaSistolica"]);
                                                        }
                                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["TaDiastolica"]);
                                                        }
                                                        if (comboBox2.Text == "Glicemie")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["Glicemie"]);
                                                        }
                                                        if (comboBox2.Text == "HDL Colesterol")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["HDLCol"]);
                                                        }
                                                        if (comboBox2.Text == "LDL Colesterol")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["LDLCol"]);
                                                        }
                                                        if (comboBox2.Text == "Trigliceride")
                                                        {
                                                            otherlistBox.Items.Add(row["Tg"]);
                                                            otherlabel.Text = comboBox2.Text;
                                                        }
                                                        if (comboBox2.Text == "Indice de masa corporala")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                            imc = imcf.ToString();
                                                            imcf = (float)Convert.ToDouble(imc);
                                                            otherlistBox.Items.Add(imcf);
                                                        }
                                                        if (comboBox2.Text == "Varsta")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                        }
                                                        if (comboBox2.Text == "Risc Cardiovascular")
                                                        {
                                                            int rcvs;
                                                            rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(rcvs);
                                                        }
                                                        if (ok2 == true)
                                                        {
                                                            foreach (DataRow row2 in dt2.Rows)
                                                            {
                                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                {
                                                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["DZP"]);
                                                                    }
                                                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["DZF"]);
                                                                    }
                                                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                    }
                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                    {
                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                        otherlistBox.Items.Add(row2["HAFam"]);
                                                                    }
                                                                    if (comboBox2.Text == "Dislipidemie")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                    }
                                                                    if (comboBox2.Text == "Obezitate")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["Obezitate"]);
                                                                    }
                                                                    if (comboBox2.Text == "Morti Subite")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                    }
                                                                    if (comboBox2.Text == "Ocupatie")
                                                                    {
                                                                        otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                        otherlabel.Text = comboBox2.Text;
                                                                    }
                                                                    if (comboBox2.Text == "Diabet Gestational")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["DiabetG"]);
                                                                    }
                                                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                    }
                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                    {
                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                        otherlistBox.Items.Add(row2["HAPers"]);
                                                                    }
                                                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                    {
                                                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                        otherlistBox.Items.Add(row2["IMAVC"]);
                                                                    }
                                                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                    }
                                                                    if (comboBox2.Text == "Copil Macrosom")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                    }
                                                                }
                                                            }
                                                        }
                                                        #endregion
                                                    }
                                                    else
                                                        if (from == 0 && to == 0)
                                                        {

                                                            indicelistBox.Items.Add(row["Ca"]);
                                                            numelistBox.Items.Add(row["Nume"]);
                                                            datelistBox.Items.Add(row["Date"]);
                                                            ctr++;
                                                            paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                            #region Alte valori
                                                            if (comboBox2.Text == "CNP")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["CNP"]);
                                                            }
                                                            if (comboBox2.Text == "Fumat")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                if (row["Fumat"].ToString() == "DA")
                                                                    otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                else
                                                                    otherlistBox.Items.Add(row["Fumat"]);
                                                            }
                                                            if (comboBox2.Text == "Activitate Fizica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["ActFizica"]);
                                                            }
                                                            if (comboBox2.Text == "Masa Corporala")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["G"]);
                                                            }
                                                            if (comboBox2.Text == "Inaltime")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["H"]);
                                                            }
                                                            if (comboBox2.Text == "Circumferinta Abdominala")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["Ca"]);
                                                            }
                                                            if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["TaSistolica"]);
                                                            }
                                                            if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["TaDiastolica"]);
                                                            }
                                                            if (comboBox2.Text == "Glicemie")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["Glicemie"]);
                                                            }
                                                            if (comboBox2.Text == "HDL Colesterol")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["HDLCol"]);
                                                            }
                                                            if (comboBox2.Text == "LDL Colesterol")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["LDLCol"]);
                                                            }
                                                            if (comboBox2.Text == "Trigliceride")
                                                            {
                                                                otherlistBox.Items.Add(row["Tg"]);
                                                                otherlabel.Text = comboBox2.Text;
                                                            }
                                                            if (comboBox2.Text == "Indice de masa corporala")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                imc = imcf.ToString();
                                                                imcf = (float)Convert.ToDouble(imc);
                                                                otherlistBox.Items.Add(imcf);
                                                            }
                                                            if (comboBox2.Text == "Varsta")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                            }
                                                            if (comboBox2.Text == "Risc Cardiovascular")
                                                            {
                                                                int rcvs;
                                                                rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(rcvs);
                                                            }
                                                            if (ok2 == true)
                                                            {
                                                                foreach (DataRow row2 in dt2.Rows)
                                                                {
                                                                    if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                    {
                                                                        if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["DZP"]);
                                                                        }
                                                                        if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["DZF"]);
                                                                        }
                                                                        if (comboBox2.Text == "Boala Cardiovasculara")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                        }
                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                        {
                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                            otherlistBox.Items.Add(row2["HAFam"]);
                                                                        }
                                                                        if (comboBox2.Text == "Dislipidemie")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                        }
                                                                        if (comboBox2.Text == "Obezitate")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["Obezitate"]);
                                                                        }
                                                                        if (comboBox2.Text == "Morti Subite")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                        }
                                                                        if (comboBox2.Text == "Ocupatie")
                                                                        {
                                                                            otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                            otherlabel.Text = comboBox2.Text;
                                                                        }
                                                                        if (comboBox2.Text == "Diabet Gestational")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["DiabetG"]);
                                                                        }
                                                                        if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                        }
                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                        {
                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                            otherlistBox.Items.Add(row2["HAPers"]);
                                                                        }
                                                                        if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                        {
                                                                            otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                            otherlistBox.Items.Add(row2["IMAVC"]);
                                                                        }
                                                                        if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                        }
                                                                        if (comboBox2.Text == "Copil Macrosom")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                            #endregion
                                                        }

                                            }
                                            ctr = 0;
                                        }
                                        else
                                            if (controlcomboBox.Text == "Tensiune Arteriala Diastolica")
                                            {
                                                numelistBox.Items.Clear();
                                                datelistBox.Items.Clear();
                                                indicelistBox.Items.Clear();
                                                otherlistBox.Items.Clear();
                                                valoarelabel.Text = controlcomboBox.Text;
                                                foreach (DataRow row in dt.Rows)
                                                {
                                                    if (Convert.ToInt32(row["TaDiastolica"]) >= from && Convert.ToInt32(row["TaDiastolica"]) <= to)
                                                    {
                                                        indicelistBox.Items.Add(row["TaDiastolica"]);
                                                        numelistBox.Items.Add(row["Nume"]);
                                                        datelistBox.Items.Add(row["Date"]);
                                                        ctr++;
                                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                        #region Alte valori
                                                        if (comboBox2.Text == "CNP")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["CNP"]);
                                                        }
                                                        if (comboBox2.Text == "Fumat")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            if (row["Fumat"].ToString() == "DA")
                                                                otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                            else
                                                                otherlistBox.Items.Add(row["Fumat"]);
                                                        }
                                                        if (comboBox2.Text == "Activitate Fizica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["ActFizica"]);
                                                        }
                                                        if (comboBox2.Text == "Masa Corporala")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["G"]);
                                                        }
                                                        if (comboBox2.Text == "Inaltime")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["H"]);
                                                        }
                                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["Ca"]);
                                                        }
                                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["TaSistolica"]);
                                                        }
                                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["TaDiastolica"]);
                                                        }
                                                        if (comboBox2.Text == "Glicemie")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["Glicemie"]);
                                                        }
                                                        if (comboBox2.Text == "HDL Colesterol")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["HDLCol"]);
                                                        }
                                                        if (comboBox2.Text == "LDL Colesterol")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(row["LDLCol"]);
                                                        }
                                                        if (comboBox2.Text == "Trigliceride")
                                                        {
                                                            otherlistBox.Items.Add(row["Tg"]);
                                                            otherlabel.Text = comboBox2.Text;
                                                        }
                                                        if (comboBox2.Text == "Indice de masa corporala")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                            imc = imcf.ToString();
                                                            imcf = (float)Convert.ToDouble(imc);
                                                            otherlistBox.Items.Add(imcf);
                                                        }
                                                        if (comboBox2.Text == "Varsta")
                                                        {
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                        }
                                                        if (comboBox2.Text == "Risc Cardiovascular")
                                                        {
                                                            int rcvs;
                                                            rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                            otherlabel.Text = comboBox2.Text;
                                                            otherlistBox.Items.Add(rcvs);
                                                        }
                                                        if (ok2 == true)
                                                        {
                                                            foreach (DataRow row2 in dt2.Rows)
                                                            {
                                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                {
                                                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["DZP"]);
                                                                    }
                                                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["DZF"]);
                                                                    }
                                                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                    }
                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                    {
                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                        otherlistBox.Items.Add(row2["HAFam"]);
                                                                    }
                                                                    if (comboBox2.Text == "Dislipidemie")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                    }
                                                                    if (comboBox2.Text == "Obezitate")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["Obezitate"]);
                                                                    }
                                                                    if (comboBox2.Text == "Morti Subite")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                    }
                                                                    if (comboBox2.Text == "Ocupatie")
                                                                    {
                                                                        otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                        otherlabel.Text = comboBox2.Text;
                                                                    }
                                                                    if (comboBox2.Text == "Diabet Gestational")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["DiabetG"]);
                                                                    }
                                                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                    }
                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                    {
                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                        otherlistBox.Items.Add(row2["HAPers"]);
                                                                    }
                                                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                    {
                                                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                        otherlistBox.Items.Add(row2["IMAVC"]);
                                                                    }
                                                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                    }
                                                                    if (comboBox2.Text == "Copil Macrosom")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                    }
                                                                }
                                                            }
                                                        }
                                                        #endregion
                                                    }
                                                    else
                                                        if (from == 0 && Convert.ToInt32(row["TaDiastolica"]) <= to)
                                                        {
                                                            indicelistBox.Items.Add(row["TaDiastolica"]);
                                                            numelistBox.Items.Add(row["Nume"]);
                                                            datelistBox.Items.Add(row["Date"]);
                                                            ctr++;
                                                            paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                            #region Alte valori
                                                            if (comboBox2.Text == "CNP")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["CNP"]);
                                                            }
                                                            if (comboBox2.Text == "Fumat")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                if (row["Fumat"].ToString() == "DA")
                                                                    otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                else
                                                                    otherlistBox.Items.Add(row["Fumat"]);
                                                            }
                                                            if (comboBox2.Text == "Activitate Fizica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["ActFizica"]);
                                                            }
                                                            if (comboBox2.Text == "Masa Corporala")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["G"]);
                                                            }
                                                            if (comboBox2.Text == "Inaltime")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["H"]);
                                                            }
                                                            if (comboBox2.Text == "Circumferinta Abdominala")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["Ca"]);
                                                            }
                                                            if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["TaSistolica"]);
                                                            }
                                                            if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["TaDiastolica"]);
                                                            }
                                                            if (comboBox2.Text == "Glicemie")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["Glicemie"]);
                                                            }
                                                            if (comboBox2.Text == "HDL Colesterol")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["HDLCol"]);
                                                            }
                                                            if (comboBox2.Text == "LDL Colesterol")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["LDLCol"]);
                                                            }
                                                            if (comboBox2.Text == "Trigliceride")
                                                            {
                                                                otherlistBox.Items.Add(row["Tg"]);
                                                                otherlabel.Text = comboBox2.Text;
                                                            }
                                                            if (comboBox2.Text == "Indice de masa corporala")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                imc = imcf.ToString();
                                                                imcf = (float)Convert.ToDouble(imc);
                                                                otherlistBox.Items.Add(imcf);
                                                            }
                                                            if (comboBox2.Text == "Varsta")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                            }
                                                            if (comboBox2.Text == "Risc Cardiovascular")
                                                            {
                                                                int rcvs;
                                                                rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(rcvs);
                                                            }
                                                            if (ok2 == true)
                                                            {
                                                                foreach (DataRow row2 in dt2.Rows)
                                                                {
                                                                    if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                    {
                                                                        if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["DZP"]);
                                                                        }
                                                                        if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["DZF"]);
                                                                        }
                                                                        if (comboBox2.Text == "Boala Cardiovasculara")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                        }
                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                        {
                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                            otherlistBox.Items.Add(row2["HAFam"]);
                                                                        }
                                                                        if (comboBox2.Text == "Dislipidemie")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                        }
                                                                        if (comboBox2.Text == "Obezitate")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["Obezitate"]);
                                                                        }
                                                                        if (comboBox2.Text == "Morti Subite")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                        }
                                                                        if (comboBox2.Text == "Ocupatie")
                                                                        {
                                                                            otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                            otherlabel.Text = comboBox2.Text;
                                                                        }
                                                                        if (comboBox2.Text == "Diabet Gestational")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["DiabetG"]);
                                                                        }
                                                                        if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                        }
                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                        {
                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                            otherlistBox.Items.Add(row2["HAPers"]);
                                                                        }
                                                                        if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                        {
                                                                            otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                            otherlistBox.Items.Add(row2["IMAVC"]);
                                                                        }
                                                                        if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                        }
                                                                        if (comboBox2.Text == "Copil Macrosom")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                            #endregion
                                                        }
                                                        else
                                                            if (from == 0 && to == 0)
                                                            {

                                                                indicelistBox.Items.Add(row["TaDiastolica"]);
                                                                numelistBox.Items.Add(row["Nume"]);
                                                                datelistBox.Items.Add(row["Date"]);
                                                                ctr++;
                                                                paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                #region Alte valori
                                                                if (comboBox2.Text == "CNP")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["CNP"]);
                                                                }
                                                                if (comboBox2.Text == "Fumat")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    if (row["Fumat"].ToString() == "DA")
                                                                        otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                    else
                                                                        otherlistBox.Items.Add(row["Fumat"]);
                                                                }
                                                                if (comboBox2.Text == "Activitate Fizica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["ActFizica"]);
                                                                }
                                                                if (comboBox2.Text == "Masa Corporala")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["G"]);
                                                                }
                                                                if (comboBox2.Text == "Inaltime")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["H"]);
                                                                }
                                                                if (comboBox2.Text == "Circumferinta Abdominala")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["Ca"]);
                                                                }
                                                                if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["TaSistolica"]);
                                                                }
                                                                if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                }
                                                                if (comboBox2.Text == "Glicemie")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["Glicemie"]);
                                                                }
                                                                if (comboBox2.Text == "HDL Colesterol")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["HDLCol"]);
                                                                }
                                                                if (comboBox2.Text == "LDL Colesterol")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["LDLCol"]);
                                                                }
                                                                if (comboBox2.Text == "Trigliceride")
                                                                {
                                                                    otherlistBox.Items.Add(row["Tg"]);
                                                                    otherlabel.Text = comboBox2.Text;
                                                                }
                                                                if (comboBox2.Text == "Indice de masa corporala")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                    imc = imcf.ToString();
                                                                    imcf = (float)Convert.ToDouble(imc);
                                                                    otherlistBox.Items.Add(imcf);
                                                                }
                                                                if (comboBox2.Text == "Varsta")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                }
                                                                if (comboBox2.Text == "Risc Cardiovascular")
                                                                {
                                                                    int rcvs;
                                                                    rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(rcvs);
                                                                }
                                                                if (ok2 == true)
                                                                {
                                                                    foreach (DataRow row2 in dt2.Rows)
                                                                    {
                                                                        if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                        {
                                                                            if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["DZP"]);
                                                                            }
                                                                            if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["DZF"]);
                                                                            }
                                                                            if (comboBox2.Text == "Boala Cardiovasculara")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                            }
                                                                            if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                            {
                                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                otherlistBox.Items.Add(row2["HAFam"]);
                                                                            }
                                                                            if (comboBox2.Text == "Dislipidemie")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                            }
                                                                            if (comboBox2.Text == "Obezitate")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["Obezitate"]);
                                                                            }
                                                                            if (comboBox2.Text == "Morti Subite")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                            }
                                                                            if (comboBox2.Text == "Ocupatie")
                                                                            {
                                                                                otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                otherlabel.Text = comboBox2.Text;
                                                                            }
                                                                            if (comboBox2.Text == "Diabet Gestational")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["DiabetG"]);
                                                                            }
                                                                            if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                            }
                                                                            if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                            {
                                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                otherlistBox.Items.Add(row2["HAPers"]);
                                                                            }
                                                                            if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                            {
                                                                                otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                otherlistBox.Items.Add(row2["IMAVC"]);
                                                                            }
                                                                            if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                            }
                                                                            if (comboBox2.Text == "Copil Macrosom")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                                #endregion
                                                            }

                                                }
                                                ctr = 0;
                                            }
                                            else
                                                if (controlcomboBox.Text == "Glicemie")
                                                {
                                                    numelistBox.Items.Clear();
                                                    datelistBox.Items.Clear();
                                                    indicelistBox.Items.Clear();
                                                    otherlistBox.Items.Clear();
                                                    valoarelabel.Text = controlcomboBox.Text;
                                                    foreach (DataRow row in dt.Rows)
                                                    {
                                                        if (Convert.ToInt32(row["Glicemie"]) >= from && Convert.ToInt32(row["Glicemie"]) <= to)
                                                        {
                                                            indicelistBox.Items.Add(row["Glicemie"]);
                                                            numelistBox.Items.Add(row["Nume"]);
                                                            datelistBox.Items.Add(row["Date"]);
                                                            ctr++;
                                                            paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                            #region Alte valori
                                                            if (comboBox2.Text == "CNP")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["CNP"]);
                                                            }
                                                            if (comboBox2.Text == "Fumat")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                if (row["Fumat"].ToString() == "DA")
                                                                    otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                else
                                                                    otherlistBox.Items.Add(row["Fumat"]);
                                                            }
                                                            if (comboBox2.Text == "Activitate Fizica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["ActFizica"]);
                                                            }
                                                            if (comboBox2.Text == "Masa Corporala")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["G"]);
                                                            }
                                                            if (comboBox2.Text == "Inaltime")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["H"]);
                                                            }
                                                            if (comboBox2.Text == "Circumferinta Abdominala")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["Ca"]);
                                                            }
                                                            if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["TaSistolica"]);
                                                            }
                                                            if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["TaDiastolica"]);
                                                            }
                                                            if (comboBox2.Text == "Glicemie")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["Glicemie"]);
                                                            }
                                                            if (comboBox2.Text == "HDL Colesterol")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["HDLCol"]);
                                                            }
                                                            if (comboBox2.Text == "LDL Colesterol")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(row["LDLCol"]);
                                                            }
                                                            if (comboBox2.Text == "Trigliceride")
                                                            {
                                                                otherlistBox.Items.Add(row["Tg"]);
                                                                otherlabel.Text = comboBox2.Text;
                                                            }
                                                            if (comboBox2.Text == "Indice de masa corporala")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                imc = imcf.ToString();
                                                                imcf = (float)Convert.ToDouble(imc);
                                                                otherlistBox.Items.Add(imcf);
                                                            }
                                                            if (comboBox2.Text == "Varsta")
                                                            {
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                            }
                                                            if (comboBox2.Text == "Risc Cardiovascular")
                                                            {
                                                                int rcvs;
                                                                rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                otherlabel.Text = comboBox2.Text;
                                                                otherlistBox.Items.Add(rcvs);
                                                            }
                                                            if (ok2 == true)
                                                            {
                                                                foreach (DataRow row2 in dt2.Rows)
                                                                {
                                                                    if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                    {
                                                                        if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["DZP"]);
                                                                        }
                                                                        if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["DZF"]);
                                                                        }
                                                                        if (comboBox2.Text == "Boala Cardiovasculara")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                        }
                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                        {
                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                            otherlistBox.Items.Add(row2["HAFam"]);
                                                                        }
                                                                        if (comboBox2.Text == "Dislipidemie")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                        }
                                                                        if (comboBox2.Text == "Obezitate")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["Obezitate"]);
                                                                        }
                                                                        if (comboBox2.Text == "Morti Subite")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                        }
                                                                        if (comboBox2.Text == "Ocupatie")
                                                                        {
                                                                            otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                            otherlabel.Text = comboBox2.Text;
                                                                        }
                                                                        if (comboBox2.Text == "Diabet Gestational")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["DiabetG"]);
                                                                        }
                                                                        if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                        }
                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                        {
                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                            otherlistBox.Items.Add(row2["HAPers"]);
                                                                        }
                                                                        if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                        {
                                                                            otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                            otherlistBox.Items.Add(row2["IMAVC"]);
                                                                        }
                                                                        if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                        }
                                                                        if (comboBox2.Text == "Copil Macrosom")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                            #endregion
                                                        }
                                                        else
                                                            if (from == 0 && Convert.ToInt32(row["Glicemie"]) <= to)
                                                            {
                                                                indicelistBox.Items.Add(row["Glicemie"]);
                                                                numelistBox.Items.Add(row["Nume"]);
                                                                datelistBox.Items.Add(row["Date"]);
                                                                ctr++;
                                                                paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                #region Alte valori
                                                                if (comboBox2.Text == "CNP")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["CNP"]);
                                                                }
                                                                if (comboBox2.Text == "Fumat")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    if (row["Fumat"].ToString() == "DA")
                                                                        otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                    else
                                                                        otherlistBox.Items.Add(row["Fumat"]);
                                                                }
                                                                if (comboBox2.Text == "Activitate Fizica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["ActFizica"]);
                                                                }
                                                                if (comboBox2.Text == "Masa Corporala")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["G"]);
                                                                }
                                                                if (comboBox2.Text == "Inaltime")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["H"]);
                                                                }
                                                                if (comboBox2.Text == "Circumferinta Abdominala")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["Ca"]);
                                                                }
                                                                if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["TaSistolica"]);
                                                                }
                                                                if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                }
                                                                if (comboBox2.Text == "Glicemie")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["Glicemie"]);
                                                                }
                                                                if (comboBox2.Text == "HDL Colesterol")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["HDLCol"]);
                                                                }
                                                                if (comboBox2.Text == "LDL Colesterol")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["LDLCol"]);
                                                                }
                                                                if (comboBox2.Text == "Trigliceride")
                                                                {
                                                                    otherlistBox.Items.Add(row["Tg"]);
                                                                    otherlabel.Text = comboBox2.Text;
                                                                }
                                                                if (comboBox2.Text == "Indice de masa corporala")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                    imc = imcf.ToString();
                                                                    imcf = (float)Convert.ToDouble(imc);
                                                                    otherlistBox.Items.Add(imcf);
                                                                }
                                                                if (comboBox2.Text == "Varsta")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                }
                                                                if (comboBox2.Text == "Risc Cardiovascular")
                                                                {
                                                                    int rcvs;
                                                                    rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(rcvs);
                                                                }
                                                                if (ok2 == true)
                                                                {
                                                                    foreach (DataRow row2 in dt2.Rows)
                                                                    {
                                                                        if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                        {
                                                                            if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["DZP"]);
                                                                            }
                                                                            if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["DZF"]);
                                                                            }
                                                                            if (comboBox2.Text == "Boala Cardiovasculara")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                            }
                                                                            if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                            {
                                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                otherlistBox.Items.Add(row2["HAFam"]);
                                                                            }
                                                                            if (comboBox2.Text == "Dislipidemie")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                            }
                                                                            if (comboBox2.Text == "Obezitate")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["Obezitate"]);
                                                                            }
                                                                            if (comboBox2.Text == "Morti Subite")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                            }
                                                                            if (comboBox2.Text == "Ocupatie")
                                                                            {
                                                                                otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                otherlabel.Text = comboBox2.Text;
                                                                            }
                                                                            if (comboBox2.Text == "Diabet Gestational")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["DiabetG"]);
                                                                            }
                                                                            if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                            }
                                                                            if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                            {
                                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                otherlistBox.Items.Add(row2["HAPers"]);
                                                                            }
                                                                            if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                            {
                                                                                otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                otherlistBox.Items.Add(row2["IMAVC"]);
                                                                            }
                                                                            if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                            }
                                                                            if (comboBox2.Text == "Copil Macrosom")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                                #endregion
                                                            }
                                                            else
                                                                if (from == 0 && to == 0)
                                                                {

                                                                    indicelistBox.Items.Add(row["Glicemie"]);
                                                                    numelistBox.Items.Add(row["Nume"]);
                                                                    datelistBox.Items.Add(row["Date"]);
                                                                    ctr++;
                                                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                    #region Alte valori
                                                                    if (comboBox2.Text == "CNP")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["CNP"]);
                                                                    }
                                                                    if (comboBox2.Text == "Fumat")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        if (row["Fumat"].ToString() == "DA")
                                                                            otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                        else
                                                                            otherlistBox.Items.Add(row["Fumat"]);
                                                                    }
                                                                    if (comboBox2.Text == "Activitate Fizica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["ActFizica"]);
                                                                    }
                                                                    if (comboBox2.Text == "Masa Corporala")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["G"]);
                                                                    }
                                                                    if (comboBox2.Text == "Inaltime")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["H"]);
                                                                    }
                                                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["Ca"]);
                                                                    }
                                                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["TaSistolica"]);
                                                                    }
                                                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                    }
                                                                    if (comboBox2.Text == "Glicemie")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["Glicemie"]);
                                                                    }
                                                                    if (comboBox2.Text == "HDL Colesterol")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["HDLCol"]);
                                                                    }
                                                                    if (comboBox2.Text == "LDL Colesterol")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["LDLCol"]);
                                                                    }
                                                                    if (comboBox2.Text == "Trigliceride")
                                                                    {
                                                                        otherlistBox.Items.Add(row["Tg"]);
                                                                        otherlabel.Text = comboBox2.Text;
                                                                    }
                                                                    if (comboBox2.Text == "Indice de masa corporala")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                        imc = imcf.ToString();
                                                                        imcf = (float)Convert.ToDouble(imc);
                                                                        otherlistBox.Items.Add(imcf);
                                                                    }
                                                                    if (comboBox2.Text == "Varsta")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                    }
                                                                    if (comboBox2.Text == "Risc Cardiovascular")
                                                                    {
                                                                        int rcvs;
                                                                        rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(rcvs);
                                                                    }
                                                                    if (ok2 == true)
                                                                    {
                                                                        foreach (DataRow row2 in dt2.Rows)
                                                                        {
                                                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                            {
                                                                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["DZP"]);
                                                                                }
                                                                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["DZF"]);
                                                                                }
                                                                                if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                                }
                                                                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                {
                                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                    otherlistBox.Items.Add(row2["HAFam"]);
                                                                                }
                                                                                if (comboBox2.Text == "Dislipidemie")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                                }
                                                                                if (comboBox2.Text == "Obezitate")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["Obezitate"]);
                                                                                }
                                                                                if (comboBox2.Text == "Morti Subite")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                                }
                                                                                if (comboBox2.Text == "Ocupatie")
                                                                                {
                                                                                    otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                }
                                                                                if (comboBox2.Text == "Diabet Gestational")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["DiabetG"]);
                                                                                }
                                                                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                                }
                                                                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                {
                                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                    otherlistBox.Items.Add(row2["HAPers"]);
                                                                                }
                                                                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                {
                                                                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                    otherlistBox.Items.Add(row2["IMAVC"]);
                                                                                }
                                                                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                                }
                                                                                if (comboBox2.Text == "Copil Macrosom")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                    #endregion
                                                                }

                                                    }
                                                    ctr = 0;
                                                }
                                                else
                                                    if (controlcomboBox.Text == "HDL Colesterol")
                                                    {
                                                        numelistBox.Items.Clear();
                                                        datelistBox.Items.Clear();
                                                        indicelistBox.Items.Clear();
                                                        otherlistBox.Items.Clear();
                                                        valoarelabel.Text = controlcomboBox.Text;
                                                        foreach (DataRow row in dt.Rows)
                                                        {
                                                            if (Convert.ToInt32(row["HDLCol"]) >= from && Convert.ToInt32(row["HDLCol"]) <= to)
                                                            {
                                                                indicelistBox.Items.Add(row["HDLCol"]);
                                                                numelistBox.Items.Add(row["Nume"]);
                                                                datelistBox.Items.Add(row["Date"]);
                                                                ctr++;
                                                                paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                #region Alte valori
                                                                if (comboBox2.Text == "CNP")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["CNP"]);
                                                                }
                                                                if (comboBox2.Text == "Fumat")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    if (row["Fumat"].ToString() == "DA")
                                                                        otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                    else
                                                                        otherlistBox.Items.Add(row["Fumat"]);
                                                                }
                                                                if (comboBox2.Text == "Activitate Fizica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["ActFizica"]);
                                                                }
                                                                if (comboBox2.Text == "Masa Corporala")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["G"]);
                                                                }
                                                                if (comboBox2.Text == "Inaltime")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["H"]);
                                                                }
                                                                if (comboBox2.Text == "Circumferinta Abdominala")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["Ca"]);
                                                                }
                                                                if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["TaSistolica"]);
                                                                }
                                                                if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                }
                                                                if (comboBox2.Text == "Glicemie")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["Glicemie"]);
                                                                }
                                                                if (comboBox2.Text == "HDL Colesterol")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["HDLCol"]);
                                                                }
                                                                if (comboBox2.Text == "LDL Colesterol")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(row["LDLCol"]);
                                                                }
                                                                if (comboBox2.Text == "Trigliceride")
                                                                {
                                                                    otherlistBox.Items.Add(row["Tg"]);
                                                                    otherlabel.Text = comboBox2.Text;
                                                                }
                                                                if (comboBox2.Text == "Indice de masa corporala")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                    imc = imcf.ToString();
                                                                    imcf = (float)Convert.ToDouble(imc);
                                                                    otherlistBox.Items.Add(imcf);
                                                                }
                                                                if (comboBox2.Text == "Varsta")
                                                                {
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                }
                                                                if (comboBox2.Text == "Risc Cardiovascular")
                                                                {
                                                                    int rcvs;
                                                                    rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                    otherlabel.Text = comboBox2.Text;
                                                                    otherlistBox.Items.Add(rcvs);
                                                                }
                                                                if (ok2 == true)
                                                                {
                                                                    foreach (DataRow row2 in dt2.Rows)
                                                                    {
                                                                        if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                        {
                                                                            if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["DZP"]);
                                                                            }
                                                                            if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["DZF"]);
                                                                            }
                                                                            if (comboBox2.Text == "Boala Cardiovasculara")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                            }
                                                                            if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                            {
                                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                otherlistBox.Items.Add(row2["HAFam"]);
                                                                            }
                                                                            if (comboBox2.Text == "Dislipidemie")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                            }
                                                                            if (comboBox2.Text == "Obezitate")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["Obezitate"]);
                                                                            }
                                                                            if (comboBox2.Text == "Morti Subite")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                            }
                                                                            if (comboBox2.Text == "Ocupatie")
                                                                            {
                                                                                otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                otherlabel.Text = comboBox2.Text;
                                                                            }
                                                                            if (comboBox2.Text == "Diabet Gestational")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["DiabetG"]);
                                                                            }
                                                                            if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                            }
                                                                            if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                            {
                                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                otherlistBox.Items.Add(row2["HAPers"]);
                                                                            }
                                                                            if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                            {
                                                                                otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                otherlistBox.Items.Add(row2["IMAVC"]);
                                                                            }
                                                                            if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                            }
                                                                            if (comboBox2.Text == "Copil Macrosom")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                                #endregion
                                                            }
                                                            else
                                                                if (from == 0 && Convert.ToInt32(row["HDLCol"]) <= to)
                                                                {
                                                                    indicelistBox.Items.Add(row["HDLCol"]);
                                                                    numelistBox.Items.Add(row["Nume"]);
                                                                    datelistBox.Items.Add(row["Date"]);
                                                                    ctr++;
                                                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                    #region Alte valori
                                                                    if (comboBox2.Text == "CNP")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["CNP"]);
                                                                    }
                                                                    if (comboBox2.Text == "Fumat")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        if (row["Fumat"].ToString() == "DA")
                                                                            otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                        else
                                                                            otherlistBox.Items.Add(row["Fumat"]);
                                                                    }
                                                                    if (comboBox2.Text == "Activitate Fizica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["ActFizica"]);
                                                                    }
                                                                    if (comboBox2.Text == "Masa Corporala")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["G"]);
                                                                    }
                                                                    if (comboBox2.Text == "Inaltime")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["H"]);
                                                                    }
                                                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["Ca"]);
                                                                    }
                                                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["TaSistolica"]);
                                                                    }
                                                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                    }
                                                                    if (comboBox2.Text == "Glicemie")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["Glicemie"]);
                                                                    }
                                                                    if (comboBox2.Text == "HDL Colesterol")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["HDLCol"]);
                                                                    }
                                                                    if (comboBox2.Text == "LDL Colesterol")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["LDLCol"]);
                                                                    }
                                                                    if (comboBox2.Text == "Trigliceride")
                                                                    {
                                                                        otherlistBox.Items.Add(row["Tg"]);
                                                                        otherlabel.Text = comboBox2.Text;
                                                                    }
                                                                    if (comboBox2.Text == "Indice de masa corporala")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                        imc = imcf.ToString();
                                                                        imcf = (float)Convert.ToDouble(imc);
                                                                        otherlistBox.Items.Add(imcf);
                                                                    }
                                                                    if (comboBox2.Text == "Varsta")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                    }
                                                                    if (comboBox2.Text == "Risc Cardiovascular")
                                                                    {
                                                                        int rcvs;
                                                                        rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(rcvs);
                                                                    }
                                                                    if (ok2 == true)
                                                                    {
                                                                        foreach (DataRow row2 in dt2.Rows)
                                                                        {
                                                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                            {
                                                                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["DZP"]);
                                                                                }
                                                                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["DZF"]);
                                                                                }
                                                                                if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                                }
                                                                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                {
                                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                    otherlistBox.Items.Add(row2["HAFam"]);
                                                                                }
                                                                                if (comboBox2.Text == "Dislipidemie")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                                }
                                                                                if (comboBox2.Text == "Obezitate")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["Obezitate"]);
                                                                                }
                                                                                if (comboBox2.Text == "Morti Subite")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                                }
                                                                                if (comboBox2.Text == "Ocupatie")
                                                                                {
                                                                                    otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                }
                                                                                if (comboBox2.Text == "Diabet Gestational")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["DiabetG"]);
                                                                                }
                                                                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                                }
                                                                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                {
                                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                    otherlistBox.Items.Add(row2["HAPers"]);
                                                                                }
                                                                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                {
                                                                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                    otherlistBox.Items.Add(row2["IMAVC"]);
                                                                                }
                                                                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                                }
                                                                                if (comboBox2.Text == "Copil Macrosom")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                    #endregion
                                                                }
                                                                else
                                                                    if (from == 0 && to == 0)
                                                                    {

                                                                        indicelistBox.Items.Add(row["HDLCol"]);
                                                                        numelistBox.Items.Add(row["Nume"]);
                                                                        datelistBox.Items.Add(row["Date"]);
                                                                        ctr++;
                                                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                        #region Alte valori
                                                                        if (comboBox2.Text == "CNP")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["CNP"]);
                                                                        }
                                                                        if (comboBox2.Text == "Fumat")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            if (row["Fumat"].ToString() == "DA")
                                                                                otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                            else
                                                                                otherlistBox.Items.Add(row["Fumat"]);
                                                                        }
                                                                        if (comboBox2.Text == "Activitate Fizica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["ActFizica"]);
                                                                        }
                                                                        if (comboBox2.Text == "Masa Corporala")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["G"]);
                                                                        }
                                                                        if (comboBox2.Text == "Inaltime")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["H"]);
                                                                        }
                                                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["Ca"]);
                                                                        }
                                                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["TaSistolica"]);
                                                                        }
                                                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                        }
                                                                        if (comboBox2.Text == "Glicemie")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["Glicemie"]);
                                                                        }
                                                                        if (comboBox2.Text == "HDL Colesterol")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["HDLCol"]);
                                                                        }
                                                                        if (comboBox2.Text == "LDL Colesterol")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["LDLCol"]);
                                                                        }
                                                                        if (comboBox2.Text == "Trigliceride")
                                                                        {
                                                                            otherlistBox.Items.Add(row["Tg"]);
                                                                            otherlabel.Text = comboBox2.Text;
                                                                        }
                                                                        if (comboBox2.Text == "Indice de masa corporala")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                            imc = imcf.ToString();
                                                                            imcf = (float)Convert.ToDouble(imc);
                                                                            otherlistBox.Items.Add(imcf);
                                                                        }
                                                                        if (comboBox2.Text == "Varsta")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                        }
                                                                        if (comboBox2.Text == "Risc Cardiovascular")
                                                                        {
                                                                            int rcvs;
                                                                            rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(rcvs);
                                                                        }
                                                                        if (ok2 == true)
                                                                        {
                                                                            foreach (DataRow row2 in dt2.Rows)
                                                                            {
                                                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                {
                                                                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["DZP"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["DZF"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                    {
                                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                        otherlistBox.Items.Add(row2["HAFam"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Dislipidemie")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Obezitate")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["Obezitate"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Morti Subite")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Ocupatie")
                                                                                    {
                                                                                        otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                    }
                                                                                    if (comboBox2.Text == "Diabet Gestational")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["DiabetG"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                    {
                                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                        otherlistBox.Items.Add(row2["HAPers"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                    {
                                                                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                        otherlistBox.Items.Add(row2["IMAVC"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Copil Macrosom")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                        #endregion
                                                                    }
                                                        }
                                                        ctr = 0;
                                                    }
                                                    else
                                                        if (controlcomboBox.Text == "LDL Colesterol")
                                                        {
                                                            numelistBox.Items.Clear();
                                                            datelistBox.Items.Clear();
                                                            indicelistBox.Items.Clear();
                                                            otherlistBox.Items.Clear();
                                                            valoarelabel.Text = controlcomboBox.Text;
                                                            foreach (DataRow row in dt.Rows)
                                                            {
                                                                if (Convert.ToInt32(row["LDLCol"]) >= from && Convert.ToInt32(row["LDLCol"]) <= to)
                                                                {
                                                                    indicelistBox.Items.Add(row["LDLCol"]);
                                                                    numelistBox.Items.Add(row["Nume"]);
                                                                    datelistBox.Items.Add(row["Date"]);
                                                                    ctr++;
                                                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                    #region Alte valori
                                                                    if (comboBox2.Text == "CNP")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["CNP"]);
                                                                    }
                                                                    if (comboBox2.Text == "Fumat")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        if (row["Fumat"].ToString() == "DA")
                                                                            otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                        else
                                                                            otherlistBox.Items.Add(row["Fumat"]);
                                                                    }
                                                                    if (comboBox2.Text == "Activitate Fizica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["ActFizica"]);
                                                                    }
                                                                    if (comboBox2.Text == "Masa Corporala")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["G"]);
                                                                    }
                                                                    if (comboBox2.Text == "Inaltime")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["H"]);
                                                                    }
                                                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["Ca"]);
                                                                    }
                                                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["TaSistolica"]);
                                                                    }
                                                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                    }
                                                                    if (comboBox2.Text == "Glicemie")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["Glicemie"]);
                                                                    }
                                                                    if (comboBox2.Text == "HDL Colesterol")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["HDLCol"]);
                                                                    }
                                                                    if (comboBox2.Text == "LDL Colesterol")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(row["LDLCol"]);
                                                                    }
                                                                    if (comboBox2.Text == "Trigliceride")
                                                                    {
                                                                        otherlistBox.Items.Add(row["Tg"]);
                                                                        otherlabel.Text = comboBox2.Text;
                                                                    }
                                                                    if (comboBox2.Text == "Indice de masa corporala")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                        imc = imcf.ToString();
                                                                        imcf = (float)Convert.ToDouble(imc);
                                                                        otherlistBox.Items.Add(imcf);
                                                                    }
                                                                    if (comboBox2.Text == "Varsta")
                                                                    {
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                    }
                                                                    if (comboBox2.Text == "Risc Cardiovascular")
                                                                    {
                                                                        int rcvs;
                                                                        rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                        otherlabel.Text = comboBox2.Text;
                                                                        otherlistBox.Items.Add(rcvs);
                                                                    }
                                                                    if (ok2 == true)
                                                                    {
                                                                        foreach (DataRow row2 in dt2.Rows)
                                                                        {
                                                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                            {
                                                                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["DZP"]);
                                                                                }
                                                                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["DZF"]);
                                                                                }
                                                                                if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                                }
                                                                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                {
                                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                    otherlistBox.Items.Add(row2["HAFam"]);
                                                                                }
                                                                                if (comboBox2.Text == "Dislipidemie")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                                }
                                                                                if (comboBox2.Text == "Obezitate")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["Obezitate"]);
                                                                                }
                                                                                if (comboBox2.Text == "Morti Subite")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                                }
                                                                                if (comboBox2.Text == "Ocupatie")
                                                                                {
                                                                                    otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                }
                                                                                if (comboBox2.Text == "Diabet Gestational")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["DiabetG"]);
                                                                                }
                                                                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                                }
                                                                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                {
                                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                    otherlistBox.Items.Add(row2["HAPers"]);
                                                                                }
                                                                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                {
                                                                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                    otherlistBox.Items.Add(row2["IMAVC"]);
                                                                                }
                                                                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                                }
                                                                                if (comboBox2.Text == "Copil Macrosom")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                    #endregion
                                                                }
                                                                else
                                                                    if (from == 0 && Convert.ToInt32(row["LDLCol"]) <= to)
                                                                    {
                                                                        indicelistBox.Items.Add(row["LDLCol"]);
                                                                        numelistBox.Items.Add(row["Nume"]);
                                                                        datelistBox.Items.Add(row["Date"]);
                                                                        ctr++;
                                                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                        #region Alte valori
                                                                        if (comboBox2.Text == "CNP")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["CNP"]);
                                                                        }
                                                                        if (comboBox2.Text == "Fumat")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            if (row["Fumat"].ToString() == "DA")
                                                                                otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                            else
                                                                                otherlistBox.Items.Add(row["Fumat"]);
                                                                        }
                                                                        if (comboBox2.Text == "Activitate Fizica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["ActFizica"]);
                                                                        }
                                                                        if (comboBox2.Text == "Masa Corporala")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["G"]);
                                                                        }
                                                                        if (comboBox2.Text == "Inaltime")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["H"]);
                                                                        }
                                                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["Ca"]);
                                                                        }
                                                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["TaSistolica"]);
                                                                        }
                                                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                        }
                                                                        if (comboBox2.Text == "Glicemie")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["Glicemie"]);
                                                                        }
                                                                        if (comboBox2.Text == "HDL Colesterol")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["HDLCol"]);
                                                                        }
                                                                        if (comboBox2.Text == "LDL Colesterol")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["LDLCol"]);
                                                                        }
                                                                        if (comboBox2.Text == "Trigliceride")
                                                                        {
                                                                            otherlistBox.Items.Add(row["Tg"]);
                                                                            otherlabel.Text = comboBox2.Text;
                                                                        }
                                                                        if (comboBox2.Text == "Indice de masa corporala")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                            imc = imcf.ToString();
                                                                            imcf = (float)Convert.ToDouble(imc);
                                                                            otherlistBox.Items.Add(imcf);
                                                                        }
                                                                        if (comboBox2.Text == "Varsta")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                        }
                                                                        if (comboBox2.Text == "Risc Cardiovascular")
                                                                        {
                                                                            int rcvs;
                                                                            rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(rcvs);
                                                                        }
                                                                        if (ok2 == true)
                                                                        {
                                                                            foreach (DataRow row2 in dt2.Rows)
                                                                            {
                                                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                {
                                                                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["DZP"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["DZF"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                    {
                                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                        otherlistBox.Items.Add(row2["HAFam"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Dislipidemie")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Obezitate")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["Obezitate"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Morti Subite")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Ocupatie")
                                                                                    {
                                                                                        otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                    }
                                                                                    if (comboBox2.Text == "Diabet Gestational")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["DiabetG"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                    {
                                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                        otherlistBox.Items.Add(row2["HAPers"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                    {
                                                                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                        otherlistBox.Items.Add(row2["IMAVC"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Copil Macrosom")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                        #endregion
                                                                    }
                                                                    else
                                                                        if (from == 0 && to == 0)
                                                                        {

                                                                            indicelistBox.Items.Add(row["LDLCol"]);
                                                                            numelistBox.Items.Add(row["Nume"]);
                                                                            datelistBox.Items.Add(row["Date"]);
                                                                            ctr++;
                                                                            paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                            #region Alte valori
                                                                            if (comboBox2.Text == "CNP")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["CNP"]);
                                                                            }
                                                                            if (comboBox2.Text == "Fumat")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                if (row["Fumat"].ToString() == "DA")
                                                                                    otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                                else
                                                                                    otherlistBox.Items.Add(row["Fumat"]);
                                                                            }
                                                                            if (comboBox2.Text == "Activitate Fizica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["ActFizica"]);
                                                                            }
                                                                            if (comboBox2.Text == "Masa Corporala")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["G"]);
                                                                            }
                                                                            if (comboBox2.Text == "Inaltime")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["H"]);
                                                                            }
                                                                            if (comboBox2.Text == "Circumferinta Abdominala")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["Ca"]);
                                                                            }
                                                                            if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["TaSistolica"]);
                                                                            }
                                                                            if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                            }
                                                                            if (comboBox2.Text == "Glicemie")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["Glicemie"]);
                                                                            }
                                                                            if (comboBox2.Text == "HDL Colesterol")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["HDLCol"]);
                                                                            }
                                                                            if (comboBox2.Text == "LDL Colesterol")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["LDLCol"]);
                                                                            }
                                                                            if (comboBox2.Text == "Trigliceride")
                                                                            {
                                                                                otherlistBox.Items.Add(row["Tg"]);
                                                                                otherlabel.Text = comboBox2.Text;
                                                                            }
                                                                            if (comboBox2.Text == "Indice de masa corporala")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                                imc = imcf.ToString();
                                                                                imcf = (float)Convert.ToDouble(imc);
                                                                                otherlistBox.Items.Add(imcf);
                                                                            }
                                                                            if (comboBox2.Text == "Varsta")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                            }
                                                                            if (comboBox2.Text == "Risc Cardiovascular")
                                                                            {
                                                                                int rcvs;
                                                                                rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(rcvs);
                                                                            }
                                                                            if (ok2 == true)
                                                                            {
                                                                                foreach (DataRow row2 in dt2.Rows)
                                                                                {
                                                                                    if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                    {
                                                                                        if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["DZP"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["DZF"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                        {
                                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                            otherlistBox.Items.Add(row2["HAFam"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Dislipidemie")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Obezitate")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["Obezitate"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Morti Subite")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Ocupatie")
                                                                                        {
                                                                                            otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                        }
                                                                                        if (comboBox2.Text == "Diabet Gestational")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["DiabetG"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                        {
                                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                            otherlistBox.Items.Add(row2["HAPers"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                        {
                                                                                            otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                            otherlistBox.Items.Add(row2["IMAVC"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Copil Macrosom")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                            #endregion
                                                                        }
                                                            }
                                                            ctr = 0;
                                                        }
                                                        else
                                                            if (controlcomboBox.Text == "Trigliceride")
                                                            {
                                                                numelistBox.Items.Clear();
                                                                datelistBox.Items.Clear();
                                                                indicelistBox.Items.Clear();
                                                                otherlistBox.Items.Clear();
                                                                valoarelabel.Text = controlcomboBox.Text;
                                                                foreach (DataRow row in dt.Rows)
                                                                {
                                                                    if (Convert.ToInt32(row["Tg"]) >= from && Convert.ToInt32(row["Tg"]) <= to)
                                                                    {
                                                                        indicelistBox.Items.Add(row["Tg"]);
                                                                        numelistBox.Items.Add(row["Nume"]);
                                                                        datelistBox.Items.Add(row["Date"]);
                                                                        ctr++;
                                                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                        #region Alte valori
                                                                        if (comboBox2.Text == "CNP")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["CNP"]);
                                                                        }
                                                                        if (comboBox2.Text == "Fumat")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            if (row["Fumat"].ToString() == "DA")
                                                                                otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                            else
                                                                                otherlistBox.Items.Add(row["Fumat"]);
                                                                        }
                                                                        if (comboBox2.Text == "Activitate Fizica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["ActFizica"]);
                                                                        }
                                                                        if (comboBox2.Text == "Masa Corporala")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["G"]);
                                                                        }
                                                                        if (comboBox2.Text == "Inaltime")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["H"]);
                                                                        }
                                                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["Ca"]);
                                                                        }
                                                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["TaSistolica"]);
                                                                        }
                                                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                        }
                                                                        if (comboBox2.Text == "Glicemie")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["Glicemie"]);
                                                                        }
                                                                        if (comboBox2.Text == "HDL Colesterol")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["HDLCol"]);
                                                                        }
                                                                        if (comboBox2.Text == "LDL Colesterol")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(row["LDLCol"]);
                                                                        }
                                                                        if (comboBox2.Text == "Trigliceride")
                                                                        {
                                                                            otherlistBox.Items.Add(row["Tg"]);
                                                                            otherlabel.Text = comboBox2.Text;
                                                                        }
                                                                        if (comboBox2.Text == "Indice de masa corporala")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                            imc = imcf.ToString();
                                                                            imcf = (float)Convert.ToDouble(imc);
                                                                            otherlistBox.Items.Add(imcf);
                                                                        }
                                                                        if (comboBox2.Text == "Varsta")
                                                                        {
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                        }
                                                                        if (comboBox2.Text == "Risc Cardiovascular")
                                                                        {
                                                                            int rcvs;
                                                                            rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                            otherlabel.Text = comboBox2.Text;
                                                                            otherlistBox.Items.Add(rcvs);
                                                                        }
                                                                        if (ok2 == true)
                                                                        {
                                                                            foreach (DataRow row2 in dt2.Rows)
                                                                            {
                                                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                {
                                                                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["DZP"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["DZF"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                    {
                                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                        otherlistBox.Items.Add(row2["HAFam"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Dislipidemie")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Obezitate")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["Obezitate"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Morti Subite")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Ocupatie")
                                                                                    {
                                                                                        otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                    }
                                                                                    if (comboBox2.Text == "Diabet Gestational")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["DiabetG"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                    {
                                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                        otherlistBox.Items.Add(row2["HAPers"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                    {
                                                                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                        otherlistBox.Items.Add(row2["IMAVC"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Copil Macrosom")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                        #endregion
                                                                    }
                                                                    else
                                                                        if (from == 0 && Convert.ToInt32(row["Tg"]) <= to)
                                                                        {
                                                                            indicelistBox.Items.Add(row["Tg"]);
                                                                            numelistBox.Items.Add(row["Nume"]);
                                                                            datelistBox.Items.Add(row["Date"]);
                                                                            ctr++;
                                                                            paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                            #region Alte valori
                                                                            if (comboBox2.Text == "CNP")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["CNP"]);
                                                                            }
                                                                            if (comboBox2.Text == "Fumat")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                if (row["Fumat"].ToString() == "DA")
                                                                                    otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                                else
                                                                                    otherlistBox.Items.Add(row["Fumat"]);
                                                                            }
                                                                            if (comboBox2.Text == "Activitate Fizica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["ActFizica"]);
                                                                            }
                                                                            if (comboBox2.Text == "Masa Corporala")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["G"]);
                                                                            }
                                                                            if (comboBox2.Text == "Inaltime")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["H"]);
                                                                            }
                                                                            if (comboBox2.Text == "Circumferinta Abdominala")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["Ca"]);
                                                                            }
                                                                            if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["TaSistolica"]);
                                                                            }
                                                                            if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                            }
                                                                            if (comboBox2.Text == "Glicemie")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["Glicemie"]);
                                                                            }
                                                                            if (comboBox2.Text == "HDL Colesterol")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["HDLCol"]);
                                                                            }
                                                                            if (comboBox2.Text == "LDL Colesterol")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["LDLCol"]);
                                                                            }
                                                                            if (comboBox2.Text == "Trigliceride")
                                                                            {
                                                                                otherlistBox.Items.Add(row["Tg"]);
                                                                                otherlabel.Text = comboBox2.Text;
                                                                            }
                                                                            if (comboBox2.Text == "Indice de masa corporala")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                                imc = imcf.ToString();
                                                                                imcf = (float)Convert.ToDouble(imc);
                                                                                otherlistBox.Items.Add(imcf);
                                                                            }
                                                                            if (comboBox2.Text == "Varsta")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                            }
                                                                            if (comboBox2.Text == "Risc Cardiovascular")
                                                                            {
                                                                                int rcvs;
                                                                                rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(rcvs);
                                                                            }
                                                                            if (ok2 == true)
                                                                            {
                                                                                foreach (DataRow row2 in dt2.Rows)
                                                                                {
                                                                                    if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                    {
                                                                                        if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["DZP"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["DZF"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                        {
                                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                            otherlistBox.Items.Add(row2["HAFam"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Dislipidemie")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Obezitate")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["Obezitate"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Morti Subite")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Ocupatie")
                                                                                        {
                                                                                            otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                        }
                                                                                        if (comboBox2.Text == "Diabet Gestational")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["DiabetG"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                        {
                                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                            otherlistBox.Items.Add(row2["HAPers"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                        {
                                                                                            otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                            otherlistBox.Items.Add(row2["IMAVC"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Copil Macrosom")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                            #endregion
                                                                        }
                                                                        else
                                                                            if (from == 0 && to == 0)
                                                                            {

                                                                                indicelistBox.Items.Add(row["Tg"]);
                                                                                numelistBox.Items.Add(row["Nume"]);
                                                                                datelistBox.Items.Add(row["Date"]);
                                                                                ctr++;
                                                                                paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                                #region Alte valori
                                                                                if (comboBox2.Text == "CNP")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["CNP"]);
                                                                                }
                                                                                if (comboBox2.Text == "Fumat")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    if (row["Fumat"].ToString() == "DA")
                                                                                        otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                                    else
                                                                                        otherlistBox.Items.Add(row["Fumat"]);
                                                                                }
                                                                                if (comboBox2.Text == "Activitate Fizica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["ActFizica"]);
                                                                                }
                                                                                if (comboBox2.Text == "Masa Corporala")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["G"]);
                                                                                }
                                                                                if (comboBox2.Text == "Inaltime")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["H"]);
                                                                                }
                                                                                if (comboBox2.Text == "Circumferinta Abdominala")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["Ca"]);
                                                                                }
                                                                                if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["TaSistolica"]);
                                                                                }
                                                                                if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                                }
                                                                                if (comboBox2.Text == "Glicemie")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["Glicemie"]);
                                                                                }
                                                                                if (comboBox2.Text == "HDL Colesterol")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["HDLCol"]);
                                                                                }
                                                                                if (comboBox2.Text == "LDL Colesterol")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["LDLCol"]);
                                                                                }
                                                                                if (comboBox2.Text == "Trigliceride")
                                                                                {
                                                                                    otherlistBox.Items.Add(row["Tg"]);
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                }
                                                                                if (comboBox2.Text == "Indice de masa corporala")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                                    imc = imcf.ToString();
                                                                                    imcf = (float)Convert.ToDouble(imc);
                                                                                    otherlistBox.Items.Add(imcf);
                                                                                }
                                                                                if (comboBox2.Text == "Varsta")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                                }
                                                                                if (comboBox2.Text == "Risc Cardiovascular")
                                                                                {
                                                                                    int rcvs;
                                                                                    rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(rcvs);
                                                                                }
                                                                                if (ok2 == true)
                                                                                {
                                                                                    foreach (DataRow row2 in dt2.Rows)
                                                                                    {
                                                                                        if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                        {
                                                                                            if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["DZP"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["DZF"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                            {
                                                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                                otherlistBox.Items.Add(row2["HAFam"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Dislipidemie")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Obezitate")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["Obezitate"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Morti Subite")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Ocupatie")
                                                                                            {
                                                                                                otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                            }
                                                                                            if (comboBox2.Text == "Diabet Gestational")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["DiabetG"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                            {
                                                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                                otherlistBox.Items.Add(row2["HAPers"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                            {
                                                                                                otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                                otherlistBox.Items.Add(row2["IMAVC"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Copil Macrosom")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                                #endregion
                                                                            }
                                                                }
                                                                ctr = 0;
                                                            }
                                                            else
                                                                if (controlcomboBox.Text == "Indice de masa corporala")
                                                                {
                                                                    float imcf;
                                                                    string imc;
                                                                    numelistBox.Items.Clear();
                                                                    datelistBox.Items.Clear();
                                                                    indicelistBox.Items.Clear();
                                                                    otherlistBox.Items.Clear();
                                                                    valoarelabel.Text = controlcomboBox.Text;
                                                                    foreach (DataRow row in dt.Rows)
                                                                    {
                                                                        imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                        imc = imcf.ToString();
                                                                        imcf = (float)Convert.ToDouble(imc);
                                                                        if (imcf >= from && imcf <= to)
                                                                        {
                                                                            indicelistBox.Items.Add(imcf);
                                                                            numelistBox.Items.Add(row["Nume"]);
                                                                            datelistBox.Items.Add(row["Date"]);
                                                                            ctr++;
                                                                            paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                            #region Alte valori
                                                                            if (comboBox2.Text == "CNP")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["CNP"]);
                                                                            }
                                                                            if (comboBox2.Text == "Fumat")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                if (row["Fumat"].ToString() == "DA")
                                                                                    otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                                else
                                                                                    otherlistBox.Items.Add(row["Fumat"]);
                                                                            }
                                                                            if (comboBox2.Text == "Activitate Fizica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["ActFizica"]);
                                                                            }
                                                                            if (comboBox2.Text == "Masa Corporala")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["G"]);
                                                                            }
                                                                            if (comboBox2.Text == "Inaltime")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["H"]);
                                                                            }
                                                                            if (comboBox2.Text == "Circumferinta Abdominala")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["Ca"]);
                                                                            }
                                                                            if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["TaSistolica"]);
                                                                            }
                                                                            if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                            }
                                                                            if (comboBox2.Text == "Glicemie")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["Glicemie"]);
                                                                            }
                                                                            if (comboBox2.Text == "HDL Colesterol")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["HDLCol"]);
                                                                            }
                                                                            if (comboBox2.Text == "LDL Colesterol")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(row["LDLCol"]);
                                                                            }
                                                                            if (comboBox2.Text == "Trigliceride")
                                                                            {
                                                                                otherlistBox.Items.Add(row["Tg"]);
                                                                                otherlabel.Text = comboBox2.Text;
                                                                            }
                                                                            if (comboBox2.Text == "Indice de masa corporala")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                                imc = imcf.ToString();
                                                                                imcf = (float)Convert.ToDouble(imc);
                                                                                otherlistBox.Items.Add(imcf);
                                                                            }
                                                                            if (comboBox2.Text == "Varsta")
                                                                            {
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                            }
                                                                            if (comboBox2.Text == "Risc Cardiovascular")
                                                                            {
                                                                                int rcvs;
                                                                                rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                                otherlabel.Text = comboBox2.Text;
                                                                                otherlistBox.Items.Add(rcvs);
                                                                            }
                                                                            if (ok2 == true)
                                                                            {
                                                                                foreach (DataRow row2 in dt2.Rows)
                                                                                {
                                                                                    if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                    {
                                                                                        if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["DZP"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["DZF"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                        {
                                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                            otherlistBox.Items.Add(row2["HAFam"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Dislipidemie")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Obezitate")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["Obezitate"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Morti Subite")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Ocupatie")
                                                                                        {
                                                                                            otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                        }
                                                                                        if (comboBox2.Text == "Diabet Gestational")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["DiabetG"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                        {
                                                                                            otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                            otherlistBox.Items.Add(row2["HAPers"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                        {
                                                                                            otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                            otherlistBox.Items.Add(row2["IMAVC"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Copil Macrosom")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                            #endregion
                                                                        }
                                                                        else
                                                                            if (from == 0 && imcf <= to)
                                                                            {
                                                                                indicelistBox.Items.Add(imcf);
                                                                                numelistBox.Items.Add(row["Nume"]);
                                                                                datelistBox.Items.Add(row["Date"]);
                                                                                ctr++;
                                                                                paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                                #region Alte valori
                                                                                if (comboBox2.Text == "CNP")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["CNP"]);
                                                                                }
                                                                                if (comboBox2.Text == "Fumat")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    if (row["Fumat"].ToString() == "DA")
                                                                                        otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                                    else
                                                                                        otherlistBox.Items.Add(row["Fumat"]);
                                                                                }
                                                                                if (comboBox2.Text == "Activitate Fizica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["ActFizica"]);
                                                                                }
                                                                                if (comboBox2.Text == "Masa Corporala")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["G"]);
                                                                                }
                                                                                if (comboBox2.Text == "Inaltime")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["H"]);
                                                                                }
                                                                                if (comboBox2.Text == "Circumferinta Abdominala")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["Ca"]);
                                                                                }
                                                                                if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["TaSistolica"]);
                                                                                }
                                                                                if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                                }
                                                                                if (comboBox2.Text == "Glicemie")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["Glicemie"]);
                                                                                }
                                                                                if (comboBox2.Text == "HDL Colesterol")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["HDLCol"]);
                                                                                }
                                                                                if (comboBox2.Text == "LDL Colesterol")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(row["LDLCol"]);
                                                                                }
                                                                                if (comboBox2.Text == "Trigliceride")
                                                                                {
                                                                                    otherlistBox.Items.Add(row["Tg"]);
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                }
                                                                                if (comboBox2.Text == "Indice de masa corporala")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                                    imc = imcf.ToString();
                                                                                    imcf = (float)Convert.ToDouble(imc);
                                                                                    otherlistBox.Items.Add(imcf);
                                                                                }
                                                                                if (comboBox2.Text == "Varsta")
                                                                                {
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                                }
                                                                                if (comboBox2.Text == "Risc Cardiovascular")
                                                                                {
                                                                                    int rcvs;
                                                                                    rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                    otherlistBox.Items.Add(rcvs);
                                                                                }
                                                                                if (ok2 == true)
                                                                                {
                                                                                    foreach (DataRow row2 in dt2.Rows)
                                                                                    {
                                                                                        if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                        {
                                                                                            if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["DZP"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["DZF"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                            {
                                                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                                otherlistBox.Items.Add(row2["HAFam"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Dislipidemie")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Obezitate")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["Obezitate"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Morti Subite")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Ocupatie")
                                                                                            {
                                                                                                otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                            }
                                                                                            if (comboBox2.Text == "Diabet Gestational")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["DiabetG"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                            {
                                                                                                otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                                otherlistBox.Items.Add(row2["HAPers"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                            {
                                                                                                otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                                otherlistBox.Items.Add(row2["IMAVC"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                                            }
                                                                                            if (comboBox2.Text == "Copil Macrosom")
                                                                                            {
                                                                                                otherlabel.Text = comboBox2.Text;
                                                                                                otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                                #endregion
                                                                            }
                                                                            else
                                                                                if (from == 0 && to == 0)
                                                                                {
                                                                                    indicelistBox.Items.Add(imcf);
                                                                                    numelistBox.Items.Add(row["Nume"]);
                                                                                    datelistBox.Items.Add(row["Date"]);
                                                                                    ctr++;
                                                                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                                    #region Alte valori
                                                                                    if (comboBox2.Text == "CNP")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["CNP"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Fumat")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        if (row["Fumat"].ToString() == "DA")
                                                                                            otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                                        else
                                                                                            otherlistBox.Items.Add(row["Fumat"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Activitate Fizica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["ActFizica"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Masa Corporala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["G"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Inaltime")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["H"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["Ca"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["TaSistolica"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Glicemie")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["Glicemie"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "HDL Colesterol")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["HDLCol"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "LDL Colesterol")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["LDLCol"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Trigliceride")
                                                                                    {
                                                                                        otherlistBox.Items.Add(row["Tg"]);
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                    }
                                                                                    if (comboBox2.Text == "Indice de masa corporala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                                        imc = imcf.ToString();
                                                                                        imcf = (float)Convert.ToDouble(imc);
                                                                                        otherlistBox.Items.Add(imcf);
                                                                                    }
                                                                                    if (comboBox2.Text == "Varsta")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                                    }
                                                                                    if (comboBox2.Text == "Risc Cardiovascular")
                                                                                    {
                                                                                        int rcvs;
                                                                                        rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(rcvs);
                                                                                    }
                                                                                    if (ok2 == true)
                                                                                    {
                                                                                        foreach (DataRow row2 in dt2.Rows)
                                                                                        {
                                                                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                            {
                                                                                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["DZP"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["DZF"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                                {
                                                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                                    otherlistBox.Items.Add(row2["HAFam"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Dislipidemie")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Obezitate")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["Obezitate"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Morti Subite")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Ocupatie")
                                                                                                {
                                                                                                    otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                }
                                                                                                if (comboBox2.Text == "Diabet Gestational")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["DiabetG"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                                {
                                                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                                    otherlistBox.Items.Add(row2["HAPers"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                                {
                                                                                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                                    otherlistBox.Items.Add(row2["IMAVC"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Copil Macrosom")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                    #endregion
                                                                                }
                                                                    }
                                                                    ctr = 0;
                                                                }
                                                                else
                                                                    if (controlcomboBox.Text == "Risc Cardiovascular")
                                                                    {
                                                                        int rcvs;
                                                                        numelistBox.Items.Clear();
                                                                        datelistBox.Items.Clear();
                                                                        indicelistBox.Items.Clear();
                                                                        otherlistBox.Items.Clear();
                                                                        valoarelabel.Text = controlcomboBox.Text;
                                                                        foreach (DataRow row in dt.Rows)
                                                                        {
                                                                            rcvs = c.RCV(row["LDLCol"].ToString(), row["CNP"].ToString(), row["TaSistolica"].ToString(), row["Fumat"].ToString(), Convert.ToDateTime(row["Date"]).ToShortDateString().ToString());
                                                                            if (rcvs >= from && rcvs <= to)
                                                                            {
                                                                                    indicelistBox.Items.Add(rcvs);
                                                                                    numelistBox.Items.Add(row["Nume"]);
                                                                                    datelistBox.Items.Add(row["Date"]);
                                                                                    #region Alte valori
                                                                                    if (comboBox2.Text == "CNP")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["CNP"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Fumat")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        if (row["Fumat"].ToString() == "DA")
                                                                                            otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                                        else
                                                                                            otherlistBox.Items.Add(row["Fumat"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Activitate Fizica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["ActFizica"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Masa Corporala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["G"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Inaltime")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["H"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["Ca"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["TaSistolica"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Glicemie")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["Glicemie"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "HDL Colesterol")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["HDLCol"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "LDL Colesterol")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["LDLCol"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Trigliceride")
                                                                                    {
                                                                                        otherlistBox.Items.Add(row["Tg"]);
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                    }
                                                                                    if (comboBox2.Text == "Indice de masa corporala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                                        imc = imcf.ToString();
                                                                                        imcf = (float)Convert.ToDouble(imc);
                                                                                        otherlistBox.Items.Add(imcf);
                                                                                    }
                                                                                    if (comboBox2.Text == "Varsta")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                                    }
                                                                                    if (comboBox2.Text == "Risc Cardiovascular")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(rcvs);
                                                                                    }
                                                                                    if (ok2 == true)
                                                                                    {
                                                                                        foreach (DataRow row2 in dt2.Rows)
                                                                                        {
                                                                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                            {
                                                                                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["DZP"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["DZF"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                                {
                                                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                                    otherlistBox.Items.Add(row2["HAFam"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Dislipidemie")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Obezitate")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["Obezitate"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Morti Subite")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Ocupatie")
                                                                                                {
                                                                                                    otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                }
                                                                                                if (comboBox2.Text == "Diabet Gestational")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["DiabetG"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                                {
                                                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                                    otherlistBox.Items.Add(row2["HAPers"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                                {
                                                                                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                                    otherlistBox.Items.Add(row2["IMAVC"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Copil Macrosom")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                    #endregion
                                                                                    ctr++;
                                                                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                            }
                                                                            else
                                                                                if (from == 0 && rcvs <= to)
                                                                                {
                                                                                    indicelistBox.Items.Add(rcvs);
                                                                                    numelistBox.Items.Add(row["Nume"]);
                                                                                    datelistBox.Items.Add(row["Date"]);
                                                                                    ctr++;
                                                                                    paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                                    #region Alte valori
                                                                                    if (comboBox2.Text == "CNP")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["CNP"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Fumat")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        if (row["Fumat"].ToString() == "DA")
                                                                                            otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                                        else
                                                                                            otherlistBox.Items.Add(row["Fumat"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Activitate Fizica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["ActFizica"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Masa Corporala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["G"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Inaltime")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["H"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Circumferinta Abdominala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["Ca"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["TaSistolica"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Glicemie")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["Glicemie"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "HDL Colesterol")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["HDLCol"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "LDL Colesterol")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(row["LDLCol"]);
                                                                                    }
                                                                                    if (comboBox2.Text == "Trigliceride")
                                                                                    {
                                                                                        otherlistBox.Items.Add(row["Tg"]);
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                    }
                                                                                    if (comboBox2.Text == "Indice de masa corporala")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                                        imc = imcf.ToString();
                                                                                        imcf = (float)Convert.ToDouble(imc);
                                                                                        otherlistBox.Items.Add(imcf);
                                                                                    }
                                                                                    if (comboBox2.Text == "Varsta")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                                    }
                                                                                    if (comboBox2.Text == "Risc Cardiovascular")
                                                                                    {
                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                        otherlistBox.Items.Add(rcvs);
                                                                                    }
                                                                                    if (ok2 == true)
                                                                                    {
                                                                                        foreach (DataRow row2 in dt2.Rows)
                                                                                        {
                                                                                            if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                            {
                                                                                                if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["DZP"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["DZF"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                                {
                                                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                                    otherlistBox.Items.Add(row2["HAFam"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Dislipidemie")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Obezitate")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["Obezitate"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Morti Subite")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Ocupatie")
                                                                                                {
                                                                                                    otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                }
                                                                                                if (comboBox2.Text == "Diabet Gestational")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["DiabetG"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                                {
                                                                                                    otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                                    otherlistBox.Items.Add(row2["HAPers"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                                {
                                                                                                    otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                                    otherlistBox.Items.Add(row2["IMAVC"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                                                }
                                                                                                if (comboBox2.Text == "Copil Macrosom")
                                                                                                {
                                                                                                    otherlabel.Text = comboBox2.Text;
                                                                                                    otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                    #endregion

                                                                                }
                                                                                else
                                                                                    if (from == 0 && to == 0)
                                                                                    {
                                                                                        indicelistBox.Items.Add(rcvs);
                                                                                        numelistBox.Items.Add(row["Nume"]);
                                                                                        datelistBox.Items.Add(row["Date"]);
                                                                                        ctr++;
                                                                                        paclabel.Text = "Numărul de valori găsite este de " + ctr.ToString();
                                                                                        #region Alte valori
                                                                                        if (comboBox2.Text == "CNP")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row["CNP"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Fumat")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            if (row["Fumat"].ToString() == "DA")
                                                                                                otherlistBox.Items.Add(row["Fumat"] + " ( " + row["Nrtigar"] + " )");
                                                                                            else
                                                                                                otherlistBox.Items.Add(row["Fumat"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Activitate Fizica")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row["ActFizica"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Masa Corporala")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row["G"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Inaltime")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row["H"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Circumferinta Abdominala")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row["Ca"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Tensiune Arteriala Sistolica")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row["TaSistolica"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Tensiune Arteriala Diastolica")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row["TaDiastolica"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Glicemie")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row["Glicemie"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "HDL Colesterol")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row["HDLCol"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "LDL Colesterol")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(row["LDLCol"]);
                                                                                        }
                                                                                        if (comboBox2.Text == "Trigliceride")
                                                                                        {
                                                                                            otherlistBox.Items.Add(row["Tg"]);
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                        }
                                                                                        if (comboBox2.Text == "Indice de masa corporala")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            imcf = c.IMC(row["G"].ToString(), row["H"].ToString());
                                                                                            imc = imcf.ToString();
                                                                                            imcf = (float)Convert.ToDouble(imc);
                                                                                            otherlistBox.Items.Add(imcf);
                                                                                        }
                                                                                        if (comboBox2.Text == "Varsta")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(c.Varsta(row["CNP"].ToString(), now));
                                                                                        }
                                                                                        if (comboBox2.Text == "Risc Cardiovascular")
                                                                                        {
                                                                                            otherlabel.Text = comboBox2.Text;
                                                                                            otherlistBox.Items.Add(rcvs);
                                                                                        }
                                                                                        if (ok2 == true)
                                                                                        {
                                                                                            foreach (DataRow row2 in dt2.Rows)
                                                                                            {
                                                                                                if (row["CNP"].ToString() == row2["CNP"].ToString())
                                                                                                {
                                                                                                    if (comboBox2.Text == "Diabet Zaharat Parinti")
                                                                                                    {
                                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                                        otherlistBox.Items.Add(row2["DZP"]);
                                                                                                    }
                                                                                                    if (comboBox2.Text == "Diabet Zaharat Frati")
                                                                                                    {
                                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                                        otherlistBox.Items.Add(row2["DZF"]);
                                                                                                    }
                                                                                                    if (comboBox2.Text == "Boala Cardiovasculara")
                                                                                                    {
                                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                                        otherlistBox.Items.Add(row2["BoliCardio"]);
                                                                                                    }
                                                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(familie)")
                                                                                                    {
                                                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(familie)";
                                                                                                        otherlistBox.Items.Add(row2["HAFam"]);
                                                                                                    }
                                                                                                    if (comboBox2.Text == "Dislipidemie")
                                                                                                    {
                                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                                        otherlistBox.Items.Add(row2["Dislipidemie"]);
                                                                                                    }
                                                                                                    if (comboBox2.Text == "Obezitate")
                                                                                                    {
                                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                                        otherlistBox.Items.Add(row2["Obezitate"]);
                                                                                                    }
                                                                                                    if (comboBox2.Text == "Morti Subite")
                                                                                                    {
                                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                                        otherlistBox.Items.Add(row2["MortiSubite"]);
                                                                                                    }
                                                                                                    if (comboBox2.Text == "Ocupatie")
                                                                                                    {
                                                                                                        otherlistBox.Items.Add(row2["Ocupatie"]);
                                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                                    }
                                                                                                    if (comboBox2.Text == "Diabet Gestational")
                                                                                                    {
                                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                                        otherlistBox.Items.Add(row2["DiabetG"]);
                                                                                                    }
                                                                                                    if (comboBox2.Text == "Cardiopatie Ischemica")
                                                                                                    {
                                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                                        otherlistBox.Items.Add(row2["CardioIschemica"]);
                                                                                                    }
                                                                                                    if (comboBox2.Text == "Hipertensiune Arteriala(personala)")
                                                                                                    {
                                                                                                        otherlabel.Text = "Hipertensiune Arteriala" + "\n" + "(personala)";
                                                                                                        otherlistBox.Items.Add(row2["HAPers"]);
                                                                                                    }
                                                                                                    if (comboBox2.Text == "Infarct Miocardic/Accident Vascular Cerebral")
                                                                                                    {
                                                                                                        otherlabel.Text = "Infarct Miocardic" + "\n" + "Accident Vascular Cerebral";
                                                                                                        otherlistBox.Items.Add(row2["IMAVC"]);
                                                                                                    }
                                                                                                    if (comboBox2.Text == "Scaderea Tolerantei La Glucoza")
                                                                                                    {
                                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                                        otherlistBox.Items.Add(row2["STGlucoza"]);
                                                                                                    }
                                                                                                    if (comboBox2.Text == "Copil Macrosom")
                                                                                                    {
                                                                                                        otherlabel.Text = comboBox2.Text;
                                                                                                        otherlistBox.Items.Add(row2["CopilMacro"]);
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                        #endregion
                                                                                    }
                                                                    }
                                                                    ctr = 0;
                                                                    }

                }
                else
                    MessageBox.Show("Selectati o valoare pentru a vedea statistica.");
            }
            int s=0;
            for (int i = 1; i <= numelistBox.Items.Count; i++)
                s += i;
            if(s==0)
                paclabel.Text = "";
        }
Beispiel #4
0
 private void button8_Click(object sender, EventArgs e)
 {
     Calcul c = new Calcul();
     string g, h;
     float imc;
     cnp = cNPTextBox.Text;
     if (cnp != "" && gTextBox.Text!="")
     {
         g = gTextBox.Text;
         h = hTextBox.Text;
         imc = c.IMC(g, h);
         string imcs = imc.ToString();
         if (imcs.Length == 2)
             imclabel.Text = imc.ToString().Substring(0, 2);
         else
             if (imcs.Length == 3)
                 imclabel.Text = imc.ToString().Substring(0, 3);
             else
                 if (imcs.Length == 4)
                     imclabel.Text = imc.ToString().Substring(0, 4);
                 else
                     imclabel.Text = imc.ToString().Substring(0, 5);
         imcok = true;
     }
 }