/// <summary> /// Returns a new ContactSupplementDetails instance filled with the DataReader's current record data /// </summary> protected virtual ContactSupplementDetails GetContactSupplementFromReader(DbDataReader reader) { ContactSupplementDetails contactSupplement = new ContactSupplementDetails(); if (reader.HasRows) { contactSupplement.ContactNo = GetReaderValue_Int32(reader, "ContactNo", 0); //From: [Table] contactSupplement.Birthday = GetReaderValue_NullableDateTime(reader, "Birthday", null); //From: [Table] contactSupplement.PartnerName = GetReaderValue_String(reader, "PartnerName", ""); //From: [Table] contactSupplement.PartnerBirthday = GetReaderValue_NullableDateTime(reader, "PartnerBirthday", null); //From: [Table] contactSupplement.Anniversary = GetReaderValue_NullableDateTime(reader, "Anniversary", null); //From: [Table] contactSupplement.NumberOfChildren = GetReaderValue_NullableInt32(reader, "NumberOfChildren", null); //From: [Table] contactSupplement.ChildName1 = GetReaderValue_String(reader, "ChildName1", ""); //From: [Table] contactSupplement.ChildBirthday1 = GetReaderValue_NullableDateTime(reader, "ChildBirthday1", null); //From: [Table] contactSupplement.ChildName2 = GetReaderValue_String(reader, "ChildName2", ""); //From: [Table] contactSupplement.ChildBirthday2 = GetReaderValue_NullableDateTime(reader, "ChildBirthday2", null); //From: [Table] contactSupplement.ChildName3 = GetReaderValue_String(reader, "ChildName3", ""); //From: [Table] contactSupplement.ChildBirthday3 = GetReaderValue_NullableDateTime(reader, "ChildBirthday3", null); //From: [Table] contactSupplement.PersonalCellphone = GetReaderValue_String(reader, "PersonalCellphone", ""); //From: [Table] contactSupplement.FavouriteSport = GetReaderValue_String(reader, "FavouriteSport", ""); //From: [Table] contactSupplement.FavouriteTeam = GetReaderValue_String(reader, "FavouriteTeam", ""); //From: [Table] contactSupplement.Hobbies = GetReaderValue_String(reader, "Hobbies", ""); //From: [Table] contactSupplement.Inactive = GetReaderValue_Boolean(reader, "Inactive", false); //From: [Table] contactSupplement.UpdatedBy = GetReaderValue_NullableInt32(reader, "UpdatedBy", null); //From: [Table] contactSupplement.DLUP = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue); //From: [Table] contactSupplement.GenderNo = GetReaderValue_NullableInt32(reader, "GenderNo", null); //From: [Table] contactSupplement.MaritalStatusNo = GetReaderValue_NullableInt32(reader, "MaritalStatusNo", null); //From: [Table] contactSupplement.ChildGenderNo1 = GetReaderValue_NullableInt32(reader, "ChildGenderNo1", null); //From: [Table] contactSupplement.ChildGenderNo2 = GetReaderValue_NullableInt32(reader, "ChildGenderNo2", null); //From: [Table] contactSupplement.ChildGenderNo3 = GetReaderValue_NullableInt32(reader, "ChildGenderNo3", null); //From: [Table] contactSupplement.MaritalStatusName = GetReaderValue_String(reader, "MaritalStatusName", ""); //From: [usp_select_ContactSupplement] } return(contactSupplement); }
/// <summary> /// Get /// Calls [usp_select_ContactSupplement] /// </summary> public static ContactSupplement Get(System.Int32?contactNo) { Rebound.GlobalTrader.DAL.ContactSupplementDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.ContactSupplement.Get(contactNo); if (objDetails == null) { return(null); } else { ContactSupplement obj = new ContactSupplement(); obj.ContactNo = objDetails.ContactNo; obj.Birthday = objDetails.Birthday; obj.PartnerName = objDetails.PartnerName; obj.PartnerBirthday = objDetails.PartnerBirthday; obj.Anniversary = objDetails.Anniversary; obj.NumberOfChildren = objDetails.NumberOfChildren; obj.ChildName1 = objDetails.ChildName1; obj.ChildBirthday1 = objDetails.ChildBirthday1; obj.ChildName2 = objDetails.ChildName2; obj.ChildBirthday2 = objDetails.ChildBirthday2; obj.ChildName3 = objDetails.ChildName3; obj.ChildBirthday3 = objDetails.ChildBirthday3; obj.PersonalCellphone = objDetails.PersonalCellphone; obj.FavouriteSport = objDetails.FavouriteSport; obj.FavouriteTeam = objDetails.FavouriteTeam; obj.Hobbies = objDetails.Hobbies; obj.Inactive = objDetails.Inactive; obj.UpdatedBy = objDetails.UpdatedBy; obj.DLUP = objDetails.DLUP; obj.GenderNo = objDetails.GenderNo; obj.MaritalStatusNo = objDetails.MaritalStatusNo; obj.ChildGenderNo1 = objDetails.ChildGenderNo1; obj.ChildGenderNo2 = objDetails.ChildGenderNo2; obj.ChildGenderNo3 = objDetails.ChildGenderNo3; obj.MaritalStatusName = objDetails.MaritalStatusName; objDetails = null; return(obj); } }