예제 #1
0
        /// <summary>
        /// Populates the fields for multiple objects from the columns found in an open reader.
        /// </summary>
        ///
        /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
        ///
        /// <returns>Object of FormSubmitClicks</returns>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			11/29/2012 12:32:23 PM		Created function
        /// 
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static FormSubmitClicks PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper, string ConnectionString)
        {
            FormSubmitClicks list = new FormSubmitClicks();

            if (rdr.Read())
            {
                FormSubmitClick obj = new FormSubmitClick(ConnectionString);
                PopulateObjectFromReader(obj, rdr);
                list.Add(obj);
                while (rdr.Read())
                {
                    obj = new FormSubmitClick(ConnectionString);
                    PopulateObjectFromReader(obj, rdr);
                    list.Add(obj);
                }
                oDatabaseHelper.Dispose();
                return list;
            }
            else
            {
                oDatabaseHelper.Dispose();
                return null;
            }
        }
예제 #2
0
        /// <summary>
        /// Populates the fields for multiple objects from the columns found in an open reader.
        /// </summary>
        ///
        /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
        ///
        /// <returns>Object of FormSubmitClicks</returns>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			11/29/2012 12:32:23 PM		Created function
        /// 
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static FormSubmitClicks PopulateObjectsFromReader(IDataReader rdr, string ConnectionString)
        {
            FormSubmitClicks list = new FormSubmitClicks();

            while (rdr.Read())
            {
                FormSubmitClick obj = new FormSubmitClick(ConnectionString);
                PopulateObjectFromReader(obj,rdr);
                list.Add(obj);
            }
            return list;
        }