Example #1
0
 internal static void PopulateObjectFromReaderNew(CampaignJobBase obj, IDataReader rdr)
 {
     // obj.ID = rdr.GetInt64(rdr.GetOrdinal(CampaignJobFields.ID));
        if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.Accepted)))
     {
         obj.Accepted = rdr.GetInt32(rdr.GetOrdinal(CampaignJobFields.Accepted));
     }
     if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.Domain)))
     {
         obj.Domain = rdr.GetString(rdr.GetOrdinal(CampaignJobFields.Domain));
     }
 }
Example #2
0
        /// <summary>
        /// Populates the fields of a single objects from the columns found in an open reader.
        /// </summary>
        /// <param name="obj" type="CampaignJob">Object of CampaignJob to populate</param>
        /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			2/3/2010 4:14:00 PM		Created function
        /// 
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static void PopulateObjectFromReader(CampaignJobBase obj, IDataReader rdr)
        {
            obj.ID = rdr.GetInt64(rdr.GetOrdinal(CampaignJobFields.ID));
            if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.CampaignMasterID)))
            {
                obj.CampaignMasterID = rdr.GetInt64(rdr.GetOrdinal(CampaignJobFields.CampaignMasterID));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.ScheduledDatetime)))
            {
                obj.ScheduledDatetime = rdr.GetDateTime(rdr.GetOrdinal(CampaignJobFields.ScheduledDatetime));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.CreatedDatetime)))
            {
                obj.CreatedDatetime = rdr.GetDateTime(rdr.GetOrdinal(CampaignJobFields.CreatedDatetime));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.Status)))
            {
                obj.Status = rdr.GetInt32(rdr.GetOrdinal(CampaignJobFields.Status));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.StatusMessage)))
            {
                obj.StatusMessage = rdr.GetString(rdr.GetOrdinal(CampaignJobFields.StatusMessage));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.DeliveredCount)))
            {
                obj.DeliveredCount = rdr.GetInt32(rdr.GetOrdinal(CampaignJobFields.DeliveredCount));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.OpenCount)))
            {
                obj.OpenCount = rdr.GetInt32(rdr.GetOrdinal(CampaignJobFields.OpenCount));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.ClickCount)))
            {
                obj.ClickCount = rdr.GetInt32(rdr.GetOrdinal(CampaignJobFields.ClickCount));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.BounceCount)))
            {
                obj.BounceCount = rdr.GetInt32(rdr.GetOrdinal(CampaignJobFields.BounceCount));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.OptoutCount)))
            {
                obj.OptoutCount = rdr.GetInt32(rdr.GetOrdinal(CampaignJobFields.OptoutCount));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.SendType)))
            {
                obj.SendType = rdr.GetString(rdr.GetOrdinal(CampaignJobFields.SendType));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.TotalRecipients)))
            {
                obj.TotalRecipients = rdr.GetInt32(rdr.GetOrdinal(CampaignJobFields.TotalRecipients));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.UnSubscribeCount)))
            {
                obj.UnSubscribeCount = rdr.GetInt32(rdr.GetOrdinal(CampaignJobFields.UnSubscribeCount));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.StartTime)))
            {
                obj.StartTime = rdr.GetDateTime(rdr.GetOrdinal(CampaignJobFields.StartTime));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.CompletionTime)))
            {
                obj.CompletionTime = rdr.GetDateTime(rdr.GetOrdinal(CampaignJobFields.CompletionTime));
            }
            if (!rdr.IsDBNull(rdr.GetOrdinal(CampaignJobFields.IsBillable)))
            {
                obj._IsBillable = rdr.GetBoolean(rdr.GetOrdinal(CampaignJobFields.IsBillable));
            }
        }