Example #1
0
 public FormfileCollection FetchAll()
 {
     FormfileCollection coll = new FormfileCollection();
     Query qry = new Query(Formfile.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
Example #2
0
        /// <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;
            }
        }
Example #3
0
        /// <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);
            }
        }
Example #4
0
 public FormfileCollection FetchByQuery(Query qry)
 {
     FormfileCollection coll = new FormfileCollection();
     coll.LoadAndCloseReader(qry.ExecuteReader()); 
     return coll;
 }
Example #5
0
 public FormfileCollection FetchByID(object Id)
 {
     FormfileCollection coll = new FormfileCollection().Where("id", Id).Load();
     return coll;
 }