sync ok
This commit is contained in:
parent
ad0a7d6371
commit
461ea83d4a
14 changed files with 181 additions and 284 deletions
|
|
@ -2,7 +2,6 @@
|
||||||
<!--For more information on using transformations see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->
|
<!--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 xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="eDosStation.Properties.Settings.eDosConnectionString" connectionString="Data Source=HPHDB;Initial Catalog=eDosx;User ID=eDosStation;Password=Infopla+8;TrustServerCertificate=True;Application Name=eDosStation" xdt:Locator="Match(name)" xdt:Transform="Replace"/>
|
|
||||||
<add name="eDosStation.Properties.Settings.localConnectionString" connectionString="Data Source=HPHDB;Initial Catalog=eDosLocal;User ID=eDosStation;Password=Infopla+8;TrustServerCertificate=True;Application Name=eDosStation" xdt:Locator="Match(name)" xdt:Transform="Replace"/>
|
<add name="eDosStation.Properties.Settings.localConnectionString" connectionString="Data Source=HPHDB;Initial Catalog=eDosLocal;User ID=eDosStation;Password=Infopla+8;TrustServerCertificate=True;Application Name=eDosStation" xdt:Locator="Match(name)" xdt:Transform="Replace"/>
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<appSettings >
|
<appSettings >
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,6 @@
|
||||||
</sectionGroup>
|
</sectionGroup>
|
||||||
</configSections>
|
</configSections>
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="eDosStation.Properties.Settings.masterConnectionString"
|
|
||||||
connectionString="Data Source=scksrv23;Initial Catalog=master;Integrated Security=True;TrustServerCertificate=True;Application Name=eDosStation"
|
|
||||||
providerName="System.Data.SqlClient" />
|
|
||||||
<add name="eDosStation.Properties.Settings.eDosConnectionString"
|
|
||||||
connectionString="Data Source=HPHDB;Initial Catalog=eDosx;User ID=eDosStation;Password=Infopla+8;TrustServerCertificate=True;Application Name=eDosStation"
|
|
||||||
providerName="System.Data.SqlClient" />
|
|
||||||
<add name="eDosStation.Properties.Settings.localConnectionString"
|
<add name="eDosStation.Properties.Settings.localConnectionString"
|
||||||
connectionString="Data Source=HPHDB;Initial Catalog=eDosLocal;User ID=eDosStation;Password=Infopla+8;TrustServerCertificate=True;Application Name=eDosStation"
|
connectionString="Data Source=HPHDB;Initial Catalog=eDosLocal;User ID=eDosStation;Password=Infopla+8;TrustServerCertificate=True;Application Name=eDosStation"
|
||||||
providerName="System.Data.SqlClient" />
|
providerName="System.Data.SqlClient" />
|
||||||
|
|
|
||||||
|
|
@ -9,21 +9,17 @@ using System.Windows.Navigation;
|
||||||
|
|
||||||
namespace eDosStation
|
namespace eDosStation
|
||||||
{
|
{
|
||||||
public static class LocalRemote
|
public class DataInterface
|
||||||
{
|
{
|
||||||
static public int ID_Station;
|
public int ID_Station;
|
||||||
static public bool isLocal = false;
|
public bool isLocal = false;
|
||||||
static public string serverConstr;
|
private string currentConStr;
|
||||||
static public string serverTestConstr;
|
public System.Data.SqlClient.SqlConnection localConnection;
|
||||||
static public string localConstr;
|
public System.Data.SqlClient.SqlCommand VisitInitCommand;
|
||||||
static public string currentConStr;
|
|
||||||
static public System.Data.SqlClient.SqlConnection Connection;
|
|
||||||
static public System.Data.SqlClient.SqlConnection SequenceConnection;
|
|
||||||
static public System.Data.SqlClient.SqlCommand VisitInitCommand;
|
|
||||||
public static SqlCommand VisitExitCommand;
|
public static SqlCommand VisitExitCommand;
|
||||||
public static SqlCommand NextIDCommand;
|
public static SqlCommand NextIDCommand;
|
||||||
public static SqlCommand LastLocalIDCommand;
|
public static SqlCommand LastIDCommand;
|
||||||
static public DataSet1.CommentOnEventDataTable dtCOE;
|
public DataSet1.CommentOnEventDataTable dtCOE;
|
||||||
|
|
||||||
public static int? NextID()
|
public static int? NextID()
|
||||||
{
|
{
|
||||||
|
|
@ -36,62 +32,44 @@ namespace eDosStation
|
||||||
public static int? LastID()
|
public static int? LastID()
|
||||||
{
|
{
|
||||||
int? lastValue = null;
|
int? lastValue = null;
|
||||||
if (NextIDCommand.Connection.State == ConnectionState.Closed) LastLocalIDCommand.Connection.Open();
|
if (NextIDCommand.Connection.State == ConnectionState.Closed) LastIDCommand.Connection.Open();
|
||||||
lastValue = LastLocalIDCommand.ExecuteScalar() as int?;
|
lastValue = LastIDCommand.ExecuteScalar() as int?;
|
||||||
return lastValue;
|
return lastValue;
|
||||||
}
|
}
|
||||||
static public bool checkCon(bool leaveOpen = false)
|
/// <summary>
|
||||||
|
/// Check connenction. If closed then open oand optianly leave open.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="leaveOpen">If opened leave it open</param>
|
||||||
|
/// <returns>true if connection ok</returns>
|
||||||
|
public bool checkCon(bool leaveOpen = false)
|
||||||
{
|
{
|
||||||
if (Connection != null && Connection.State == System.Data.ConnectionState.Open) return true;
|
|
||||||
|
|
||||||
bool rv = false;
|
bool rv = false;
|
||||||
var cs = new System.Data.SqlClient.SqlConnectionStringBuilder(serverTestConstr);
|
if (localConnection != null && localConnection.State == System.Data.ConnectionState.Open) return true;
|
||||||
#if DEBUG
|
|
||||||
cs.ConnectTimeout = 10;
|
|
||||||
#endif
|
|
||||||
isLocal = false;
|
|
||||||
Connection = new System.Data.SqlClient.SqlConnection(cs.ConnectionString);
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Connection.Open();
|
if (localConnection == null || string.IsNullOrEmpty(localConnection.ConnectionString)) localConnection = new SqlConnection(currentConStr);
|
||||||
}
|
|
||||||
catch { }
|
localConnection.Open();
|
||||||
if (Connection.State != System.Data.ConnectionState.Open)
|
|
||||||
{
|
|
||||||
switchLocal(true); //wijzigt currentConStr als isLocal niet al gezet is.
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
currentConStr = serverConstr;
|
|
||||||
isLocal = false;
|
|
||||||
rv = true;
|
rv = true;
|
||||||
}
|
}
|
||||||
if (!rv)
|
catch (System.Exception ex)
|
||||||
try
|
{
|
||||||
{
|
System.Windows.MessageBox.Show($"Opening '{currentConStr}' error :{ex.Message}");
|
||||||
Connection.ConnectionString = currentConStr;
|
}
|
||||||
Connection.Open();
|
if (rv && !leaveOpen) localConnection?.Close();
|
||||||
rv = true;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
Connection.Dispose();
|
|
||||||
Connection = null;
|
|
||||||
}
|
|
||||||
if (rv && !leaveOpen) Connection?.Close();
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void SetStation(int curIDStation)
|
internal void SetStation(int curIDStation)
|
||||||
{
|
{
|
||||||
ID_Station = curIDStation;
|
ID_Station = curIDStation;
|
||||||
LastLocalIDCommand.Parameters["ID_Station"].Value = curIDStation;
|
LastIDCommand.Parameters["ID_Station"].Value = curIDStation;
|
||||||
VisitInitCommand.Parameters["ID_Station"].Value = curIDStation;
|
VisitInitCommand.Parameters["ID_Station"].Value = curIDStation;
|
||||||
}
|
}
|
||||||
|
|
||||||
static public void first()
|
static public void first()
|
||||||
{
|
{
|
||||||
var cb = new System.Data.SqlClient.SqlConnectionStringBuilder(Properties.Settings.Default.eDosConnectionString);
|
var cb = new System.Data.SqlClient.SqlConnectionStringBuilder(Properties.Settings.Default.localConnectionString);
|
||||||
if (string.IsNullOrEmpty(cb.Password))
|
if (string.IsNullOrEmpty(cb.Password))
|
||||||
{
|
{
|
||||||
var f = new AskPwd();
|
var f = new AskPwd();
|
||||||
|
|
@ -103,71 +81,56 @@ namespace eDosStation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static public void init()
|
private void init()
|
||||||
{
|
{
|
||||||
first();
|
first();
|
||||||
localConstr = System.Configuration.ConfigurationManager.ConnectionStrings["eDosStation.Properties.Settings.localConnectionString"].ConnectionString;
|
currentConStr = System.Configuration.ConfigurationManager.ConnectionStrings["eDosStation.Properties.Settings.localConnectionString"].ConnectionString;
|
||||||
SequenceConnection = new SqlConnection(localConstr);
|
localConnection = new SqlConnection(currentConStr);
|
||||||
NextIDCommand = new SqlCommand("SELECT NEXT VALUE FOR VisitSequence as VisitID", SequenceConnection);
|
NextIDCommand = new SqlCommand("SELECT NEXT VALUE FOR VisitSequence as VisitID", localConnection);
|
||||||
serverConstr = System.Configuration.ConfigurationManager.ConnectionStrings["eDosStation.Properties.Settings.eDosConnectionString"].ConnectionString;
|
isLocal = true;
|
||||||
var cb = new System.Data.SqlClient.SqlConnectionStringBuilder(serverConstr);
|
|
||||||
cb.ConnectTimeout = 5;
|
|
||||||
serverTestConstr = cb.ConnectionString;
|
|
||||||
checkCon(false);
|
|
||||||
MakeCommands();
|
MakeCommands();
|
||||||
|
bool rv= checkCon(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void switchLocal(bool force=false)
|
public DataInterface()
|
||||||
{
|
{
|
||||||
if (force || !isLocal)
|
init();
|
||||||
{
|
|
||||||
isLocal = true;
|
|
||||||
currentConStr = localConstr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
static void switchServer()
|
|
||||||
{
|
|
||||||
if (isLocal)
|
|
||||||
{
|
|
||||||
isLocal = false;
|
|
||||||
currentConStr = System.Configuration.ConfigurationManager.ConnectionStrings["eDosStation.Properties.Settings.eDosConnectionString"].ConnectionString;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static DataSet1TableAdapters.GetTaskInfoTableAdapter TaskInfoTa()
|
DataSet1TableAdapters.GetTaskInfoTableAdapter TaskInfoTa()
|
||||||
{
|
{
|
||||||
var ta = new DataSet1TableAdapters.GetTaskInfoTableAdapter();
|
var ta = new DataSet1TableAdapters.GetTaskInfoTableAdapter();
|
||||||
ta.Connection.ConnectionString = currentConStr;
|
ta.Connection.ConnectionString = currentConStr;
|
||||||
return ta;
|
return ta;
|
||||||
}
|
}
|
||||||
|
|
||||||
static DataSet1TableAdapters.GetTaskListTableAdapter TaskListTA()
|
DataSet1TableAdapters.GetTaskListTableAdapter TaskListTA()
|
||||||
{
|
{
|
||||||
var ta = new DataSet1TableAdapters.GetTaskListTableAdapter();
|
var ta = new DataSet1TableAdapters.GetTaskListTableAdapter();
|
||||||
ta.Connection.ConnectionString = currentConStr;
|
ta.Connection.ConnectionString = currentConStr;
|
||||||
return ta;
|
return ta;
|
||||||
}
|
}
|
||||||
|
|
||||||
static DataSet1TableAdapters.CommentOnEventTableAdapter CommentTA()
|
DataSet1TableAdapters.CommentOnEventTableAdapter CommentTA()
|
||||||
{
|
{
|
||||||
var ta = new DataSet1TableAdapters.CommentOnEventTableAdapter();
|
var ta = new DataSet1TableAdapters.CommentOnEventTableAdapter();
|
||||||
ta.Connection.ConnectionString = currentConStr;
|
ta.Connection.ConnectionString = currentConStr;
|
||||||
return ta;
|
return ta;
|
||||||
}
|
}
|
||||||
|
|
||||||
static public System.Data.SqlClient.SqlConnection getCon(bool LeaveOpen)
|
public System.Data.SqlClient.SqlConnection getCon(bool LeaveOpen)
|
||||||
{
|
{
|
||||||
checkCon(LeaveOpen);
|
checkCon(LeaveOpen);
|
||||||
return Connection;
|
return localConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MakeCommands()
|
void MakeCommands()
|
||||||
{
|
{
|
||||||
LastLocalIDCommand = new SqlCommand("VisitIDLast", SequenceConnection);
|
LastIDCommand = new SqlCommand("VisitIDLast", localConnection);
|
||||||
LastLocalIDCommand.CommandType = CommandType.StoredProcedure;
|
LastIDCommand.CommandType = CommandType.StoredProcedure;
|
||||||
var pa = new System.Data.SqlClient.SqlParameter("ID_Station", SqlDbType.Int, 4); LastLocalIDCommand.Parameters.Add(pa);
|
var pa = new System.Data.SqlClient.SqlParameter("ID_Station", SqlDbType.Int, 4); LastIDCommand.Parameters.Add(pa);
|
||||||
|
|
||||||
VisitInitCommand = new System.Data.SqlClient.SqlCommand("VisitInit", Connection);
|
VisitInitCommand = new System.Data.SqlClient.SqlCommand("VisitInit", localConnection);
|
||||||
VisitInitCommand.CommandType = System.Data.CommandType.StoredProcedure;
|
VisitInitCommand.CommandType = System.Data.CommandType.StoredProcedure;
|
||||||
pa = new System.Data.SqlClient.SqlParameter("ID_Station", SqlDbType.Int, 4); VisitInitCommand.Parameters.Add(pa);
|
pa = new System.Data.SqlClient.SqlParameter("ID_Station", SqlDbType.Int, 4); VisitInitCommand.Parameters.Add(pa);
|
||||||
pa = new System.Data.SqlClient.SqlParameter("ID_Visit", SqlDbType.Int, 4); pa.Direction = ParameterDirection.Input; VisitInitCommand.Parameters.Add(pa);
|
pa = new System.Data.SqlClient.SqlParameter("ID_Visit", SqlDbType.Int, 4); pa.Direction = ParameterDirection.Input; VisitInitCommand.Parameters.Add(pa);
|
||||||
|
|
@ -179,7 +142,7 @@ namespace eDosStation
|
||||||
pa = new System.Data.SqlClient.SqlParameter("ENTRY_EPD_CLOCK", SqlDbType.Int, 4); VisitInitCommand.Parameters.Add(pa);
|
pa = new System.Data.SqlClient.SqlParameter("ENTRY_EPD_CLOCK", SqlDbType.Int, 4); VisitInitCommand.Parameters.Add(pa);
|
||||||
pa = new System.Data.SqlClient.SqlParameter("EPDVisitID", SqlDbType.Int, 4); pa.Direction = ParameterDirection.Output; VisitInitCommand.Parameters.Add(pa);
|
pa = new System.Data.SqlClient.SqlParameter("EPDVisitID", SqlDbType.Int, 4); pa.Direction = ParameterDirection.Output; VisitInitCommand.Parameters.Add(pa);
|
||||||
|
|
||||||
VisitExitCommand = new SqlCommand("VisitExit", Connection);
|
VisitExitCommand = new SqlCommand("VisitExit", localConnection);
|
||||||
VisitExitCommand.CommandType = CommandType.StoredProcedure;
|
VisitExitCommand.CommandType = CommandType.StoredProcedure;
|
||||||
pa = new System.Data.SqlClient.SqlParameter("EPDVisitID", SqlDbType.Int, 4); VisitExitCommand.Parameters.Add(pa);
|
pa = new System.Data.SqlClient.SqlParameter("EPDVisitID", SqlDbType.Int, 4); VisitExitCommand.Parameters.Add(pa);
|
||||||
pa = new System.Data.SqlClient.SqlParameter("HP07", SqlDbType.Float); VisitExitCommand.Parameters.Add(pa);
|
pa = new System.Data.SqlClient.SqlParameter("HP07", SqlDbType.Float); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
|
@ -210,10 +173,9 @@ namespace eDosStation
|
||||||
pa = new System.Data.SqlClient.SqlParameter("errorStatus", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
pa = new System.Data.SqlClient.SqlParameter("errorStatus", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
pa = new System.Data.SqlClient.SqlParameter("operatingStatus", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
pa = new System.Data.SqlClient.SqlParameter("operatingStatus", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||||
pa = new System.Data.SqlClient.SqlParameter("EXIT_EPD_CLOCK", SqlDbType.Int, 4); VisitExitCommand.Parameters.Add(pa);
|
pa = new System.Data.SqlClient.SqlParameter("EXIT_EPD_CLOCK", SqlDbType.Int, 4); VisitExitCommand.Parameters.Add(pa);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static public void VisitExit(int EpdVisitID, EpdBaseClr.Epd2 ep)
|
public void VisitExit(int EpdVisitID, EpdBaseClr.Epd2 ep)
|
||||||
{
|
{
|
||||||
VisitExitCommand.Parameters["EPDVisitID"].Value = EpdVisitID;
|
VisitExitCommand.Parameters["EPDVisitID"].Value = EpdVisitID;
|
||||||
VisitExitCommand.Parameters["HP07"].Value = ep.Hp07;
|
VisitExitCommand.Parameters["HP07"].Value = ep.Hp07;
|
||||||
|
|
@ -258,12 +220,12 @@ namespace eDosStation
|
||||||
VisitExitCommand.Parameters["EXIT_EPD_CLOCK"].Value = ep.CountsClock;
|
VisitExitCommand.Parameters["EXIT_EPD_CLOCK"].Value = ep.CountsClock;
|
||||||
|
|
||||||
checkCon(true);
|
checkCon(true);
|
||||||
VisitExitCommand.Connection = Connection;
|
VisitExitCommand.Connection = localConnection;
|
||||||
VisitExitCommand.ExecuteNonQuery();
|
VisitExitCommand.ExecuteNonQuery();
|
||||||
Connection.Close();
|
localConnection.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
static public void FillComment()
|
public void FillComment()
|
||||||
{
|
{
|
||||||
if (dtCOE == null) dtCOE = new DataSet1.CommentOnEventDataTable();
|
if (dtCOE == null) dtCOE = new DataSet1.CommentOnEventDataTable();
|
||||||
using (var dt = new DataSet1TableAdapters.CommentOnEventTableAdapter())
|
using (var dt = new DataSet1TableAdapters.CommentOnEventTableAdapter())
|
||||||
|
|
@ -273,12 +235,12 @@ namespace eDosStation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static public DataSet1.CommentOnEventRow GetCommentOnEventRow(int id)
|
public DataSet1.CommentOnEventRow GetCommentOnEventRow(int id)
|
||||||
{
|
{
|
||||||
return dtCOE.FindByID_CommnentOnEvent(id);
|
return dtCOE.FindByID_CommnentOnEvent(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
static public void FillTaskInfo(User _User, DataSet1 dataSet1)
|
public void FillTaskInfo(User _User, DataSet1 dataSet1)
|
||||||
{
|
{
|
||||||
using (var dataSet1GetTaskInfoTableAdapter = new eDosStation.DataSet1TableAdapters.GetTaskInfoTableAdapter())
|
using (var dataSet1GetTaskInfoTableAdapter = new eDosStation.DataSet1TableAdapters.GetTaskInfoTableAdapter())
|
||||||
{
|
{
|
||||||
|
|
@ -287,19 +249,19 @@ namespace eDosStation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static public User GetUser( string CSN, string Code)
|
public User GetUser( string CSN, string Code)
|
||||||
{
|
{
|
||||||
User u = new User();
|
User u = new User();
|
||||||
object[] Values = null;
|
object[] Values = null;
|
||||||
if (int.TryParse(Code,out int PersID))
|
if (int.TryParse(Code,out int PersID))
|
||||||
using (var cmd = new SqlCommand("GetPersonInfo", Connection))
|
using (var cmd = new SqlCommand("GetPersonInfo", localConnection))
|
||||||
{
|
{
|
||||||
cmd.CommandType = System.Data.CommandType.StoredProcedure;
|
cmd.CommandType = System.Data.CommandType.StoredProcedure;
|
||||||
cmd.Parameters.AddWithValue("csn", CSN);
|
cmd.Parameters.AddWithValue("csn", CSN);
|
||||||
cmd.Parameters.AddWithValue("PersID", PersID);
|
cmd.Parameters.AddWithValue("PersID", PersID);
|
||||||
//if (!string.IsNullOrWhiteSpace(Code)) cmd.Parameters.AddWithValue("Badge", Code);
|
//if (!string.IsNullOrWhiteSpace(Code)) cmd.Parameters.AddWithValue("Badge", Code);
|
||||||
checkCon(true);
|
checkCon(true);
|
||||||
cmd.Connection = Connection;
|
cmd.Connection = localConnection;
|
||||||
var rs = cmd.ExecuteReader(System.Data.CommandBehavior.SingleRow);
|
var rs = cmd.ExecuteReader(System.Data.CommandBehavior.SingleRow);
|
||||||
if (rs.HasRows && rs.Read())
|
if (rs.HasRows && rs.Read())
|
||||||
{
|
{
|
||||||
46
eDosStation/DataSet1.Designer.cs
generated
46
eDosStation/DataSet1.Designer.cs
generated
|
|
@ -854,6 +854,7 @@ namespace eDosStation {
|
||||||
this.columnID_Task.ReadOnly = true;
|
this.columnID_Task.ReadOnly = true;
|
||||||
this.columnID_Task.Unique = true;
|
this.columnID_Task.Unique = true;
|
||||||
this.columnTask_Name.MaxLength = 2147483647;
|
this.columnTask_Name.MaxLength = 2147483647;
|
||||||
|
this.columnTaskDescription.AllowDBNull = false;
|
||||||
this.columnTaskDescription.ReadOnly = true;
|
this.columnTaskDescription.ReadOnly = true;
|
||||||
this.columnTaskDescription.MaxLength = 50;
|
this.columnTaskDescription.MaxLength = 50;
|
||||||
this.columnEPDRad.AllowDBNull = false;
|
this.columnEPDRad.AllowDBNull = false;
|
||||||
|
|
@ -1194,6 +1195,7 @@ namespace eDosStation {
|
||||||
this.columnID_Task.ReadOnly = true;
|
this.columnID_Task.ReadOnly = true;
|
||||||
this.columnID_Task.Unique = true;
|
this.columnID_Task.Unique = true;
|
||||||
this.columnTask_Name.MaxLength = 2147483647;
|
this.columnTask_Name.MaxLength = 2147483647;
|
||||||
|
this.columnTaskDescription.AllowDBNull = false;
|
||||||
this.columnTaskDescription.ReadOnly = true;
|
this.columnTaskDescription.ReadOnly = true;
|
||||||
this.columnTaskDescription.MaxLength = 50;
|
this.columnTaskDescription.MaxLength = 50;
|
||||||
this.columnEPDRad.AllowDBNull = false;
|
this.columnEPDRad.AllowDBNull = false;
|
||||||
|
|
@ -1752,12 +1754,7 @@ namespace eDosStation {
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||||
public string TaskDescription {
|
public string TaskDescription {
|
||||||
get {
|
get {
|
||||||
try {
|
return ((string)(this[this.tableGetTaskInfo.TaskDescriptionColumn]));
|
||||||
return ((string)(this[this.tableGetTaskInfo.TaskDescriptionColumn]));
|
|
||||||
}
|
|
||||||
catch (global::System.InvalidCastException e) {
|
|
||||||
throw new global::System.Data.StrongTypingException("The value for column \'TaskDescription\' in table \'GetTaskInfo\' is DBNull.", e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
this[this.tableGetTaskInfo.TaskDescriptionColumn] = value;
|
this[this.tableGetTaskInfo.TaskDescriptionColumn] = value;
|
||||||
|
|
@ -2131,18 +2128,6 @@ namespace eDosStation {
|
||||||
this[this.tableGetTaskInfo.Task_NameColumn] = global::System.Convert.DBNull;
|
this[this.tableGetTaskInfo.Task_NameColumn] = global::System.Convert.DBNull;
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
|
||||||
public bool IsTaskDescriptionNull() {
|
|
||||||
return this.IsNull(this.tableGetTaskInfo.TaskDescriptionColumn);
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
|
||||||
public void SetTaskDescriptionNull() {
|
|
||||||
this[this.tableGetTaskInfo.TaskDescriptionColumn] = global::System.Convert.DBNull;
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||||
public bool IsID_AlarmEPDNull() {
|
public bool IsID_AlarmEPDNull() {
|
||||||
|
|
@ -2461,12 +2446,7 @@ namespace eDosStation {
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||||
public string TaskDescription {
|
public string TaskDescription {
|
||||||
get {
|
get {
|
||||||
try {
|
return ((string)(this[this.tableGetTaskList.TaskDescriptionColumn]));
|
||||||
return ((string)(this[this.tableGetTaskList.TaskDescriptionColumn]));
|
|
||||||
}
|
|
||||||
catch (global::System.InvalidCastException e) {
|
|
||||||
throw new global::System.Data.StrongTypingException("The value for column \'TaskDescription\' in table \'GetTaskList\' is DBNull.", e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
this[this.tableGetTaskList.TaskDescriptionColumn] = value;
|
this[this.tableGetTaskList.TaskDescriptionColumn] = value;
|
||||||
|
|
@ -2519,18 +2499,6 @@ namespace eDosStation {
|
||||||
public void SetTask_NameNull() {
|
public void SetTask_NameNull() {
|
||||||
this[this.tableGetTaskList.Task_NameColumn] = global::System.Convert.DBNull;
|
this[this.tableGetTaskList.Task_NameColumn] = global::System.Convert.DBNull;
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
|
||||||
public bool IsTaskDescriptionNull() {
|
|
||||||
return this.IsNull(this.tableGetTaskList.TaskDescriptionColumn);
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
|
||||||
public void SetTaskDescriptionNull() {
|
|
||||||
this[this.tableGetTaskList.TaskDescriptionColumn] = global::System.Convert.DBNull;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -2987,7 +2955,7 @@ namespace eDosStation.DataSet1TableAdapters {
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||||
private void InitConnection() {
|
private void InitConnection() {
|
||||||
this._connection = new global::System.Data.SqlClient.SqlConnection();
|
this._connection = new global::System.Data.SqlClient.SqlConnection();
|
||||||
this._connection.ConnectionString = global::eDosStation.Properties.Settings.Default.eDosConnectionString;
|
this._connection.ConnectionString = global::eDosStation.Properties.Settings.Default.localConnectionString;
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
|
@ -3186,7 +3154,7 @@ namespace eDosStation.DataSet1TableAdapters {
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||||
private void InitConnection() {
|
private void InitConnection() {
|
||||||
this._connection = new global::System.Data.SqlClient.SqlConnection();
|
this._connection = new global::System.Data.SqlClient.SqlConnection();
|
||||||
this._connection.ConnectionString = global::eDosStation.Properties.Settings.Default.eDosConnectionString;
|
this._connection.ConnectionString = global::eDosStation.Properties.Settings.Default.localConnectionString;
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
|
@ -3360,7 +3328,7 @@ namespace eDosStation.DataSet1TableAdapters {
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||||
private void InitConnection() {
|
private void InitConnection() {
|
||||||
this._connection = new global::System.Data.SqlClient.SqlConnection();
|
this._connection = new global::System.Data.SqlClient.SqlConnection();
|
||||||
this._connection.ConnectionString = global::eDosStation.Properties.Settings.Default.eDosConnectionString;
|
this._connection.ConnectionString = global::eDosStation.Properties.Settings.Default.localConnectionString;
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,15 @@
|
||||||
<xs:schema id="DataSet1" targetNamespace="http://tempuri.org/DataSet1.xsd" xmlns:mstns="http://tempuri.org/DataSet1.xsd" xmlns="http://tempuri.org/DataSet1.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
|
<xs:schema id="DataSet1" targetNamespace="http://tempuri.org/DataSet1.xsd" xmlns:mstns="http://tempuri.org/DataSet1.xsd" xmlns="http://tempuri.org/DataSet1.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
|
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
|
||||||
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
<DataSource DefaultConnectionIndex="1" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||||
<Connections>
|
<Connections>
|
||||||
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="eDosConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="eDosConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.eDosStation.Properties.Settings.GlobalReference.Default.eDosConnectionString" Provider="System.Data.SqlClient" />
|
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="eDosConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="eDosConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.eDosStation.Properties.Settings.GlobalReference.Default.eDosConnectionString" Provider="System.Data.SqlClient" />
|
||||||
|
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="localConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="localConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.eDosStation.Properties.Settings.GlobalReference.Default.localConnectionString" Provider="System.Data.SqlClient" />
|
||||||
</Connections>
|
</Connections>
|
||||||
<Tables>
|
<Tables>
|
||||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="GetTaskInfoTableAdapter" GeneratorDataComponentClassName="GetTaskInfoTableAdapter" Name="GetTaskInfo" UserDataComponentName="GetTaskInfoTableAdapter">
|
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="GetTaskInfoTableAdapter" GeneratorDataComponentClassName="GetTaskInfoTableAdapter" Name="GetTaskInfo" UserDataComponentName="GetTaskInfoTableAdapter">
|
||||||
<MainSource>
|
<MainSource>
|
||||||
<DbSource ConnectionRef="eDosConnectionString (Settings)" DbObjectName="eDos.dbo.GetTaskInfo" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
|
<DbSource ConnectionRef="localConnectionString (Settings)" DbObjectName="eDosLocal.dbo.GetTaskInfo" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||||
<SelectCommand>
|
<SelectCommand>
|
||||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||||
<CommandText>dbo.GetTaskInfo</CommandText>
|
<CommandText>dbo.GetTaskInfo</CommandText>
|
||||||
|
|
@ -54,7 +55,7 @@
|
||||||
</TableAdapter>
|
</TableAdapter>
|
||||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="GetTaskListTableAdapter" GeneratorDataComponentClassName="GetTaskListTableAdapter" Name="GetTaskList" UserDataComponentName="GetTaskListTableAdapter">
|
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="GetTaskListTableAdapter" GeneratorDataComponentClassName="GetTaskListTableAdapter" Name="GetTaskList" UserDataComponentName="GetTaskListTableAdapter">
|
||||||
<MainSource>
|
<MainSource>
|
||||||
<DbSource ConnectionRef="eDosConnectionString (Settings)" DbObjectName="eDos.dbo.GetTaskList" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
|
<DbSource ConnectionRef="localConnectionString (Settings)" DbObjectName="eDosLocal.dbo.GetTaskList" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||||
<SelectCommand>
|
<SelectCommand>
|
||||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||||
<CommandText>dbo.GetTaskList</CommandText>
|
<CommandText>dbo.GetTaskList</CommandText>
|
||||||
|
|
@ -77,7 +78,7 @@
|
||||||
</TableAdapter>
|
</TableAdapter>
|
||||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CommentOnEventTableAdapter" GeneratorDataComponentClassName="CommentOnEventTableAdapter" Name="CommentOnEvent" UserDataComponentName="CommentOnEventTableAdapter">
|
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CommentOnEventTableAdapter" GeneratorDataComponentClassName="CommentOnEventTableAdapter" Name="CommentOnEvent" UserDataComponentName="CommentOnEventTableAdapter">
|
||||||
<MainSource>
|
<MainSource>
|
||||||
<DbSource ConnectionRef="eDosConnectionString (Settings)" DbObjectName="eDos.dbo.CommentOnEventSelect" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
<DbSource ConnectionRef="localConnectionString (Settings)" DbObjectName="eDosLocal.dbo.CommentOnEventSelect" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||||
<SelectCommand>
|
<SelectCommand>
|
||||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||||
<CommandText>dbo.CommentOnEventSelect</CommandText>
|
<CommandText>dbo.CommentOnEventSelect</CommandText>
|
||||||
|
|
@ -107,7 +108,7 @@
|
||||||
<xs:element name="DataSet1" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DataSet1" msprop:Generator_UserDSName="DataSet1">
|
<xs:element name="DataSet1" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DataSet1" msprop:Generator_UserDSName="DataSet1">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||||
<xs:element name="GetTaskInfo" msprop:Generator_TableClassName="GetTaskInfoDataTable" msprop:Generator_TableVarName="tableGetTaskInfo" msprop:Generator_TablePropName="GetTaskInfo" msprop:Generator_RowDeletingName="GetTaskInfoRowDeleting" msprop:Generator_RowChangingName="GetTaskInfoRowChanging" msprop:Generator_RowEvHandlerName="GetTaskInfoRowChangeEventHandler" msprop:Generator_RowDeletedName="GetTaskInfoRowDeleted" msprop:Generator_UserTableName="GetTaskInfo" msprop:Generator_RowChangedName="GetTaskInfoRowChanged" msprop:Generator_RowEvArgName="GetTaskInfoRowChangeEvent" msprop:Generator_RowClassName="GetTaskInfoRow">
|
<xs:element name="GetTaskInfo" msprop:Generator_TableClassName="GetTaskInfoDataTable" msprop:Generator_TableVarName="tableGetTaskInfo" msprop:Generator_RowChangedName="GetTaskInfoRowChanged" msprop:Generator_TablePropName="GetTaskInfo" msprop:Generator_RowDeletingName="GetTaskInfoRowDeleting" msprop:Generator_RowChangingName="GetTaskInfoRowChanging" msprop:Generator_RowEvHandlerName="GetTaskInfoRowChangeEventHandler" msprop:Generator_RowDeletedName="GetTaskInfoRowDeleted" msprop:Generator_RowClassName="GetTaskInfoRow" msprop:Generator_UserTableName="GetTaskInfo" msprop:Generator_RowEvArgName="GetTaskInfoRowChangeEvent">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="ID_Task" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnID_Task" msprop:Generator_ColumnPropNameInRow="ID_Task" msprop:Generator_ColumnPropNameInTable="ID_TaskColumn" msprop:Generator_UserColumnName="ID_Task" type="xs:int" />
|
<xs:element name="ID_Task" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnID_Task" msprop:Generator_ColumnPropNameInRow="ID_Task" msprop:Generator_ColumnPropNameInTable="ID_TaskColumn" msprop:Generator_UserColumnName="ID_Task" type="xs:int" />
|
||||||
|
|
@ -120,7 +121,7 @@
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="TaskDescription" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnTaskDescription" msprop:Generator_ColumnPropNameInRow="TaskDescription" msprop:Generator_ColumnPropNameInTable="TaskDescriptionColumn" msprop:Generator_UserColumnName="TaskDescription" minOccurs="0">
|
<xs:element name="TaskDescription" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnTaskDescription" msprop:Generator_ColumnPropNameInRow="TaskDescription" msprop:Generator_ColumnPropNameInTable="TaskDescriptionColumn" msprop:Generator_UserColumnName="TaskDescription">
|
||||||
<xs:simpleType>
|
<xs:simpleType>
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:string">
|
||||||
<xs:maxLength value="50" />
|
<xs:maxLength value="50" />
|
||||||
|
|
@ -169,7 +170,7 @@
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="GetTaskList" msprop:Generator_TableClassName="GetTaskListDataTable" msprop:Generator_TableVarName="tableGetTaskList" msprop:Generator_TablePropName="GetTaskList" msprop:Generator_RowDeletingName="GetTaskListRowDeleting" msprop:Generator_RowChangingName="GetTaskListRowChanging" msprop:Generator_RowEvHandlerName="GetTaskListRowChangeEventHandler" msprop:Generator_RowDeletedName="GetTaskListRowDeleted" msprop:Generator_UserTableName="GetTaskList" msprop:Generator_RowChangedName="GetTaskListRowChanged" msprop:Generator_RowEvArgName="GetTaskListRowChangeEvent" msprop:Generator_RowClassName="GetTaskListRow">
|
<xs:element name="GetTaskList" msprop:Generator_TableClassName="GetTaskListDataTable" msprop:Generator_TableVarName="tableGetTaskList" msprop:Generator_RowChangedName="GetTaskListRowChanged" msprop:Generator_TablePropName="GetTaskList" msprop:Generator_RowDeletingName="GetTaskListRowDeleting" msprop:Generator_RowChangingName="GetTaskListRowChanging" msprop:Generator_RowEvHandlerName="GetTaskListRowChangeEventHandler" msprop:Generator_RowDeletedName="GetTaskListRowDeleted" msprop:Generator_RowClassName="GetTaskListRow" msprop:Generator_UserTableName="GetTaskList" msprop:Generator_RowEvArgName="GetTaskListRowChangeEvent">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="ID_Task" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnID_Task" msprop:Generator_ColumnPropNameInRow="ID_Task" msprop:Generator_ColumnPropNameInTable="ID_TaskColumn" msprop:Generator_UserColumnName="ID_Task" type="xs:int" />
|
<xs:element name="ID_Task" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnID_Task" msprop:Generator_ColumnPropNameInRow="ID_Task" msprop:Generator_ColumnPropNameInTable="ID_TaskColumn" msprop:Generator_UserColumnName="ID_Task" type="xs:int" />
|
||||||
|
|
@ -182,7 +183,7 @@
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="TaskDescription" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnTaskDescription" msprop:Generator_ColumnPropNameInRow="TaskDescription" msprop:Generator_ColumnPropNameInTable="TaskDescriptionColumn" msprop:Generator_UserColumnName="TaskDescription" minOccurs="0">
|
<xs:element name="TaskDescription" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnTaskDescription" msprop:Generator_ColumnPropNameInRow="TaskDescription" msprop:Generator_ColumnPropNameInTable="TaskDescriptionColumn" msprop:Generator_UserColumnName="TaskDescription">
|
||||||
<xs:simpleType>
|
<xs:simpleType>
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:string">
|
||||||
<xs:maxLength value="50" />
|
<xs:maxLength value="50" />
|
||||||
|
|
@ -199,7 +200,7 @@
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="CommentOnEvent" msprop:Generator_TableClassName="CommentOnEventDataTable" msprop:Generator_TableVarName="tableCommentOnEvent" msprop:Generator_TablePropName="CommentOnEvent" msprop:Generator_RowDeletingName="CommentOnEventRowDeleting" msprop:Generator_RowChangingName="CommentOnEventRowChanging" msprop:Generator_RowEvHandlerName="CommentOnEventRowChangeEventHandler" msprop:Generator_RowDeletedName="CommentOnEventRowDeleted" msprop:Generator_UserTableName="CommentOnEvent" msprop:Generator_RowChangedName="CommentOnEventRowChanged" msprop:Generator_RowEvArgName="CommentOnEventRowChangeEvent" msprop:Generator_RowClassName="CommentOnEventRow">
|
<xs:element name="CommentOnEvent" msprop:Generator_TableClassName="CommentOnEventDataTable" msprop:Generator_TableVarName="tableCommentOnEvent" msprop:Generator_RowChangedName="CommentOnEventRowChanged" msprop:Generator_TablePropName="CommentOnEvent" msprop:Generator_RowDeletingName="CommentOnEventRowDeleting" msprop:Generator_RowChangingName="CommentOnEventRowChanging" msprop:Generator_RowEvHandlerName="CommentOnEventRowChangeEventHandler" msprop:Generator_RowDeletedName="CommentOnEventRowDeleted" msprop:Generator_RowClassName="CommentOnEventRow" msprop:Generator_UserTableName="CommentOnEvent" msprop:Generator_RowEvArgName="CommentOnEventRowChangeEvent">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="ID_CommnentOnEvent" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnID_CommnentOnEvent" msprop:Generator_ColumnPropNameInRow="ID_CommnentOnEvent" msprop:Generator_ColumnPropNameInTable="ID_CommnentOnEventColumn" msprop:Generator_UserColumnName="ID_CommnentOnEvent" type="xs:int" />
|
<xs:element name="ID_CommnentOnEvent" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnID_CommnentOnEvent" msprop:Generator_ColumnPropNameInRow="ID_CommnentOnEvent" msprop:Generator_ColumnPropNameInTable="ID_CommnentOnEventColumn" msprop:Generator_UserColumnName="ID_CommnentOnEvent" type="xs:int" />
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,8 @@ namespace eDosStation
|
||||||
int Search, UserSeconds;
|
int Search, UserSeconds;
|
||||||
Boolean Inst1 = false, Inst2 = false;
|
Boolean Inst1 = false, Inst2 = false;
|
||||||
|
|
||||||
|
private DataInterface dataInterface;
|
||||||
|
|
||||||
public static LSWDesfirePublic.CCard dfReader;
|
public static LSWDesfirePublic.CCard dfReader;
|
||||||
//System.Threading.Thread t;
|
//System.Threading.Thread t;
|
||||||
//bool nextCSN = false;
|
//bool nextCSN = false;
|
||||||
|
|
@ -41,6 +43,7 @@ namespace eDosStation
|
||||||
|
|
||||||
public EntryBadge(EpdBaseClr.Epd2 curEP, Station curStation)
|
public EntryBadge(EpdBaseClr.Epd2 curEP, Station curStation)
|
||||||
{
|
{
|
||||||
|
dataInterface = curStation.dataInterface;
|
||||||
ep=curEP;
|
ep=curEP;
|
||||||
thisStation = curStation;
|
thisStation = curStation;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
@ -126,34 +129,34 @@ namespace eDosStation
|
||||||
private void DoEPD()
|
private void DoEPD()
|
||||||
{
|
{
|
||||||
int? StationVisitID = null;
|
int? StationVisitID = null;
|
||||||
int? ID_Visit= LocalRemote.NextID();
|
int? ID_Visit= DataInterface.NextID();
|
||||||
if (ID_Visit.HasValue && LoadDoses())
|
if (ID_Visit.HasValue && LoadDoses())
|
||||||
{
|
{
|
||||||
bool isBG = (ep.epdType != 3); //3 = zwarte 0=grijs
|
bool isBG = (ep.epdType != 3); //3 = zwarte 0=grijs
|
||||||
var co = LocalRemote.getCon(true);
|
var co = dataInterface.getCon(true);
|
||||||
LocalRemote.VisitInitCommand.Connection = co;
|
dataInterface.VisitInitCommand.Connection = co;
|
||||||
LocalRemote.VisitInitCommand.Parameters["ID_Station"].Value = thisStation.ID_Station;
|
dataInterface.VisitInitCommand.Parameters["ID_Station"].Value = thisStation.ID_Station;
|
||||||
LocalRemote.VisitInitCommand.Parameters["ID_Visit"].Value = ID_Visit;
|
dataInterface.VisitInitCommand.Parameters["ID_Visit"].Value = ID_Visit;
|
||||||
LocalRemote.VisitInitCommand.Parameters["PersID"].Value = _User.PersID;
|
dataInterface.VisitInitCommand.Parameters["PersID"].Value = _User.PersID;
|
||||||
LocalRemote.VisitInitCommand.Parameters["ID_Task"].Value = CurTaskRow.ID_Task;
|
dataInterface.VisitInitCommand.Parameters["ID_Task"].Value = CurTaskRow.ID_Task;
|
||||||
LocalRemote.VisitInitCommand.Parameters["Inst_CODE"].Value = CurTaskRow.Inst_CODE;
|
dataInterface.VisitInitCommand.Parameters["Inst_CODE"].Value = CurTaskRow.Inst_CODE;
|
||||||
LocalRemote.VisitInitCommand.Parameters["EPD_InternalID"].Value = (int)ep.EpdID;
|
dataInterface.VisitInitCommand.Parameters["EPD_InternalID"].Value = (int)ep.EpdID;
|
||||||
LocalRemote.VisitInitCommand.Parameters["isBG"].Value = isBG;
|
dataInterface.VisitInitCommand.Parameters["isBG"].Value = isBG;
|
||||||
LocalRemote.VisitInitCommand.Parameters["ENTRY_EPD_CLOCK"].Value = ep.CountsClock;
|
dataInterface.VisitInitCommand.Parameters["ENTRY_EPD_CLOCK"].Value = ep.CountsClock;
|
||||||
|
|
||||||
|
|
||||||
using (var l = new SqlLog())
|
using (var l = new SqlLog())
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
LocalRemote.VisitInitCommand.ExecuteNonQuery();
|
dataInterface.VisitInitCommand.ExecuteNonQuery();
|
||||||
l.LogCommand(LocalRemote.VisitInitCommand);
|
l.LogCommand(dataInterface.VisitInitCommand);
|
||||||
}
|
}
|
||||||
catch (System.Exception ex)
|
catch (System.Exception ex)
|
||||||
{
|
{
|
||||||
l.LogCommand(ex.Message);
|
l.LogCommand(ex.Message);
|
||||||
MessageBox.Show(ex.Message);
|
MessageBox.Show(ex.Message);
|
||||||
}
|
}
|
||||||
StationVisitID = (int?)LocalRemote.VisitInitCommand.Parameters["EPDVisitID"].Value;
|
StationVisitID = (int?)dataInterface.VisitInitCommand.Parameters["EPDVisitID"].Value;
|
||||||
co.Close();
|
co.Close();
|
||||||
|
|
||||||
int rv = ep.PrepareForIssue();
|
int rv = ep.PrepareForIssue();
|
||||||
|
|
@ -266,7 +269,7 @@ namespace eDosStation
|
||||||
public string getCommentUnknown()
|
public string getCommentUnknown()
|
||||||
{
|
{
|
||||||
StringBuilder res = new StringBuilder();
|
StringBuilder res = new StringBuilder();
|
||||||
var r = LocalRemote.GetCommentOnEventRow(3);
|
var r = dataInterface.GetCommentOnEventRow(3);
|
||||||
res.AppendLine(r.Comment_NL).Replace("\\n", "\n");
|
res.AppendLine(r.Comment_NL).Replace("\\n", "\n");
|
||||||
res.AppendLine("---");
|
res.AppendLine("---");
|
||||||
res.AppendLine(r.Comment_FR).Replace("\\n", "\n");
|
res.AppendLine(r.Comment_FR).Replace("\\n", "\n");
|
||||||
|
|
@ -280,7 +283,7 @@ namespace eDosStation
|
||||||
{
|
{
|
||||||
string res=string.Empty;
|
string res=string.Empty;
|
||||||
if (!string.IsNullOrWhiteSpace(prefix)) res = prefix + "\n";
|
if (!string.IsNullOrWhiteSpace(prefix)) res = prefix + "\n";
|
||||||
var r = LocalRemote.GetCommentOnEventRow(id);
|
var r = dataInterface.GetCommentOnEventRow(id);
|
||||||
string l = _User?.Language ?? "E";
|
string l = _User?.Language ?? "E";
|
||||||
if (r!=null)
|
if (r!=null)
|
||||||
switch (l)
|
switch (l)
|
||||||
|
|
@ -356,14 +359,14 @@ namespace eDosStation
|
||||||
{
|
{
|
||||||
Naam.Text = _User.FirstName + " " + _User.LastName;
|
Naam.Text = _User.FirstName + " " + _User.LastName;
|
||||||
eDosStation.DataSet1 dataSet1 = ((eDosStation.DataSet1)(this.FindResource("dataSet1")));
|
eDosStation.DataSet1 dataSet1 = ((eDosStation.DataSet1)(this.FindResource("dataSet1")));
|
||||||
LocalRemote.FillTaskInfo(_User, dataSet1);
|
dataInterface.FillTaskInfo(_User, dataSet1);
|
||||||
tbTask.IsSelected = true;
|
tbTask.IsSelected = true;
|
||||||
bool isAlara = (cbAlara.IsChecked == true);
|
bool isAlara = (cbAlara.IsChecked == true);
|
||||||
SetFilter(isAlara);
|
SetFilter(isAlara);
|
||||||
}
|
}
|
||||||
void CheckBadge()
|
void CheckBadge()
|
||||||
{
|
{
|
||||||
_User = LocalRemote.GetUser(CSN.Text, Code.Text);
|
_User = dataInterface.GetUser(CSN.Text, Code.Text);
|
||||||
ShowUserInfo(); //AskTask();
|
ShowUserInfo(); //AskTask();
|
||||||
}
|
}
|
||||||
public void showBadge(int persID, string csn)
|
public void showBadge(int persID, string csn)
|
||||||
|
|
@ -492,7 +495,7 @@ namespace eDosStation
|
||||||
private void BTestPerson_Click(object sender, RoutedEventArgs e)
|
private void BTestPerson_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Button b = sender as Button;
|
Button b = sender as Button;
|
||||||
_User = LocalRemote.GetUser("TP"+b.Tag.ToString().ToUpper(), "");
|
_User = dataInterface.GetUser("TP"+b.Tag.ToString().ToUpper(), "");
|
||||||
ShowUserInfo(); //AskTask();
|
ShowUserInfo(); //AskTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -530,7 +533,7 @@ namespace eDosStation
|
||||||
}
|
}
|
||||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
LocalRemote.checkCon();
|
dataInterface.checkCon();
|
||||||
EpdFound = false;
|
EpdFound = false;
|
||||||
initialising = true;
|
initialising = true;
|
||||||
tbEntry.IsSelected = true;
|
tbEntry.IsSelected = true;
|
||||||
|
|
@ -548,7 +551,7 @@ namespace eDosStation
|
||||||
cbInst2.IsChecked = Inst2;
|
cbInst2.IsChecked = Inst2;
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalRemote.FillComment();
|
dataInterface.FillComment();
|
||||||
|
|
||||||
//string TestCSN = null; // thisStation.TestCSN;
|
//string TestCSN = null; // thisStation.TestCSN;
|
||||||
initialising = false;
|
initialising = false;
|
||||||
|
|
@ -568,9 +571,9 @@ namespace eDosStation
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringBuilder er = new StringBuilder($"Badgelezer \"{thisStation.Reader}\" niet gevonden!.\nDeze zijn beschikbaar:\n");
|
StringBuilder er = new StringBuilder($"Badgelezer \"{thisStation.Reader}\" niet gevonden!.\nDeze lezers zijn beschikbaar:\n");
|
||||||
dfReader.GetReaderList();
|
dfReader.GetReaderList();
|
||||||
foreach (string r in dfReader.readersList) er.AppendLine(r);
|
foreach (string r in dfReader.readersList) er.AppendLine($"-> {r}");
|
||||||
MessageBox.Show(er.ToString(), "Badge Lezer", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
MessageBox.Show(er.ToString(), "Badge Lezer", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||||
dfReader.Dispose(); dfReader = null;
|
dfReader.Dispose(); dfReader = null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ namespace eDosStation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class EpdExit: Window
|
public partial class EpdExit: Window
|
||||||
{
|
{
|
||||||
|
DataInterface dataInterface;
|
||||||
Station thisStation;
|
Station thisStation;
|
||||||
EpdBaseClr.Epd2 ep;
|
EpdBaseClr.Epd2 ep;
|
||||||
bool EpdFound = false;
|
bool EpdFound = false;
|
||||||
|
|
@ -38,6 +39,7 @@ namespace eDosStation
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
ep = curEP;
|
ep = curEP;
|
||||||
thisStation = curStation;
|
thisStation = curStation;
|
||||||
|
dataInterface = curStation.dataInterface;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ShowAlarm()
|
private void ShowAlarm()
|
||||||
|
|
@ -142,8 +144,8 @@ namespace eDosStation
|
||||||
var l = new SqlLog();
|
var l = new SqlLog();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
LocalRemote.VisitExit(EpdVisitID, ep);
|
dataInterface.VisitExit(EpdVisitID, ep);
|
||||||
l.LogCommand(LocalRemote.VisitExitCommand);
|
l.LogCommand(DataInterface.VisitExitCommand);
|
||||||
}
|
}
|
||||||
catch (System.Exception ex)
|
catch (System.Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,9 @@ namespace eDosStation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class MainWindow : Window
|
public partial class MainWindow : Window
|
||||||
{
|
{
|
||||||
public Station thisStation ;
|
public DataInterface dataInterface;
|
||||||
public EpdBaseClr.Epd2 ep=null;
|
public Station thisStation;
|
||||||
|
public EpdBaseClr.Epd2 ep = null;
|
||||||
|
|
||||||
#if SimulateEPD
|
#if SimulateEPD
|
||||||
public SimulateData simulData = new SimulateData();
|
public SimulateData simulData = new SimulateData();
|
||||||
|
|
@ -59,14 +60,14 @@ namespace eDosStation
|
||||||
|
|
||||||
private void MenuItem_Click(object sender, RoutedEventArgs e)
|
private void MenuItem_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Settings s = new Settings();
|
Settings s = new Settings( thisStation);
|
||||||
s.ShowDialog();
|
s.ShowDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void setLocalStatus()
|
private void setLocalStatus()
|
||||||
{
|
{
|
||||||
if (LocalRemote.isLocal)
|
if (dataInterface.isLocal)
|
||||||
{
|
{
|
||||||
Status.Content = "*** Offline ***";
|
Status.Content = "*** Offline ***";
|
||||||
Status.Foreground = Brushes.Yellow;
|
Status.Foreground = Brushes.Yellow;
|
||||||
|
|
@ -79,75 +80,73 @@ namespace eDosStation
|
||||||
Status.Background = Brushes.White;
|
Status.Background = Brushes.White;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setErrorStatus(string errMsg)
|
||||||
|
{
|
||||||
|
Status.Content = $"*** Error {errMsg} ***";
|
||||||
|
Status.Foreground = Brushes.Yellow;
|
||||||
|
Status.Background = Brushes.Red;
|
||||||
|
}
|
||||||
|
|
||||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var cb = new System.Data.SqlClient.SqlConnectionStringBuilder(Properties.Settings.Default.eDosConnectionString);
|
bool ok = true;
|
||||||
if (string.IsNullOrEmpty(cb.Password))
|
string errMsg = string.Empty;
|
||||||
{
|
|
||||||
var f = new AskPwd();
|
|
||||||
f.ShowDialog();
|
|
||||||
string pwd = f.ResponseText;
|
|
||||||
string cfg = System.IO.Path.Combine(Environment.CurrentDirectory, System.AppDomain.CurrentDomain.FriendlyName);
|
|
||||||
Config.ToggleConfigEncryption(cfg, pwd);
|
|
||||||
Close();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bool ok = true;
|
|
||||||
LocalRemote.init();
|
|
||||||
|
|
||||||
|
dataInterface = new DataInterface();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
thisStation = new Station(dataInterface, string.Empty);
|
||||||
|
}
|
||||||
|
catch (System.Exception ex)
|
||||||
|
{
|
||||||
|
errMsg = $"Startup error {ex.Message} ";
|
||||||
|
MessageBox.Show(errMsg);
|
||||||
|
ok = false;
|
||||||
|
}
|
||||||
|
if (ok && thisStation.Error > 0)
|
||||||
|
{
|
||||||
|
errMsg = $"Startup error {thisStation.ErrorMessage} ";
|
||||||
|
MessageBox.Show(errMsg);
|
||||||
|
ok = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ok)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
thisStation = new Station(string.Empty);
|
//var sp = new System.IO.Ports.SerialPort($"com{thisStation.ComPort}");
|
||||||
LocalRemote.SetStation(thisStation.ID_Station);
|
//sp.BaudRate = 9600;
|
||||||
|
//sp.Parity = System.IO.Ports.Parity.None;
|
||||||
|
//sp.StopBits = System.IO.Ports.StopBits.One;
|
||||||
|
//sp.Open();
|
||||||
|
//sp.DiscardInBuffer();
|
||||||
|
//sp.Close();
|
||||||
|
#if SimulateEPD
|
||||||
|
thisStation.ComPort = 0;
|
||||||
|
#endif
|
||||||
|
ep = new EpdBaseClr.Epd2(thisStation.ComPort);
|
||||||
}
|
}
|
||||||
catch (System.Exception ex)
|
catch (System.Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show($"Startup error {ex.Message} ");
|
errMsg = $"Edp software error {ex.Message}";
|
||||||
|
MessageBox.Show(errMsg);
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
if (ok && thisStation.Error > 0)
|
if (ok)
|
||||||
|
{
|
||||||
|
if (thisStation.insComments.Length > 2)
|
||||||
{
|
{
|
||||||
MessageBox.Show($"Startup error {thisStation.ErrorMessage} ");
|
InstMessage w = new InstMessage(thisStation.tbComments);
|
||||||
ok = false;
|
w.ShowDialog();
|
||||||
|
ibComment.Child = thisStation.tbComments;
|
||||||
|
ibComment.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (ok)
|
ibComment.Visibility = Visibility.Hidden;
|
||||||
try
|
setLocalStatus();
|
||||||
{
|
|
||||||
//var sp = new System.IO.Ports.SerialPort($"com{thisStation.ComPort}");
|
|
||||||
//sp.BaudRate = 9600;
|
|
||||||
//sp.Parity = System.IO.Ports.Parity.None;
|
|
||||||
//sp.StopBits = System.IO.Ports.StopBits.One;
|
|
||||||
//sp.Open();
|
|
||||||
//sp.DiscardInBuffer();
|
|
||||||
//sp.Close();
|
|
||||||
#if SimulateEPD
|
|
||||||
thisStation.ComPort = 0;
|
|
||||||
#endif
|
|
||||||
ep = new EpdBaseClr.Epd2(thisStation.ComPort);
|
|
||||||
}
|
|
||||||
catch (System.Exception ex)
|
|
||||||
{
|
|
||||||
MessageBox.Show($"Edp software error {ex.Message}");
|
|
||||||
ok = false;
|
|
||||||
}
|
|
||||||
if (ok)
|
|
||||||
{
|
|
||||||
if (thisStation.insComments.Length > 2)
|
|
||||||
{
|
|
||||||
InstMessage w = new InstMessage(thisStation.tbComments);
|
|
||||||
w.ShowDialog();
|
|
||||||
ibComment.Child = thisStation.tbComments;
|
|
||||||
ibComment.Visibility = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ibComment.Visibility = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
// nog niet in db
|
|
||||||
|
|
||||||
}
|
}
|
||||||
setLocalStatus();
|
else
|
||||||
|
setErrorStatus(errMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MEnc_Click(object sender, RoutedEventArgs e)
|
private void MEnc_Click(object sender, RoutedEventArgs e)
|
||||||
|
|
|
||||||
22
eDosStation/Properties/Settings.Designer.cs
generated
22
eDosStation/Properties/Settings.Designer.cs
generated
|
|
@ -107,28 +107,6 @@ namespace eDosStation.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=scksrv23;Initial Catalog=master;Integrated Security=True;TrustServerC" +
|
|
||||||
"ertificate=True;Application Name=eDosStation")]
|
|
||||||
public string masterConnectionString {
|
|
||||||
get {
|
|
||||||
return ((string)(this["masterConnectionString"]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[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=eDosx;User ID=eDosStation;Password=Infopla+8;Tr" +
|
|
||||||
"ustServerCertificate=True;Application Name=eDosStation")]
|
|
||||||
public string eDosConnectionString {
|
|
||||||
get {
|
|
||||||
return ((string)(this["eDosConnectionString"]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
|
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
|
||||||
|
|
|
||||||
|
|
@ -23,22 +23,6 @@
|
||||||
<Setting Name="useTestButtons" Type="System.Boolean" Scope="User">
|
<Setting Name="useTestButtons" Type="System.Boolean" Scope="User">
|
||||||
<Value Profile="(Default)">True</Value>
|
<Value Profile="(Default)">True</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="masterConnectionString" 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=scksrv23;Initial Catalog=master;Integrated Security=True;TrustServerCertificate=True;Application Name=eDosStation</ConnectionString>
|
|
||||||
<ProviderName>System.Data.SqlClient</ProviderName>
|
|
||||||
</SerializableConnectionString></DesignTimeValue>
|
|
||||||
<Value Profile="(Default)">Data Source=scksrv23;Initial Catalog=master;Integrated Security=True;TrustServerCertificate=True;Application Name=eDosStation</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="eDosConnectionString" 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=eDosx;User ID=eDosStation;Password=Infopla+8;TrustServerCertificate=True;Application Name=eDosStation</ConnectionString>
|
|
||||||
<ProviderName>System.Data.SqlClient</ProviderName>
|
|
||||||
</SerializableConnectionString></DesignTimeValue>
|
|
||||||
<Value Profile="(Default)">Data Source=HPHDB;Initial Catalog=eDosx;User ID=eDosStation;Password=Infopla+8;TrustServerCertificate=True;Application Name=eDosStation</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="localConnectionString" Type="(Connection string)" Scope="Application">
|
<Setting Name="localConnectionString" Type="(Connection string)" Scope="Application">
|
||||||
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
<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">
|
<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,9 @@ namespace eDosStation
|
||||||
public partial class Settings : Window
|
public partial class Settings : Window
|
||||||
{
|
{
|
||||||
Station thisStation;
|
Station thisStation;
|
||||||
public Settings()
|
public Settings( Station tStation)
|
||||||
{
|
{
|
||||||
|
thisStation = tStation;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -33,7 +34,7 @@ namespace eDosStation
|
||||||
thisStation.Inst_Name1= tInsName1.Text;
|
thisStation.Inst_Name1= tInsName1.Text;
|
||||||
thisStation.Inst_Name2 = tInsName2.Text;
|
thisStation.Inst_Name2 = tInsName2.Text;
|
||||||
thisStation.TestCSN = tTestCSN.Text;
|
thisStation.TestCSN = tTestCSN.Text;
|
||||||
thisStation.Reader = cbReaders.Text;
|
thisStation.Reader = cbReaders.Text;
|
||||||
thisStation.Update();
|
thisStation.Update();
|
||||||
this.Close();
|
this.Close();
|
||||||
if (thisStation.Error>0)
|
if (thisStation.Error>0)
|
||||||
|
|
@ -49,7 +50,6 @@ namespace eDosStation
|
||||||
|
|
||||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
thisStation = new Station(string.Empty);
|
|
||||||
tComPort.Text = thisStation.ComPort.ToString();
|
tComPort.Text = thisStation.ComPort.ToString();
|
||||||
tInsCode1.Text = thisStation.Inst_CODE1.ToString();
|
tInsCode1.Text = thisStation.Inst_CODE1.ToString();
|
||||||
tInsCode2.Text = thisStation.Inst_CODE2.ToString();
|
tInsCode2.Text = thisStation.Inst_CODE2.ToString();
|
||||||
|
|
@ -57,6 +57,7 @@ namespace eDosStation
|
||||||
tInsName2.Text = thisStation.Inst_Name2.ToString();
|
tInsName2.Text = thisStation.Inst_Name2.ToString();
|
||||||
tTestCSN.Text = thisStation.TestCSN;
|
tTestCSN.Text = thisStation.TestCSN;
|
||||||
|
|
||||||
|
bool rv = thisStation.dataInterface.checkCon(false);
|
||||||
var a = new LSWDesfirePublic.CCard();
|
var a = new LSWDesfirePublic.CCard();
|
||||||
a.GetReaderList();
|
a.GetReaderList();
|
||||||
cbReaders.Items.Clear();
|
cbReaders.Items.Clear();
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ namespace eDosStation
|
||||||
{
|
{
|
||||||
public class Station
|
public class Station
|
||||||
{
|
{
|
||||||
|
|
||||||
public int ID_Station { get; set; }
|
public int ID_Station { get; set; }
|
||||||
public int ComPort { get; set; }
|
public int ComPort { get; set; }
|
||||||
public int Inst_CODE1 { get; set; }
|
public int Inst_CODE1 { get; set; }
|
||||||
|
|
@ -27,9 +26,11 @@ namespace eDosStation
|
||||||
public string ErrorMessage;
|
public string ErrorMessage;
|
||||||
public StringBuilder insComments;
|
public StringBuilder insComments;
|
||||||
public TextBlock tbComments;
|
public TextBlock tbComments;
|
||||||
|
public DataInterface dataInterface;
|
||||||
|
|
||||||
public Station(string Station)
|
public Station(DataInterface mDataInterface, string Station)
|
||||||
{
|
{
|
||||||
|
dataInterface = mDataInterface;
|
||||||
Error = 0;
|
Error = 0;
|
||||||
ErrorMessage = string.Empty;
|
ErrorMessage = string.Empty;
|
||||||
ComPort = 0;
|
ComPort = 0;
|
||||||
|
|
@ -45,7 +46,7 @@ namespace eDosStation
|
||||||
tbComments.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
|
tbComments.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
|
||||||
tbComments.TextAlignment = System.Windows.TextAlignment.Center;
|
tbComments.TextAlignment = System.Windows.TextAlignment.Center;
|
||||||
|
|
||||||
using (var co = LocalRemote.getCon(true))
|
var co = dataInterface.getCon(true); // No dispose
|
||||||
{
|
{
|
||||||
using (var cmd = new SqlCommand("StationSettingsSelect", co))
|
using (var cmd = new SqlCommand("StationSettingsSelect", co))
|
||||||
{
|
{
|
||||||
|
|
@ -87,6 +88,7 @@ namespace eDosStation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dataInterface.SetStation(ID_Station);
|
||||||
|
|
||||||
if (Error == 0) using (var cmd2 = new SqlCommand("GetInstallationsComments", co))
|
if (Error == 0) using (var cmd2 = new SqlCommand("GetInstallationsComments", co))
|
||||||
{
|
{
|
||||||
|
|
@ -119,18 +121,17 @@ namespace eDosStation
|
||||||
ErrorMessage = ex.Message;
|
ErrorMessage = ex.Message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
co.Close();
|
co?.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Update()
|
public void Update()
|
||||||
{
|
{
|
||||||
using (var co = new SqlConnection(Properties.Settings.Default.eDosConnectionString))
|
var co = dataInterface.getCon(true);
|
||||||
{
|
{
|
||||||
using (var cmd = new SqlCommand("StationSettingsUpdate", co))
|
using (var cmd = new SqlCommand("StationSettingsUpdate", co))
|
||||||
{
|
{
|
||||||
cmd.CommandType = System.Data.CommandType.StoredProcedure;
|
cmd.CommandType = System.Data.CommandType.StoredProcedure;
|
||||||
co.Open();
|
|
||||||
cmd.Parameters.AddWithValue("ComPort", ComPort);
|
cmd.Parameters.AddWithValue("ComPort", ComPort);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(Inst_Name1) && Inst_CODE1 > 0)
|
if (!string.IsNullOrEmpty(Inst_Name1) && Inst_CODE1 > 0)
|
||||||
|
|
@ -147,6 +148,9 @@ namespace eDosStation
|
||||||
if (!string.IsNullOrEmpty(TestCSN))
|
if (!string.IsNullOrEmpty(TestCSN))
|
||||||
cmd.Parameters.AddWithValue("TestCSN", TestCSN);
|
cmd.Parameters.AddWithValue("TestCSN", TestCSN);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(Reader))
|
||||||
|
cmd.Parameters.AddWithValue("@Reader", Reader);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,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="DataInterface.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>
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,8 @@ namespace syncEdosLocal
|
||||||
foreach (DataRow rtr in dtTables.Rows)
|
foreach (DataRow rtr in dtTables.Rows)
|
||||||
{
|
{
|
||||||
ucmd.Parameters["OBJECT_ID"].Value = (int)rtr[0];
|
ucmd.Parameters["OBJECT_ID"].Value = (int)rtr[0];
|
||||||
dest = rtr[1].ToString();
|
string src=rtr[1].ToString();
|
||||||
|
dest = rtr[2].ToString();
|
||||||
var x = rtr.GetChildRows(dtActions.ParentRelations[0]);
|
var x = rtr.GetChildRows(dtActions.ParentRelations[0]);
|
||||||
Task = $"Table {dest}";
|
Task = $"Table {dest}";
|
||||||
System.Console.WriteLine($"*** Step {rtr[1].ToString()}");
|
System.Console.WriteLine($"*** Step {rtr[1].ToString()}");
|
||||||
|
|
@ -139,7 +140,7 @@ namespace syncEdosLocal
|
||||||
}
|
}
|
||||||
|
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
qry = LSWLib.SqlCommands.getColumnsQry(fromConnection, dest);
|
qry = LSWLib.SqlCommands.getColumnsQry(fromConnection, src);
|
||||||
SqlConnection[] curDests = new SqlConnection[] { toConnection };
|
SqlConnection[] curDests = new SqlConnection[] { toConnection };
|
||||||
cnt = Bulker.Execute(Task, fromConnection, curDests, qry, CommandType.Text, dest, 0, ref error, ref messages);
|
cnt = Bulker.Execute(Task, fromConnection, curDests, qry, CommandType.Text, dest, 0, ref error, ref messages);
|
||||||
ucmd.Parameters["lastRecords"].Value = cnt;
|
ucmd.Parameters["lastRecords"].Value = cnt;
|
||||||
|
|
@ -178,6 +179,7 @@ namespace syncEdosLocal
|
||||||
}
|
}
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
//Sync need both
|
||||||
var SourceCoStr = System.Configuration.ConfigurationManager.ConnectionStrings["eDosConnectionString"].ConnectionString;
|
var SourceCoStr = System.Configuration.ConfigurationManager.ConnectionStrings["eDosConnectionString"].ConnectionString;
|
||||||
var LocalCoStr = System.Configuration.ConfigurationManager.ConnectionStrings["LocalConnectionString"].ConnectionString;
|
var LocalCoStr = System.Configuration.ConfigurationManager.ConnectionStrings["LocalConnectionString"].ConnectionString;
|
||||||
spLog = new spl("SynceDosLocal");
|
spLog = new spl("SynceDosLocal");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue