public ScreeningBase(CU_B_SCREENING_EXT_AUS Entity) : base(Entity.ROWGUID) { CustomerCode = Entity.CUSTOMER_CODE; AppointmentId = Entity.APPOINTMENT_ID; AudiogramTypeCode = Entity.AUDIOGRAM_TYPE_CODE; ActivityDate = Entity.ACTIVITY_DATE; Freq_500_L = Entity.FREQ_500_L; Freq_500_R = Entity.FREQ_500_R; Freq_1_L = Entity.FREQ_1_L; Freq_1_R = Entity.FREQ_1_R; Freq_2_L = Entity.FREQ_2_L; Freq_2_R = Entity.FREQ_2_R; Freq_3_L = Entity.FREQ_3_L; Freq_3_R = Entity.FREQ_3_R; Freq_4_L = Entity.FREQ_4_L; Freq_4_R = Entity.FREQ_4_R; PTA1_L = Entity.PTA1_L; PTA1_R = Entity.PTA1_R; PTA2_L = Entity.PTA2_L; PTA2_R = Entity.PTA2_R; NALPHL = Entity.NALPHL; ResultCode = Entity.RESULT_CODE; ClinicianId = Entity.CLINICIAN_ID; StatusCode = Entity.STATUS_CODE; }
public void ScreeningPost([FromBody] ScreeningBase value) { if (value == null) { throw new ArgumentNullException($"Argument value cannot be null"); } CU_B_SCREENING_EXT_AUS Item = EntityMapper.CreateEntity <CU_B_SCREENING_EXT_AUS>(); EntityMapper.UpdateEntity(value, Item); DBContext.CU_B_SCREENING_EXT_AUS.Add(Item); DBContext.SaveChanges(); }
public void ScreeningPut([FromBody] ScreeningBase value) { if (value == null) { throw new ArgumentNullException($"Argument value cannot be null"); } CU_B_SCREENING_EXT_AUS Item = DBContext.CU_B_SCREENING_EXT_AUS.SingleOrDefault(E => E.ROWGUID == value.RowGuid); if (Item == null) { throw new NotFoundException($"No screening found with id:{value.RowGuid}"); } EntityMapper.UpdateEntity(value, Item); Item.DT_UPDATE = DateTime.UtcNow; Item.USERUPDATE = "Microservices"; value.SaveData <CU_B_SCREENING_EXT_AUS>(DBContext, Item); DBContext.SaveChanges(); }
public ScreeningListItem(CU_B_SCREENING_EXT_AUS Entity) : base(Entity) { AudiogramTypeDescripton = Entity.CU_S_AUDIOGRAM_TYPE?.AUDIOGRAM_TYPE_DESCR?.Trim(); }