Example #1
0
        public static int AjouterRappelFauxnumero(fauxnumero rap)
        {
            try
            {
                Connexion con = new Connexion();
                con.OpenConnection();

                string       req = "INSERT INTO fauxnumero(identreprise, date, heure, numtel, nom, prenom, poste, reponse, note) VALUES (" + rap.IDENTREPRISE + ",'" + rap.DATE + "','" + rap.HEURE + "','" + rap.NUMTEL + "','" + rap.NOM + "','" + rap.PRENOM + "','" + rap.POSTE + "','" + rap.REPONSE + "','" + rap.NOTE + "')";
                MySqlCommand cmd = new MySqlCommand(req, con.connexion);
                cmd.ExecuteNonQuery();
                con.CloseConnection();
                return(1);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
                return(0);
            }
        }
Example #2
0
        public static int ModifierRappelFauxnumero(fauxnumero rap, int idd)
        {
            try
            {
                Connexion con = new Connexion();
                con.OpenConnection();

                string       req = "UPDATE  	fauxnumero SET identreprise ="+ rap.IDENTREPRISE + ", date='" + rap.DATE + "', heure='" + rap.HEURE + "',numtel='" + rap.NUMTEL + "',nom='" + rap.NOM + "',prenom='" + rap.PRENOM + "',poste='" + rap.POSTE + "',reponse='" + rap.REPONSE + "',note='" + rap.NOTE + "'   WHERE id=" + idd + " ";
                MySqlCommand cmd = new MySqlCommand(req, con.connexion);
                cmd.ExecuteNonQuery();
                con.CloseConnection();
                return(1);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
                return(0);
            }
        }