public int Ajouter(CommandesAchat model) { try { return(Gestion.Ajouter(model.IdFournisseur, model.Date)); } catch (Exception e) { throw new Exception("Impossible d'ajouter la commande : \n" + e.Message); } }
public int Modifier(CommandesAchat model) { try { return(Gestion.Modifier(model.Id, model.IdFournisseur, model.Date)); } catch (Exception e) { throw new Exception($"Impossible de modifier la commande {model.Id} : \n" + e.Message); } }
public AccesCommandesAchat(string sChaineConnexion) : base(sChaineConnexion) { Table = "CommandesFournisseurs"; _classesBase = new CommandesAchat(); }
public async Task <int> AjouterAsync(CommandesAchat model) { return(await Task.Run(() => Ajouter(model))); }