Beispiel #1
0
        public Statistica return_date_statistice()
        {
            conexiune.openConnectionu();
            Statistica    SNou = new Statistica();
            SqlDataReader rdr  = conexiune.executeSelectQueryu("SELECT * FROM dbo.Statistica WHERE id_utilizator='" + ID.ToString() + "';", null);

            if (rdr.HasRows)
            {
                while (rdr.Read())
                {
                    SNou.id_utilizator     = Int32.Parse(rdr[0].ToString());
                    SNou.Medie             = Int32.Parse(rdr[1].ToString());
                    SNou.Nr_teste_parcurse = Int32.Parse(rdr[2].ToString());
                }
            }
            rdr.Close();
            return(SNou);
        }
Beispiel #2
0
 public Statistica return_date_statistice()
 {
     conexiune.openConnectionu();
     Statistica SNou = new Statistica();
     SqlDataReader rdr = conexiune.executeSelectQueryu("SELECT * FROM dbo.Statistica WHERE id_utilizator='" + ID.ToString() + "';", null);
     if (rdr.HasRows)
     {
         while (rdr.Read())
         {
             SNou.id_utilizator = Int32.Parse(rdr[0].ToString());
             SNou.Medie = Int32.Parse(rdr[1].ToString());
             SNou.Nr_teste_parcurse = Int32.Parse(rdr[2].ToString());
         }
     }
     rdr.Close();
     return SNou;
 }