示例#1
0
        public List <Expertise> UpdateExpertise(Expertise ex)
        {
            DBservices db = new DBservices();

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

            if (db.AddNewExpertise(exper) == 1)
            {
                return(db.GetAllExpertisesFromSQL());
            }
            else
            {
                return(null);
            }
        }
示例#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);
            }
        }