Ejemplo n.º 1
0
 internal static void PopulateelementFromReader(ContactMasterBase obj, IDataReader rdr)
 {
     obj.ContactId = rdr.GetInt64(rdr.GetOrdinal(ContactMasterFields.ContactId));
     if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.FirstName)))
     {
         obj.FirstName = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.FirstName));
     }
     if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.LastName)))
     {
         obj.LastName = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.LastName));
     }
     if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.IsActive)))
     {
         obj.IsActive = rdr.GetBoolean(rdr.GetOrdinal(ContactMasterFields.IsActive));
     }
     obj.EmailAddress = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.EmailAddress));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Populates the fields of a single objects from the columns found in an open reader.
        /// </summary>
        /// <param name="obj" type="ContactMaster">Object of ContactMaster to populate</param>
        /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			1/11/2010 2:53:38 PM		Created function
        /// 
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static void PopulateObjectFromReader(ContactMasterBase obj,IDataReader rdr)
        {
            obj.ContactId = rdr.GetInt64(rdr.GetOrdinal(ContactMasterFields.ContactId));
            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.ClientId)))
            {
                obj.ClientId = rdr.GetInt32(rdr.GetOrdinal(ContactMasterFields.ClientId));
            }

            obj.EmailAddress = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.EmailAddress));
            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.FirstName)))
            {
                obj.FirstName = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.FirstName));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.LastName)))
            {
                obj.LastName = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.LastName));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.Title)))
            {
                obj.Title = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.Title));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CompanyName)))
            {
                obj.CompanyName = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CompanyName));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.Address1)))
            {
                obj.Address1 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.Address1));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.Address2)))
            {
                obj.Address2 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.Address2));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.City)))
            {
                obj.City = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.City));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.State)))
            {
                obj.State = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.State));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.PostalCode)))
            {
                obj.PostalCode = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.PostalCode));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.Country)))
            {
                obj.Country = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.Country));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.WorkPhone)))
            {
                obj.WorkPhone = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.WorkPhone));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.HomePhone)))
            {
                obj.HomePhone = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.HomePhone));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.MobilePhone)))
            {
                obj.MobilePhone = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.MobilePhone));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.Fax)))
            {
                obj.Fax = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.Fax));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.MaritalStatus)))
            {
                obj.MaritalStatus = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.MaritalStatus));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.Gender)))
            {
                obj.Gender = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.Gender));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.EmailContentType)))
            {
                obj.EmailContentType = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.EmailContentType));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.LastActionType)))
            {
                obj.LastActionType = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.LastActionType));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.IsActive)))
            {
                obj.IsActive = rdr.GetBoolean(rdr.GetOrdinal(ContactMasterFields.IsActive));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.IsVerified)))
            {
                obj.IsVerified = rdr.GetBoolean(rdr.GetOrdinal(ContactMasterFields.IsVerified));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.IsDeleted)))
            {
                obj.IsDeleted = rdr.GetBoolean(rdr.GetOrdinal(ContactMasterFields.IsDeleted));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.IsOptedOut)))
            {
                obj.IsOptedOut = rdr.GetBoolean(rdr.GetOrdinal(ContactMasterFields.IsOptedOut));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CreatedDate)))
            {
                obj.CreatedDate = rdr.GetDateTime(rdr.GetOrdinal(ContactMasterFields.CreatedDate));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.ModifiedDate)))
            {
                obj.ModifiedDate = rdr.GetDateTime(rdr.GetOrdinal(ContactMasterFields.ModifiedDate));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CreatedBy)))
            {
                obj.CreatedBy = rdr.GetInt32(rdr.GetOrdinal(ContactMasterFields.CreatedBy));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.ModifiedBy)))
            {
                obj.ModifiedBy = rdr.GetInt32(rdr.GetOrdinal(ContactMasterFields.ModifiedBy));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.NewRecptTag)))
            {
                obj.NewRecptTag = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.NewRecptTag));
            }
            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.SoftBounceCount)))
            {
                obj.SoftBounceCount = rdr.GetInt32(rdr.GetOrdinal(ContactMasterFields.SoftBounceCount));
            }
            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField1)))
            {
                obj.CustomField1 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField1));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField2)))
            {
                obj.CustomField2 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField2));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField3)))
            {
                obj.CustomField3 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField3));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField4)))
            {
                obj.CustomField4 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField4));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField5)))
            {
                obj.CustomField5 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField5));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField6)))
            {
                obj.CustomField6 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField6));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField7)))
            {
                obj.CustomField7 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField7));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField8)))
            {
                obj.CustomField8 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField8));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField9)))
            {
                obj.CustomField9 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField9));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField10)))
            {
                obj.CustomField10 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField10));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField11)))
            {
                obj.CustomField11 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField11));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField12)))
            {
                obj.CustomField12 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField12));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField13)))
            {
                obj.CustomField13 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField13));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField14)))
            {
                obj.CustomField14 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField14));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField15)))
            {
                obj.CustomField15 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField15));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField16)))
            {
                obj.CustomField16 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField16));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField17)))
            {
                obj.CustomField17 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField17));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField18)))
            {
                obj.CustomField18 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField18));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField19)))
            {
                obj.CustomField19 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField19));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField20)))
            {
                obj.CustomField20 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField20));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField21)))
            {
                obj.CustomField21 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField21));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField22)))
            {
                obj.CustomField22 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField22));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField23)))
            {
                obj.CustomField23 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField23));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField24)))
            {
                obj.CustomField24 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField24));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField25)))
            {
                obj.CustomField25 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField25));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField26)))
            {
                obj.CustomField26 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField26));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField27)))
            {
                obj.CustomField27 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField27));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField28)))
            {
                obj.CustomField28 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField28));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField29)))
            {
                obj.CustomField29 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField29));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField30)))
            {
                obj.CustomField30 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField30));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField31)))
            {
                obj.CustomField31 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField31));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField32)))
            {
                obj.CustomField32 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField32));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField33)))
            {
                obj.CustomField33 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField33));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField34)))
            {
                obj.CustomField34 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField34));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField35)))
            {
                obj.CustomField35 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField35));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField36)))
            {
                obj.CustomField36 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField36));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField37)))
            {
                obj.CustomField37 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField37));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField38)))
            {
                obj.CustomField38 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField38));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField39)))
            {
                obj.CustomField39 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField39));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField40)))
            {
                obj.CustomField40 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField40));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField41)))
            {
                obj.CustomField41 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField41));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField42)))
            {
                obj.CustomField42 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField42));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField43)))
            {
                obj.CustomField43 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField43));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField44)))
            {
                obj.CustomField44 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField44));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField45)))
            {
                obj.CustomField45 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField45));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField46)))
            {
                obj.CustomField46 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField46));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField47)))
            {
                obj.CustomField47 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField47));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField48)))
            {
                obj.CustomField48 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField48));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField49)))
            {
                obj.CustomField49 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField49));
            }

            if (!rdr.IsDBNull(rdr.GetOrdinal(ContactMasterFields.CustomField50)))
            {
                obj.CustomField50 = rdr.GetString(rdr.GetOrdinal(ContactMasterFields.CustomField50));
            }
        }