In Progress with LocalRemote
This commit is contained in:
parent
f842e749e3
commit
a218732e81
11 changed files with 301 additions and 71 deletions
4
eDosStation/App.Debug.config
Normal file
4
eDosStation/App.Debug.config
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--For more information on using transformations see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->
|
||||||
|
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||||
|
</configuration>
|
||||||
4
eDosStation/App.Release.config
Normal file
4
eDosStation/App.Release.config
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--For more information on using transformations see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->
|
||||||
|
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||||
|
</configuration>
|
||||||
|
|
@ -12,6 +12,8 @@
|
||||||
<add name="eDosStation.Properties.Settings.eDosConnectionString"
|
<add name="eDosStation.Properties.Settings.eDosConnectionString"
|
||||||
connectionString="Data Source=HPHDB;Initial Catalog=eDos;User ID=eDosStation;Password=Infopla+8"
|
connectionString="Data Source=HPHDB;Initial Catalog=eDos;User ID=eDosStation;Password=Infopla+8"
|
||||||
providerName="System.Data.SqlClient" />
|
providerName="System.Data.SqlClient" />
|
||||||
|
<add name="eDosStation.Properties.Settings.localConnectionString"
|
||||||
|
connectionString="Data Source=HPHDB;Initial Catalog=eDosLocal;User ID=eDosStation;Password=Infopla+8" />
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
|
|
||||||
9
eDosStation/DataSet1.cs
Normal file
9
eDosStation/DataSet1.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
namespace eDosStation
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
partial class DataSet1
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -131,24 +131,16 @@ namespace eDosStation
|
||||||
{
|
{
|
||||||
bool isBG = (ep.epdType != 3); //3 = zwarte 0=grijs
|
bool isBG = (ep.epdType != 3); //3 = zwarte 0=grijs
|
||||||
int? StationVisitID = null;
|
int? StationVisitID = null;
|
||||||
using (var co = new System.Data.SqlClient.SqlConnection(Properties.Settings.Default.eDosConnectionString))
|
var co = LocalRemote.getCon();
|
||||||
{
|
LocalRemote.VisitInitCommand.Parameters["ID_Station"].Value = thisStation.ID_Station;
|
||||||
using (var cmd1 = new SqlCommand("VisitInit", co))
|
LocalRemote.VisitInitCommand.Parameters["PersID"].Value = _User.PersID;
|
||||||
{
|
LocalRemote.VisitInitCommand.Parameters["ID_Task"].Value = CurTaskRow.ID_Task;
|
||||||
cmd1.CommandType = CommandType.StoredProcedure;
|
LocalRemote.VisitInitCommand.Parameters["Inst_CODE"].Value = CurTaskRow.Inst_CODE;
|
||||||
var pa = new SqlParameter("ID_Station", SqlDbType.Int, 4); pa.Value = thisStation.ID_Station; cmd1.Parameters.Add(pa);
|
LocalRemote.VisitInitCommand.Parameters["EPD_InternalID"].Value = (int)ep.EpdID;
|
||||||
pa = new SqlParameter("PersID", SqlDbType.Int, 4); pa.Value = _User.PersID; cmd1.Parameters.Add(pa);
|
LocalRemote.VisitInitCommand.Parameters["isBG"].Value = isBG;
|
||||||
pa = new SqlParameter("ID_Task", SqlDbType.Int, 4); pa.Value = CurTaskRow.ID_Task; cmd1.Parameters.Add(pa);
|
LocalRemote.VisitInitCommand.ExecuteNonQuery();
|
||||||
pa = new SqlParameter("Inst_CODE", SqlDbType.Int, 4); pa.Value = CurTaskRow.Inst_CODE; cmd1.Parameters.Add(pa);
|
StationVisitID = (int?)LocalRemote.VisitInitCommand.Parameters["EPDVisitID"].Value;
|
||||||
pa = new SqlParameter("EPD_InternalID", SqlDbType.Int, 4); pa.Value = (int)ep.EpdID; cmd1.Parameters.Add(pa);
|
co.Close();
|
||||||
pa = new SqlParameter("isBG", SqlDbType.Bit, 4); pa.Value = isBG; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("EPDVisitID", SqlDbType.Int, 4); pa.Direction = ParameterDirection.Output; cmd1.Parameters.Add(pa);
|
|
||||||
co.Open();
|
|
||||||
cmd1.ExecuteNonQuery();
|
|
||||||
StationVisitID = (int?)cmd1.Parameters["EPDVisitID"].Value;
|
|
||||||
co.Close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int rv = ep.PrepareForIssue();
|
int rv = ep.PrepareForIssue();
|
||||||
if (rv != 1)
|
if (rv != 1)
|
||||||
|
|
@ -598,9 +590,7 @@ namespace eDosStation
|
||||||
cbInst2.IsChecked = Inst2;
|
cbInst2.IsChecked = Inst2;
|
||||||
}
|
}
|
||||||
|
|
||||||
dtCOE = new DataSet1.CommentOnEventDataTable();
|
LocalRemote.FillComment(dtCOE);
|
||||||
using (var dt = new DataSet1TableAdapters.CommentOnEventTableAdapter())
|
|
||||||
dt.Fill(dtCOE);
|
|
||||||
|
|
||||||
string TestCSN = thisStation.TestCSN;
|
string TestCSN = thisStation.TestCSN;
|
||||||
initialising = false;
|
initialising = false;
|
||||||
|
|
|
||||||
|
|
@ -116,59 +116,10 @@ namespace eDosStation
|
||||||
MessageBox.Show($"DeIssueerror {rv}");
|
MessageBox.Show($"DeIssueerror {rv}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var l = new SqlLog();
|
var l = new SqlLog();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (var co = new System.Data.SqlClient.SqlConnection(Properties.Settings.Default.eDosConnectionString))
|
LocalRemote.VisitExit(EpdVisitID, ep);
|
||||||
{
|
|
||||||
using (var cmd1 = new SqlCommand("VisitExit", co))
|
|
||||||
{
|
|
||||||
cmd1.CommandType = CommandType.StoredProcedure;
|
|
||||||
var pa = new SqlParameter("EPDVisitID", SqlDbType.Int, 4); pa.Value = EpdVisitID; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("HP07", SqlDbType.Float); pa.Value = ep.Hp07; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("HP10", SqlDbType.Float); pa.Value = ep.Hp10; cmd1.Parameters.Add(pa);
|
|
||||||
|
|
||||||
pa = new SqlParameter("Hp07Total", SqlDbType.Float); pa.Value = ep.Hp07Total; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("Hp10Total", SqlDbType.Float); pa.Value = ep.Hp10Total; cmd1.Parameters.Add(pa);
|
|
||||||
//pa = new SqlParameter("Hp07Rate", SqlDbType.Float); pa.Value = ep.Hp07Rate; cmd1.Parameters.Add(pa);
|
|
||||||
//pa = new SqlParameter("Hp10Rate", SqlDbType.Float); pa.Value = ep.Hp10Rate; cmd1.Parameters.Add(pa);
|
|
||||||
|
|
||||||
pa = new SqlParameter("Hp07Peak", SqlDbType.Float); pa.Value = ep.Hp07Peak; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("Hp10Peak", SqlDbType.Float); pa.Value = ep.Hp10Peak; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("HP07PeakTime", SqlDbType.DateTime); cmd1.Parameters.Add(pa);
|
|
||||||
if (ep.Hp07PeakTime != null) pa.Value = ep.Hp07PeakTime; else pa.Value = DBNull.Value;
|
|
||||||
pa = new SqlParameter("HP10PeakTime", SqlDbType.DateTime); cmd1.Parameters.Add(pa);
|
|
||||||
if (ep.Hp10PeakTime != null) pa.Value = ep.Hp10PeakTime; else pa.Value = DBNull.Value;
|
|
||||||
pa = new SqlParameter("K1", SqlDbType.Int); pa.Value = ep.K1; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("K2", SqlDbType.Int); pa.Value = ep.K2; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("K3", SqlDbType.Int); pa.Value = ep.K3; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("K4", SqlDbType.Int); pa.Value = ep.K4; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("K5", SqlDbType.Int); pa.Value = ep.K5; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("K6", SqlDbType.Int); pa.Value = ep.K6; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("SG", SqlDbType.Int); pa.Value = ep.SG; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("BC", SqlDbType.Int); pa.Value = ep.BC; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("FB", SqlDbType.Int); pa.Value = ep.FB; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("HG", SqlDbType.Int); pa.Value = ep.HG; cmd1.Parameters.Add(pa);
|
|
||||||
|
|
||||||
pa = new SqlParameter("QualityData", SqlDbType.Int); pa.Value = ep.QualityData; cmd1.Parameters.Add(pa);
|
|
||||||
|
|
||||||
pa = new SqlParameter("D1", SqlDbType.Int); pa.Value = ep.D1; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("D2", SqlDbType.Int); pa.Value = ep.D2; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("D3", SqlDbType.Int); pa.Value = ep.D3; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("D4", SqlDbType.Int); pa.Value = ep.D4; cmd1.Parameters.Add(pa);
|
|
||||||
|
|
||||||
pa = new SqlParameter("alarmStatus", SqlDbType.Int); pa.Value = ep.alarmStatus; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("otherAlarms", SqlDbType.Int); pa.Value = ep.otherAlarms; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("errorStatus", SqlDbType.Int); pa.Value = ep.errorStatus; cmd1.Parameters.Add(pa);
|
|
||||||
pa = new SqlParameter("operatingStatus", SqlDbType.Int); pa.Value = ep.operatingStatus; cmd1.Parameters.Add(pa);
|
|
||||||
|
|
||||||
l.LogCommand(cmd1);
|
|
||||||
co.Open();
|
|
||||||
cmd1.ExecuteNonQuery();
|
|
||||||
co.Close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (System.Exception ex)
|
catch (System.Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
225
eDosStation/LocalRemote.cs
Normal file
225
eDosStation/LocalRemote.cs
Normal file
|
|
@ -0,0 +1,225 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace eDosStation
|
||||||
|
{
|
||||||
|
public static class LocalRemote
|
||||||
|
{
|
||||||
|
static public bool isLocal = false;
|
||||||
|
static public string serverConstr;
|
||||||
|
static public string serverTestConstr;
|
||||||
|
static public string localConstr;
|
||||||
|
static public string conStr;
|
||||||
|
static public System.Data.SqlClient.SqlConnection Connection;
|
||||||
|
static public System.Data.SqlClient.SqlCommand VisitInitCommand;
|
||||||
|
public static SqlCommand VisitExitCommand;
|
||||||
|
|
||||||
|
static bool checkCon(bool leaveOpen=false)
|
||||||
|
{
|
||||||
|
if (Connection != null && Connection.State == System.Data.ConnectionState.Open) return true;
|
||||||
|
bool rv = false;
|
||||||
|
var co = new System.Data.SqlClient.SqlConnection(serverTestConstr);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
co.Open();
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
if (co.State != System.Data.ConnectionState.Open)
|
||||||
|
{
|
||||||
|
switchLocal();
|
||||||
|
co.ConnectionString = localConstr;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
isLocal = false;
|
||||||
|
conStr = serverConstr;
|
||||||
|
rv = true;
|
||||||
|
}
|
||||||
|
if (!rv)
|
||||||
|
try
|
||||||
|
{
|
||||||
|
co.Open();
|
||||||
|
isLocal = true;
|
||||||
|
conStr = localConstr;
|
||||||
|
rv = true;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
co = null; co.Dispose();
|
||||||
|
}
|
||||||
|
if (rv && !leaveOpen) co?.Close();
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
static void init()
|
||||||
|
{
|
||||||
|
serverConstr = System.Configuration.ConfigurationManager.ConnectionStrings["eDosStation.Properties.Settings.eDosConnectionString"].ConnectionString;
|
||||||
|
var cb = new System.Data.SqlClient.SqlConnectionStringBuilder(serverConstr);
|
||||||
|
cb.ConnectTimeout = 5;
|
||||||
|
serverTestConstr = cb.ConnectionString;
|
||||||
|
localConstr = System.Configuration.ConfigurationManager.ConnectionStrings["eDosStation.Properties.Settings.eDosConnectionString"].ConnectionString;
|
||||||
|
checkCon(false);
|
||||||
|
MakeCommands();
|
||||||
|
}
|
||||||
|
static void switchLocal()
|
||||||
|
{
|
||||||
|
if (!isLocal)
|
||||||
|
{
|
||||||
|
isLocal = true;
|
||||||
|
conStr = System.Configuration.ConfigurationManager.ConnectionStrings["eDosStation.Properties.Settings.localConnectionString"].ConnectionString;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
static void switchServer()
|
||||||
|
{
|
||||||
|
if (isLocal)
|
||||||
|
{
|
||||||
|
isLocal = false;
|
||||||
|
conStr = System.Configuration.ConfigurationManager.ConnectionStrings["eDosStation.Properties.Settings.eDosConnectionString"].ConnectionString;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static DataSet1TableAdapters.GetTaskInfoTableAdapter TaskInfoTa()
|
||||||
|
{
|
||||||
|
var ta = new DataSet1TableAdapters.GetTaskInfoTableAdapter();
|
||||||
|
ta.Connection.ConnectionString = conStr;
|
||||||
|
return ta;
|
||||||
|
}
|
||||||
|
|
||||||
|
static DataSet1TableAdapters.GetTaskListTableAdapter TaskListTA()
|
||||||
|
{
|
||||||
|
var ta = new DataSet1TableAdapters.GetTaskListTableAdapter();
|
||||||
|
ta.Connection.ConnectionString = conStr;
|
||||||
|
return ta;
|
||||||
|
}
|
||||||
|
|
||||||
|
static DataSet1TableAdapters.CommentOnEventTableAdapter CommentTA()
|
||||||
|
{
|
||||||
|
var ta = new DataSet1TableAdapters.CommentOnEventTableAdapter();
|
||||||
|
ta.Connection.ConnectionString = conStr;
|
||||||
|
return ta;
|
||||||
|
}
|
||||||
|
|
||||||
|
static public System.Data.SqlClient.SqlConnection getCon()
|
||||||
|
{
|
||||||
|
checkCon(true);
|
||||||
|
return Connection;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void MakeCommands ()
|
||||||
|
{
|
||||||
|
VisitInitCommand = new System.Data.SqlClient.SqlCommand("VisitInit", Connection);
|
||||||
|
VisitInitCommand.CommandType = System.Data.CommandType.StoredProcedure;
|
||||||
|
var VisitExitCommand.Parameters["ID_Station", SqlDbType.Int, 4); VisitInitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["PersID", SqlDbType.Int, 4); VisitInitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["ID_Task", SqlDbType.Int, 4); VisitInitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["Inst_CODE", SqlDbType.Int, 4); VisitInitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["EPD_InternalID", SqlDbType.Int, 4); VisitInitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["isBG", SqlDbType.Bit, 4); VisitInitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["EPDVisitID", SqlDbType.Int, 4); pa.Direction = ParameterDirection.Output; VisitInitCommand.Parameters.Add(pa);
|
||||||
|
|
||||||
|
|
||||||
|
VisitExitCommand = new SqlCommand("VisitExit", Connection);
|
||||||
|
VisitExitCommand.CommandType = CommandType.StoredProcedure;
|
||||||
|
VisitExitCommand.Parameters["EPDVisitID", SqlDbType.Int, 4); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["HP07", SqlDbType.Float); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["HP10", SqlDbType.Float); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
|
||||||
|
VisitExitCommand.Parameters["Hp07Total", SqlDbType.Float); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["Hp10Total", SqlDbType.Float); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
|
||||||
|
VisitExitCommand.Parameters["Hp07Peak", SqlDbType.Float); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["Hp10Peak", SqlDbType.Float); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["HP07PeakTime", SqlDbType.DateTime); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["HP10PeakTime", SqlDbType.DateTime); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["K1", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["K2", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["K3", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["K4", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["K5", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["K6", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["SG", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["BC", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["FB", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["HG", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
|
||||||
|
VisitExitCommand.Parameters["QualityData", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
|
||||||
|
VisitExitCommand.Parameters["D1", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["D2", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["D3", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["D4", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
|
||||||
|
VisitExitCommand.Parameters["alarmStatus", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["otherAlarms", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["errorStatus", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
VisitExitCommand.Parameters["operatingStatus", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static public void VisitExit(int EpdVisitID, EpdBaseClr.Epd2 ep)
|
||||||
|
{
|
||||||
|
VisitExitCommand.Parameters["EPDVisitID"].Value = EpdVisitID;
|
||||||
|
VisitExitCommand.Parameters["HP07"].Value = ep.Hp07;
|
||||||
|
VisitExitCommand.Parameters["HP10"].Value = ep.Hp10;
|
||||||
|
|
||||||
|
VisitExitCommand.Parameters["Hp07Total"].Value = ep.Hp07Total;
|
||||||
|
VisitExitCommand.Parameters["Hp10Total"].Value = ep.Hp10Total;
|
||||||
|
|
||||||
|
VisitExitCommand.Parameters["Hp07Peak"].Value = ep.Hp07Peak;
|
||||||
|
VisitExitCommand.Parameters["Hp10Peak"].Value = ep.Hp10Peak;
|
||||||
|
if (ep.Hp07PeakTime != null)
|
||||||
|
VisitExitCommand.Parameters["HP07PeakTime"].Value = ep.Hp07PeakTime;
|
||||||
|
else
|
||||||
|
VisitExitCommand.Parameters["HP07PeakTime"].Value = DBNull.Value;
|
||||||
|
if (ep.Hp10PeakTime != null)
|
||||||
|
VisitExitCommand.Parameters["Hp10PeakTime"].Value = ep.Hp07PeakTime;
|
||||||
|
else
|
||||||
|
VisitExitCommand.Parameters["Hp10PeakTime"].Value = DBNull.Value;
|
||||||
|
|
||||||
|
VisitExitCommand.Parameters["K1"].Value = ep.K1;
|
||||||
|
VisitExitCommand.Parameters["K2"].Value = ep.K2;
|
||||||
|
VisitExitCommand.Parameters["K3"].Value = ep.K3;
|
||||||
|
VisitExitCommand.Parameters["K4"].Value = ep.K4;
|
||||||
|
VisitExitCommand.Parameters["K5"].Value = ep.K5;
|
||||||
|
VisitExitCommand.Parameters["K6"].Value = ep.K6;
|
||||||
|
VisitExitCommand.Parameters["SG"].Value = ep.SG;
|
||||||
|
VisitExitCommand.Parameters["BC"].Value = ep.BC;
|
||||||
|
VisitExitCommand.Parameters["FB"].Value = ep.FB;
|
||||||
|
VisitExitCommand.Parameters["HG"].Value = ep.HG;
|
||||||
|
|
||||||
|
VisitExitCommand.Parameters["QualityData"].Value = ep.QualityData;
|
||||||
|
|
||||||
|
VisitExitCommand.Parameters["D1"].Value = ep.D1;
|
||||||
|
VisitExitCommand.Parameters["D2"].Value = ep.D2;
|
||||||
|
VisitExitCommand.Parameters["D3"].Value = ep.D3;
|
||||||
|
VisitExitCommand.Parameters["D4"].Value = ep.D4;
|
||||||
|
|
||||||
|
VisitExitCommand.Parameters["alarmStatus"].Value = ep.alarmStatus;
|
||||||
|
VisitExitCommand.Parameters["otherAlarms"].Value = ep.otherAlarms;
|
||||||
|
VisitExitCommand.Parameters["errorStatus"].Value = ep.errorStatus;
|
||||||
|
VisitExitCommand.Parameters["operatingStatus"].Value = ep.operatingStatus;
|
||||||
|
|
||||||
|
checkCon(true);
|
||||||
|
VisitExitCommand.ExecuteNonQuery();
|
||||||
|
Connection.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
static public void FillComment(DataSet1.CommentOnEventDataTable dtCOE)
|
||||||
|
{
|
||||||
|
if (dtCOE == null) dtCOE = new DataSet1.CommentOnEventDataTable();
|
||||||
|
using (var dt = new DataSet1TableAdapters.CommentOnEventTableAdapter())
|
||||||
|
{
|
||||||
|
dt.Connection.ConnectionString = conStr;
|
||||||
|
dt.Fill(dtCOE);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
11
eDosStation/Properties/Settings.Designer.cs
generated
11
eDosStation/Properties/Settings.Designer.cs
generated
|
|
@ -126,5 +126,16 @@ namespace eDosStation.Properties {
|
||||||
return ((string)(this["eDosConnectionString"]));
|
return ((string)(this["eDosConnectionString"]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=HPHDB;Initial Catalog=eDosLocal;User ID=eDosStation;Password=Infopla+" +
|
||||||
|
"8")]
|
||||||
|
public string localConnectionString {
|
||||||
|
get {
|
||||||
|
return ((string)(this["localConnectionString"]));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,5 +39,12 @@
|
||||||
</SerializableConnectionString></DesignTimeValue>
|
</SerializableConnectionString></DesignTimeValue>
|
||||||
<Value Profile="(Default)">Data Source=HPHDB;Initial Catalog=eDos;User ID=eDosStation;Password=Infopla+8</Value>
|
<Value Profile="(Default)">Data Source=HPHDB;Initial Catalog=eDos;User ID=eDosStation;Password=Infopla+8</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
|
<Setting Name="localConnectionString" Type="(Connection string)" Scope="Application">
|
||||||
|
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||||
|
<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<ConnectionString>Data Source=HPHDB;Initial Catalog=eDosLocal;User ID=eDosStation;Password=Infopla+8</ConnectionString>
|
||||||
|
</SerializableConnectionString></DesignTimeValue>
|
||||||
|
<Value Profile="(Default)">Data Source=HPHDB;Initial Catalog=eDosLocal;User ID=eDosStation;Password=Infopla+8</Value>
|
||||||
|
</Setting>
|
||||||
</Settings>
|
</Settings>
|
||||||
</SettingsFile>
|
</SettingsFile>
|
||||||
|
|
@ -30,6 +30,8 @@
|
||||||
<ApplicationVersion>1.0.0.5</ApplicationVersion>
|
<ApplicationVersion>1.0.0.5</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<BootstrapperEnabled>false</BootstrapperEnabled>
|
<BootstrapperEnabled>false</BootstrapperEnabled>
|
||||||
|
<NuGetPackageImportStamp>
|
||||||
|
</NuGetPackageImportStamp>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
|
@ -132,6 +134,9 @@
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Config.cs" />
|
<Compile Include="Config.cs" />
|
||||||
<Compile Include="Converters.cs" />
|
<Compile Include="Converters.cs" />
|
||||||
|
<Compile Include="DataSet1.cs">
|
||||||
|
<DependentUpon>DataSet1.xsd</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="DataSet1.Designer.cs">
|
<Compile Include="DataSet1.Designer.cs">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
|
|
@ -147,6 +152,7 @@
|
||||||
<Compile Include="InstMessage.xaml.cs">
|
<Compile Include="InstMessage.xaml.cs">
|
||||||
<DependentUpon>InstMessage.xaml</DependentUpon>
|
<DependentUpon>InstMessage.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="LocalRemote.cs" />
|
||||||
<Compile Include="Settings.cs" />
|
<Compile Include="Settings.cs" />
|
||||||
<Compile Include="Settings.xaml.cs">
|
<Compile Include="Settings.xaml.cs">
|
||||||
<DependentUpon>Settings.xaml</DependentUpon>
|
<DependentUpon>Settings.xaml</DependentUpon>
|
||||||
|
|
@ -218,6 +224,14 @@
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<None Include="App.Debug.config">
|
||||||
|
<DependentUpon>App.config</DependentUpon>
|
||||||
|
<IsTransformFile>true</IsTransformFile>
|
||||||
|
</None>
|
||||||
|
<None Include="App.Release.config">
|
||||||
|
<DependentUpon>App.config</DependentUpon>
|
||||||
|
<IsTransformFile>true</IsTransformFile>
|
||||||
|
</None>
|
||||||
<None Include="DataSet1.xsc">
|
<None Include="DataSet1.xsc">
|
||||||
<DependentUpon>DataSet1.xsd</DependentUpon>
|
<DependentUpon>DataSet1.xsd</DependentUpon>
|
||||||
</None>
|
</None>
|
||||||
|
|
@ -234,6 +248,7 @@
|
||||||
<None Include="LOG.INI">
|
<None Include="LOG.INI">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="packages.config" />
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
|
@ -242,6 +257,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="App.config">
|
<None Include="App.config">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
<TransformOnBuild>true</TransformOnBuild>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
@ -280,4 +296,11 @@
|
||||||
</BootstrapperPackage>
|
</BootstrapperPackage>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<Import Project="..\packages\Microsoft.VisualStudio.SlowCheetah.3.2.26\build\Microsoft.VisualStudio.SlowCheetah.targets" Condition="Exists('..\packages\Microsoft.VisualStudio.SlowCheetah.3.2.26\build\Microsoft.VisualStudio.SlowCheetah.targets')" />
|
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.SlowCheetah.3.2.26\build\Microsoft.VisualStudio.SlowCheetah.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.VisualStudio.SlowCheetah.3.2.26\build\Microsoft.VisualStudio.SlowCheetah.targets'))" />
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
4
eDosStation/packages.config
Normal file
4
eDosStation/packages.config
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="Microsoft.VisualStudio.SlowCheetah" version="3.2.26" targetFramework="net472" developmentDependency="true" />
|
||||||
|
</packages>
|
||||||
Loading…
Add table
Reference in a new issue