Exemplo n.º 1
0
        public List <Expertise> UpdateExpertise(Expertise ex)
        {
            DBservices db = new DBservices();

            if (db.UpdateExpertise(ex) == 1)
            {
                return(db.GetAllExpertisesFromSQL());
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 2
0
        public List <Expertise> AddNewExpertise(Expertise exper)
        {
            DBservices db = new DBservices();

            if (db.AddNewExpertise(exper) == 1)
            {
                return(db.GetAllExpertisesFromSQL());
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 3
0
        public List <Expertise> DeleteExpertise(Expertise exp)
        {
            DBservices db  = new DBservices();
            int        num = db.GetAllExpertisesFromSQL().Count;

            db.DeleteExpertiseFromSQL(exp);
            List <Expertise> expertises = db.GetAllExpertisesFromSQL();

            if (expertises.Count + 1 == num)
            {
                return(expertises);
            }
            else
            {
                return(null);
            }
        }