public FormfileCollection FetchAll() { FormfileCollection coll = new FormfileCollection(); Query qry = new Query(Formfile.Schema); coll.LoadAndCloseReader(qry.ExecuteReader()); return coll; }
/// <summary> /// Loads the file for the specified person /// </summary> public void LoadFile(Person person) { if (person == null) { throw new ArgumentNullException("person"); } FormfileCollection candidateFiles = person.Formfiles().Where(Formfile.Columns.Formid, this.Form.Id); if (candidateFiles.Count > 0) { this.file = candidateFiles[0]; } if (this.file != null) { this.FileLoaded = true; } }
/// <summary> /// The specified person has a file for this form /// </summary> public bool HasFile(Person person) { if (person == null) { throw new ArgumentNullException("person"); } FormfileCollection candidateFiles = person.Formfiles().Where(Formfile.Columns.Formid, this.Form.Id); if (candidateFiles.Count > 0) { return(true); } else { return(false); } }
public FormfileCollection FetchByQuery(Query qry) { FormfileCollection coll = new FormfileCollection(); coll.LoadAndCloseReader(qry.ExecuteReader()); return coll; }
public FormfileCollection FetchByID(object Id) { FormfileCollection coll = new FormfileCollection().Where("id", Id).Load(); return coll; }