Beispiel #1
0
 public Boolean insert(Object o)
 {
     try
     {
         Admin        a         = (Admin)o;
         int          matricule = a.personnel.matricule;
         String       login     = a.login;
         String       password  = a.password;
         PLSQL.Pl_SQL plSql     = new PLSQL.Pl_SQL();
         string       req       = string.Format(plSql.Inscrire(matricule, login, password));
         cmd.Connection = cn;
         cn.Open();
         cmd.CommandText = req;
         cmd.ExecuteNonQuery();
         return(true);
     }
     catch (OleDbException ex)
     {
         System.Console.WriteLine("error :" + ex.Message);
         return(false);
     }
     finally
     {
         cn.Close();
     }
 }