-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHandler.cs
25 lines (21 loc) · 872 Bytes
/
Handler.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ControlLoopProcessFor3Rates
{
class Handler
{
private readonly SQLDA _sqlDataAccess = new SQLDA();
private readonly HistorianDA _historianDataAccess = new HistorianDA();
public void ProcessCRData(DateTime queryStart, DateTime queryEnd)
{
var modeTagsData = _sqlDataAccess.GetModeTagsToProcess();
var processedCLData = _historianDataAccess.QueryControlLoopsTagData(modeTagsData, queryStart, queryEnd);
var processedCLDataCollection = new ControlLoopDataCollection(processedCLData);
string dateId = queryStart.ToString("yyyy.MM.dd. HH:mm");
_sqlDataAccess.InsertProcessedControlLoopData(processedCLDataCollection, dateId);
}
}
}