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

                string       req = "INSERT INTO noninteresse(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 ModifierRappelNoninteresse(noninteresse rap, int idd)
        {
            try
            {
                Connexion con = new Connexion();
                con.OpenConnection();

                string       req = "UPDATE noninteresse 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);
            }
        }