public void Create(string data) { var paiementMethodDTO = Newtonsoft.Json.JsonConvert.DeserializeObject <PaiementMethodDTO>(data); sqlManager.ExecQuery(@"insert into Mode_paiement (name) values ('" + paiementMethodDTO.name + "');"); }
public void Create(string data) { var classificationDTO = Newtonsoft.Json.JsonConvert.DeserializeObject <ClassificationDTO>(data); sqlManager.ExecQuery(@"insert into classification (name) values ('" + classificationDTO.name + "');"); }
public void Create(string data) { var compteDTO = Newtonsoft.Json.JsonConvert.DeserializeObject <CompteDTO>(data); string banque = !compteDTO.banque.ToString().Contains("0000") ? compteDTO.banque.ToString() : null; if (banque != null) { sqlManager.ExecQuery(@"insert into compte (numero,id_banque) values ('" + compteDTO.numero + "','" + banque + "');"); } else { sqlManager.ExecQuery(@"insert into compte (numero) values ('" + compteDTO.numero + "');"); } }
public void Create(string data) { var banqueDTO = Newtonsoft.Json.JsonConvert.DeserializeObject <BanqueDTO>(data); string defaultAccount = !banqueDTO.default_account.ToString().Contains("0000") ? banqueDTO.default_account.ToString():null; if (defaultAccount != null) { sqlManager.ExecQuery(@"insert into banque (name,default_account) values ('" + banqueDTO.name + "','" + defaultAccount + "');"); } else { sqlManager.ExecQuery(@"insert into banque (name) values ('" + banqueDTO.name + "');"); } }
public void Create(string data) { var societeDTO = Newtonsoft.Json.JsonConvert.DeserializeObject <SocieteDTO>(data); sqlManager.ExecQuery("insert into societe (name) values ('" + societeDTO.name + "');"); }