Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Admin Anou = new Admin();
            Anou = obj.return_date_admin();
            label_nume.Text = Anou.Nume.ToString() + " " + Anou.Prenume.ToString();

        }
Ejemplo n.º 2
0
 public Admin return_date_admin()
 {
     conexiune.openConnectionu();
     Admin AdminNou = new Admin();
     SqlDataReader rdr = conexiune.executeSelectQueryu("SELECT * FROM dbo.Admin WHERE id_admin='" + ID.ToString() + "';", null);
     if (rdr.HasRows)
     {
         while (rdr.Read())
         {
             AdminNou.id_admin = Int32.Parse(rdr[0].ToString());
             AdminNou.Nume = rdr[1].ToString();
             AdminNou.Prenume = rdr[2].ToString();
             AdminNou.mail = rdr[3].ToString();
             AdminNou.Parola = rdr[4].ToString();
         }
     }
     rdr.Close();
     return AdminNou;
 }