Пример #1
0
        public void DeleteStudyField(int Id)
        {
            _db = new StudyFieldDB();

            try
            {
                _db.DeleteStudyField(Id);
            }
            catch
            {
                throw new ArgumentException("Could not delete study field.");
            }
        }
Пример #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.");
            }
        }
Пример #3
0
        public void EditStudyField(StudyField studyField)
        {
            _db = new StudyFieldDB();

            _db.EditStudyField(studyField);
        }
Пример #4
0
        public List <StudyField> GetAllStudyFields()
        {
            _db = new StudyFieldDB();

            return(_db.GetAllStudyFields());
        }
Пример #5
0
        public StudyField GetStudyField(int Id)
        {
            _db = new StudyFieldDB();

            return(_db.GetStudyField(Id));
        }