コード例 #1
0
        /*******************/
        /*    Méthodes     */
        /*******************/

        public bool CreerParticipant(int idPoste)
        {
            if (db.VerifMontant(idPoste, (decimal)salaireParticipation).FirstOrDefault().Column1 >= 0)
            {
                db.AjouterParticipant(Id, (decimal)salaireParticipation, heureTravail, idPoste);
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
        /*******************/
        /*    Méthodes     */
        /*******************/

        public bool CreerMateriel(int idPoste)
        {
            if (db.VerifMontant(idPoste, (decimal)prix * quantité).FirstOrDefault().Column1 >= 0)
            {
                db.AjouterMateriel(nom, Convert.ToDecimal(prix), quantité, idPoste);
                return(true);
            }
            else
            {
                return(false);
            }
        }