Beispiel #1
0
        //*********************************************************
        //****   Suppression d'un usager dans la liste     ********
        //*********************************************************
        /// <summary>
        /// Suppression de l'usager dans la liste
        /// </summary>
        /// <param name="us">Usager</param>
        /// <returns>Requête SQL</returns>
        public static bool SUPPR_Usager(Usager us)
        {
            // Requête Sql
            String strSql = "Delete from USAGER where ID_usager='" + us.IdUsager.ToString() + "'";

            return(DAO.Execute_Ins_Upd_Delete(strSql));
        }
Beispiel #2
0
        //*********************************************************
        //******   Mise a jour des infos d'un usager         ******
        //*********************************************************
        /// <summary>
        /// Mise a jour des infos d'un usager
        /// </summary>
        /// <param name="us">Usager</param>
        /// <returns>Requête SQL</returns>
        public static bool MAJ_Usager(Usager us)
        {
            //Requête Sql
            String strSql = "Update USAGER set Pseudo_usager ='" +
                            us.PseudoUsager + "' , Mail_usager= '" + us.MailAdress + "' , Adresse_usager= '" + us.PostAdress +
                            "' , Infos_usager= '" + us.Commentaire + "' where ID_usager='" + us.IdUsager + "'";

            return(DAO.Execute_Ins_Upd_Delete(strSql));
        }
Beispiel #3
0
        //*********************************************************
        //********************  MAJ Usager    *********************
        //*********************************************************
        public void MAJ(Usager u)
        {
            // MAJ de toutes les données d'un usager
            this.m_strID_usager      = u.m_strID_usager;
            this.m_strPseudo_usager  = u.m_strPseudo_usager;
            this.m_strMail_usager    = u.m_strMail_usager;
            this.m_strAdresse_usager = u.m_strAdresse_usager;
            this.m_strInfos_usager   = u.m_strInfos_usager;

            DAO_Usager.MAJ_Usager(u);
        }
Beispiel #4
0
        ////*********************************************************
        ////******   Ajout d'un nouvel usager dans la liste    ******
        ////*********************************************************
        /// <summary>
        /// Ajout d'un nouvel usager dans la liste
        /// </summary>
        /// <param name="us">Usager</param>
        /// <returns>Requête SQL</returns>
        public static bool AJOUT_Usager(Usager us)
        {
            // Requête sql
            String strSql = "Insert into USAGER values('"
                            + us.IdUsager + "' , '" +
                            us.PseudoUsager + "' , '" +
                            us.MailAdress + "' , '" +
                            us.PostAdress + "' , '" +
                            us.Commentaire + "')";

            return(DAO.Execute_Ins_Upd_Delete(strSql));
        }