コード例 #1
0
        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
            });
        }
コード例 #2
0
 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;
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 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;
 }
コード例 #5
0
 private static void SavePPMData(PPMRecord record, Guid id, DateTime ts)
 {
     record.PPMSectorId = id;
     record.Timestamp = ts;
     _ppmRepository.AddPPMData(record);
 }