public static void PopulateContactInformation(ContactInformation input, System.Data.IDataReader reader) { PopulateRecord(input, reader); input.RecordId = Utilities.ToInt(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.ContactInformationId]); input.ContactTypeId = Utilities.ToInt(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.ContactTypeId]); input.FirstName = Utilities.ToString(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.FirstName]); input.LastName = Utilities.ToString(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.LastName]); input.Address = Utilities.ToString(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.Address]); input.Address2 = Utilities.ToString(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.Address2]); input.District = Utilities.ToString(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.District]); input.DistrictId = Utilities.ToNInt(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.DistrictId]); input.City = Utilities.ToString(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.City]); input.CityId = Utilities.ToNInt(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.CityId]); input.State = Utilities.ToString(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.State]); input.Postcode = Utilities.ToString(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.Postcode]); input.CountryId = Utilities.ToNInt(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.CountryId]); input.PhoneNumber = Utilities.ToString(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.PhoneNumber]); input.FaxNumber = Utilities.ToString(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.FaxNumber]); input.Email = Utilities.ToString(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.Email]); input.DoB = Utilities.ToNDateTime(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.DoB]); input.Visa = Utilities.ToString(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.Visa]); input.VisaValidFrom = Utilities.ToNDateTime(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.VisaValidFrom]); input.VisaValidTo = Utilities.ToNDateTime(reader[Mimosa.Apartment.Common.ContactInformation.ColumnNames.VisaValidTo]); }
void ucSitePicker_InitComplete(object sender, EventArgs e) { ContactInformation newContact = new ContactInformation(); ucCustomerDetails.ucCntactInfoPanel.DataContext = newContact; if (this.SiteId > 0) { ucSitePicker.SiteId = this.SiteId.Value; } }
public static ContactInformation ContactInformation(System.Data.IDataReader reader) { ContactInformation result = null; if (null != reader && reader.Read()) { result = new ContactInformation(); PopulateContactInformation(result, reader); } return result; }