Example #1
0
        /// <summary>
        /// Loads this instance.
        /// </summary>
        /// <returns>
        /// The <see cref="int"/>.
        /// </returns>
        public int Load()
        {
            if (this.ident == null)
            {
                return(-1);
            }

            var query = this.RecordTemplate.GetSelectQuery();

            if (query == null)
            {
                return(-1);
            }

            query.Query.Bind(1, this.ident.RecordId);
            var ret = query.Execute(0);

            if (ret > 0)
            {
                this.resultRow = query.TakeRowOwnership(0);
                this.Loaded    = true;
            }

            return(ret);
        }
        /// <summary>
        /// Adds the row.
        /// </summary>
        /// <param name="row">
        /// The row.
        /// </param>
        public virtual void AddRow(DatabaseRow row)
        {
            if (this.Rows == null)
            {
                this.Rows = new List <DatabaseRow>();
            }

            this.Rows.Add(row);
        }