Example #1
0
 public static void PopulateCustomer(Customer input, System.Data.IDataReader reader)
 {
     PopulateRecord(input, reader);
     input.RecordId = Utilities.ToInt(reader[Medical.Apartment.Common.Customer.ColumnNames.CustomerId]);
     input.OrganisationId = Utilities.ToInt(reader[Medical.Apartment.Common.Customer.ColumnNames.OrganisationId]);
     input.SiteId = Utilities.ToNInt(reader[Medical.Apartment.Common.Customer.ColumnNames.SiteId]);
     input.SiteName = Utilities.ToString(reader[Medical.Apartment.Common.Customer.ColumnNames.SiteName]);
     input.FirstName = Utilities.ToString(reader[Medical.Apartment.Common.Customer.ColumnNames.FirstName]);
     input.LastName = Utilities.ToString(reader[Medical.Apartment.Common.Customer.ColumnNames.LastName]);
     input.IsLegacy = Utilities.ToBool(reader[Medical.Apartment.Common.Customer.ColumnNames.IsLegacy]);
     input.Gender = Utilities.ToNInt(reader[Medical.Apartment.Common.Customer.ColumnNames.Gender]);
     input.DoB = Utilities.ToNDateTime(reader[Medical.Apartment.Common.Customer.ColumnNames.DoB]);
     input.ContactInformationId = Utilities.ToInt(reader[Medical.Apartment.Common.Customer.ColumnNames.ContactInformationId]);                        
 }
Example #2
0
        public static Customer Customer(System.Data.IDataReader reader)
        {
            Customer result = null;

            if (null != reader && reader.Read())
            {
                result = new Customer();
                PopulateCustomer(result, reader);
            }

            return result;
        }