public Prescription(DbDataReader dr) { GmDataReader gr = new GmDataReader(dr); int i = 0; id = dr.GetInt32(i++); patientId = dr.GetInt32(i++); prescriptionTypeId = (PrescriptionTypeId)dr.GetInt32(i++); storeProductId = dr.GetInt32(i++); dose = dr.GetDecimal(i++); multiplicity = dr.GetInt32(i++); startDate = dr.GetDateTime(i++); endDate = dr.GetDateTime(i++); duration = dr.GetInt32(i++); reanimationFlag = dr.GetBoolean(i++); }
private static int GetColumnIndex(PrescriptionTypeId prescriptionTypeId) { switch (prescriptionTypeId) { case PrescriptionTypeId.IntramuscularInjection: case PrescriptionTypeId.HypodermicInjection: return(1); case PrescriptionTypeId.Inner: return(2); case PrescriptionTypeId.Outer: return(3); } return(0); }