Esempio n. 1
0
        public static int AjouterRappelRendezvous(rendezvous rap)
        {
            try
            {
                Connexion con = new Connexion();
                con.OpenConnection();

                string       req = "INSERT INTO rendezvous(identreprise, date, heure, numtel, nom, prenom, poste, reponse, daterdv, heurerdv, notedaterdv, adresse, contact) VALUES (" + rap.IDENTREPRISE + ",'" + rap.DATE + "','" + rap.HEURE + "','" + rap.NUMTEL + "','" + rap.NOM + "','" + rap.PRENOM + "','" + rap.POSTE + "','" + rap.REPONSE + "','" + rap.DATERDV + "','" + rap.HEURERDV + "','" + rap.NOTEDATERDV + "','" + rap.ADRESSE + "','" + rap.CONTACT + "')";
                MySqlCommand cmd = new MySqlCommand(req, con.connexion);
                cmd.ExecuteNonQuery();
                con.CloseConnection();
                return(1);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
                return(0);
            }
        }
Esempio n. 2
0
        public static int ModifierRappelRendezvous(rendezvous rap, int idd)
        {
            try
            {
                Connexion con = new Connexion();
                con.OpenConnection();

                string       req = "UPDATE  	rendezvous 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 + "',daterdv='" + rap.DATERDV + "',heurerdv='" + rap.HEURERDV + "',notedaterdv='" + rap.NOTEDATERDV + "',adresse='" + rap.ADRESSE + "',contact='" + rap.CONTACT + "'  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);
            }
        }
 public ActionResult JourRendezvous(rendezvous rendezvous)
 {
     return(View());
 }