public void InsertPays(Pays unPays) { Dictionary <string, string> values = new Dictionary <string, string>(); values["id"] = unPays.Id.ToString(); values["nom"] = "'" + unPays.Nom.Replace("'", "\\'") + "'"; mydbal.Insert("pays", values); }
public void InsertFromage(Fromage unFromage) { Dictionary <string, string> values = new Dictionary <string, string>(); values["id"] = unFromage.Id.ToString(); values["pays_origine_id"] = unFromage.Pays_origine_id.ToString(); values["nom"] = "'" + unFromage.Nom.Replace("'", "\\'") + "'"; values["creation"] = "'" + unFromage.Creation.ToString("yyyy'-'MM'-'dd") + "'"; values["image"] = "'" + unFromage.Image.Replace("'", "\\'") + "'"; mydbal.Insert("fromage", values); }