Beispiel #1
0
        public void DeleteStudyField(int Id)
        {
            _db = new StudyFieldDB();

            try
            {
                _db.DeleteStudyField(Id);
            }
            catch
            {
                throw new ArgumentException("Could not delete study field.");
            }
        }
Beispiel #2
0
        public void CreateNewStudyField(string fieldName)
        {
            if (!string.IsNullOrWhiteSpace(fieldName))
            {
                _db = new StudyFieldDB();

                _db.CreateNewStudyField(fieldName);
            }
            else
            {
                throw new ArgumentException("Study name was not in correct format.");
            }
        }
Beispiel #3
0
        public void EditStudyField(StudyField studyField)
        {
            _db = new StudyFieldDB();

            _db.EditStudyField(studyField);
        }
Beispiel #4
0
        public List <StudyField> GetAllStudyFields()
        {
            _db = new StudyFieldDB();

            return(_db.GetAllStudyFields());
        }
Beispiel #5
0
        public StudyField GetStudyField(int Id)
        {
            _db = new StudyFieldDB();

            return(_db.GetStudyField(Id));
        }