예제 #1
0
        public void Create(string data)
        {
            var paiementMethodDTO = Newtonsoft.Json.JsonConvert.DeserializeObject <PaiementMethodDTO>(data);

            sqlManager.ExecQuery(@"insert into Mode_paiement (name)
                                values ('" + paiementMethodDTO.name + "');");
        }
예제 #2
0
        public void Create(string data)
        {
            var classificationDTO = Newtonsoft.Json.JsonConvert.DeserializeObject <ClassificationDTO>(data);

            sqlManager.ExecQuery(@"insert into classification  (name)
                                values ('" + classificationDTO.name + "');");
        }
예제 #3
0
        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 + "');");
            }
        }
예제 #4
0
        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 + "');");
            }
        }
예제 #5
0
        public void Create(string data)
        {
            var societeDTO = Newtonsoft.Json.JsonConvert.DeserializeObject <SocieteDTO>(data);

            sqlManager.ExecQuery("insert into societe (name) values ('" + societeDTO.name + "');");
        }