public void DeleteStudyField(int Id) { _db = new StudyFieldDB(); try { _db.DeleteStudyField(Id); } catch { throw new ArgumentException("Could not delete study field."); } }
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."); } }
public void EditStudyField(StudyField studyField) { _db = new StudyFieldDB(); _db.EditStudyField(studyField); }
public List <StudyField> GetAllStudyFields() { _db = new StudyFieldDB(); return(_db.GetAllStudyFields()); }
public StudyField GetStudyField(int Id) { _db = new StudyFieldDB(); return(_db.GetStudyField(Id)); }