public void AddPPMData(PPMRecord record) { const string sql = @" INSERT INTO [PPMRecord] ([PPMSectorId] ,[Timestamp] ,[Total] ,[OnTime] ,[Late] ,[CancelVeryLate] ,[Trend]) VALUES (@PPMSectorId ,@Timestamp ,@Total ,@OnTime ,@Late ,@CancelVeryLate ,@Trend)"; ExecuteNonQuery(sql, new { record.PPMSectorId, record.Timestamp, record.Total, record.OnTime, record.Late, record.CancelVeryLate, record.Trend }); }
public static PPMRecord ParsePPMOperatorRecord(dynamic sector) { var record = new PPMRecord(false); record.Code = sector.code; record.Total = DynamicToShort(sector.Total); record.OnTime = DynamicToShort(sector.OnTime); record.Late = DynamicToShort(sector.Late); record.CancelVeryLate = DynamicToShort(sector.CancelVeryLate); record.Trend = DynamicToTrend(sector.RollingPPM.trendInd); return record; }
public static PPMRecord ParsePPMNationalRecord(dynamic sector) { var record = new PPMRecord(false); record.Code = sector.sectorCode; record.Total = DynamicToShort(sector.SectorPPM.Total); record.OnTime = DynamicToShort(sector.SectorPPM.OnTime); record.Late = DynamicToShort(sector.SectorPPM.Late); record.CancelVeryLate = DynamicToShort(sector.SectorPPM.CancelVeryLate); record.Trend = DynamicToTrend(sector.SectorPPM.RollingPPM.trendInd); return record; }
public static PPMRecord ParsePPMServiceGroupRecord(dynamic sector) { var record = new PPMRecord(true); record.Code = sector.sectorCode; record.Total = DynamicToShort(sector.Total); record.OnTime = DynamicToShort(sector.OnTime); record.Late = DynamicToShort(sector.Late); record.CancelVeryLate = DynamicToShort(sector.CancelVeryLate); record.Trend = DynamicToTrend(sector.RollingPPM.trendInd); record.Name = sector.name; return record; }
private static void SavePPMData(PPMRecord record, Guid id, DateTime ts) { record.PPMSectorId = id; record.Timestamp = ts; _ppmRepository.AddPPMData(record); }