diff --git a/Common/CommonConsole/CommonConsole.csproj b/Common/CommonConsole/CommonConsole.csproj
index 0ad05346..ceae4a65 100644
--- a/Common/CommonConsole/CommonConsole.csproj
+++ b/Common/CommonConsole/CommonConsole.csproj
@@ -37,6 +37,7 @@
false
+
@@ -82,7 +83,12 @@
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Common/CommonConsole/Program.cs b/Common/CommonConsole/Program.cs
index 1f5fb775..5fe318e5 100644
--- a/Common/CommonConsole/Program.cs
+++ b/Common/CommonConsole/Program.cs
@@ -3,20 +3,208 @@
using Common.Hardware.SIRT;
using Common.Hardware.SIRT.Tasks;
using Common.Hardware.WaterMeter.eRegister.Features;
- using Common.Hardware.WaterMeter.eRegister.Telegrams;
+
+ using LaaPackages.SqlClient;
+
+ using Newtonsoft.Json;
+
using System;
- using System.Net;
+ using System.Collections.Generic;
+ using System.IO;
+ using System.Linq;
using System.Net.Http;
+ using System.Runtime.Serialization;
public static partial class Program
{
+ static void Main()
+ {
+
+ }
+
+ public class Apps : Dictionary
+ {
+ private readonly Dictionary apps = new Dictionary();
+
+ [OnDeserialized]
+ private void OnDeserialized(StreamingContext _)
+ {
+ foreach (var kvp in this)
+ {
+ var app = kvp.Value;
+ app.Name = kvp.Key;
+ this.apps[app.Id] = app;
+ }
+ }
+
+ internal object GetAppName(int appId)
+ {
+ if (this.apps.TryGetValue(appId, out var app))
+ {
+ return app.Name;
+ }
+
+ return default(object);
+ }
+
+ internal object GetRegName(int appId, int regId)
+ {
+ if (this.apps.TryGetValue(appId, out var app))
+ {
+ return app.GetRegName(regId);
+ }
+
+ return default(object);
+ }
+ }
+
+ public class App
+ {
+ public int Id { get; set; }
+
+ public string Name { get; set; }
+
+ public Registers Registers { get; set; } = new Registers();
+
+ internal object GetRegName(int regId)
+ => this.Registers.GetRegName(regId);
+ }
+
+ public class Registers : Dictionary
+ {
+ private readonly Dictionary registers = new Dictionary();
+
+ internal object GetRegName(int regId)
+ {
+ if (this.registers.TryGetValue(regId, out var reg))
+ {
+ return reg.Name;
+ }
+
+ return default(object);
+ }
+
+ [OnDeserialized]
+ private void OnDeserialized(StreamingContext _)
+ {
+ foreach (var kvp in this)
+ {
+ var register = kvp.Value;
+ register.Name = kvp.Key;
+ this.registers[register.Id] = register;
+ }
+ }
+ }
+
+ public class Register
+ {
+ public int Id { get; set; }
+
+ public string Name { get; set; }
+ }
+
+ static void Main_RegHistory()
+ {
+ var json = File.ReadAllText(@"..\..\all.json");
+ var apps = JsonConvert.DeserializeObject(json);
+ var csv = new List>();
+
+ csv.Add(new List