Exemple #1
0
 public InstrumentDto MapToInstrumentDto(ISurvey instrument)
 {
     return(new InstrumentDto
     {
         Name = instrument.Name,
         Id = instrument.InstrumentID,
         ServerParkName = instrument.ServerPark,
         InstallDate = instrument.InstallDate,
         Status = _statusMapper.GetInstrumentStatus(instrument).ToString(),
         DataRecordCount = GetNumberOfDataRecords(instrument as ISurvey2),
         Nodes = _nodeDtoMapper.MapToInstrumentNodeDtos(instrument.Configuration)
     });
 }
Exemple #2
0
 public CatiInstrumentDto MapToCatiInstrumentDto(ISurvey instrument, List <DateTime> surveyDays)
 {
     return(new CatiInstrumentDto
     {
         Name = instrument.Name,
         Id = instrument.InstrumentID,
         ServerParkName = instrument.ServerPark,
         InstallDate = instrument.InstallDate,
         Status = _statusMapper.GetInstrumentStatus(instrument).ToString(),
         Nodes = _nodeDtoMapper.MapToInstrumentNodeDtos(instrument.Configuration),
         DataRecordCount = GetNumberOfDataRecords(instrument as ISurvey2),
         SurveyDays = surveyDays,
         Active = SurveyIsActive(surveyDays),
         ActiveToday = SurveyIsActiveToday(surveyDays),
         DeliverData = SetDeliverDataWhichIncludesADaysGraceFromLastSurveyDay(surveyDays)
     });
 }