public OrderData(umbraco.DataLayer.IRecordsReader reader) { DatabaseId = reader.GetInt("id"); UniqueId = reader.GetGuid("uniqueID"); StoreAlias = reader.GetString("storeAlias"); if (!reader.IsNull("storeOrderReferenceID")) StoreOrderReferenceId = reader.GetInt("storeOrderReferenceID"); OrderReferenceNumber = reader.GetString("orderNumber"); OrderXML = reader.GetString("orderInfo"); OrderStatus = reader.GetString("orderStatus"); if (!reader.IsNull("createDate")) CreateDate = reader.GetDateTime("createDate"); if (!reader.IsNull("updateDate")) UpdateDate = reader.GetDateTime("updateDate"); if (!reader.IsNull("customerID")) CustomerId = reader.GetInt("customerID"); CustomerUsername = reader.GetString("customerUsername"); CustomerEmail = reader.GetString("customerEmail"); CustomerFirstName = reader.GetString("customerFirstName"); CustomerLastName = reader.GetString("customerLastName"); TransactionId = reader.GetString("transactionID"); }