示例#1
0
 public static void ajouterJournal(JournalAchat journal)
 {
     try
     {
         Connexion cnx = new Connexion();
         cnx.OpenConnection();
         String       requette = "INSERT INTO journalachat (idAdmin, idFourn, heure, action, remarque) VALUES  (" + journal.IDADMIN + "," + journal.IDPROD + ",'" + journal.HEURE + "','" + journal.ACTION + "','" + journal.REMARQUE + "')";
         MySqlCommand cmd      = new MySqlCommand(requette, cnx.connexion);
         cmd.ExecuteNonQuery();
         cnx.CloseConnection();
     }
     catch (Exception e)
     {
         //MessageBox.Show(e.Message);
     }
 }
示例#2
0
 public static int modifierRemarque(JournalAchat journal)
 {
     try
     {
         Connexion cnx = new Connexion();
         cnx.OpenConnection();
         String       requette = "UPDATE journalClient SET remarque ='" + journal.REMARQUE + "' WHERE id=" + journal.ID + " ";
         MySqlCommand cmd      = new MySqlCommand(requette, cnx.connexion);
         cmd.ExecuteNonQuery();
         cnx.CloseConnection();
         return(1);
     }
     catch (Exception e)
     {
         //MessageBox.Show(e.Message);
         return(0);
     }
 }