public static void PopulateRoomType(RoomType input, System.Data.IDataReader reader) { PopulateRecord(input, reader); input.RecordId = input.RoomTypeId = Utilities.ToInt(reader[Mimosa.Apartment.Common.RoomType.ColumnNames.RoomTypeId]); input.Name = Utilities.ToString(reader[Mimosa.Apartment.Common.RoomType.ColumnNames.Name]); input.OrganisationId = Utilities.ToNInt(reader[Mimosa.Apartment.Common.RoomType.ColumnNames.OrganisationId]); input.SiteId = Utilities.ToNInt(reader[Mimosa.Apartment.Common.RoomType.ColumnNames.SiteId]); input.Description = Utilities.ToString(reader[Mimosa.Apartment.Common.RoomType.ColumnNames.Description]); input.IsLegacy = Utilities.ToBool(reader[Mimosa.Apartment.Common.RoomType.ColumnNames.IsLegacy]); }
public static RoomType RoomType(System.Data.IDataReader reader) { RoomType result = null; if (null != reader && reader.Read()) { result = new RoomType(); PopulateRoomType(result, reader); } return result; }