public void deleteFromOperationFournisseur(OperationFournisseur op) { try { string req = "DELETE FROM operationFournisseur WHERE codeoperationfournisseur like '" + op.Code + "';"; commande.CommandText = req; commande.ExecuteNonQuery(); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public void insertIntoOperationFournisseur(OperationFournisseur op) { try { string req = "insert into operationFournisseur values('" + op.Code + "','" + op.Fournisseur.Code + "','" + op.Paiement.ModePaiement + "','" + op.Paiement.Montant + "','" + op.Paiement.Regler + "','" + op.Paiement.Reste + "','" + op.Designation + "','" + op.Quantite + "','" + op.PrixUnitaire + "','" + op.DateOperation.Year + "-" + op.DateOperation.Month + "-" + op.DateOperation.Day + "')"; commande.CommandText = req; commande.ExecuteNonQuery(); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public ModifyOperationFournisseur(OperationFournisseur operation) { InitializeComponent(); this.operation = operation; }