No password

This commit is contained in:
Luc Vandenbroucke 2020-02-20 15:21:50 +01:00
parent 81ab4d634c
commit 64355c82e5
21 changed files with 1086 additions and 924 deletions

View file

@ -7,7 +7,7 @@
connectionString="Data Source=sqlprdidpbw;Initial Catalog=idpbw;Integrated Security=True" connectionString="Data Source=sqlprdidpbw;Initial Catalog=idpbw;Integrated Security=True"
providerName="System.Data.SqlClient" /> providerName="System.Data.SqlClient" />
<add name="RegisterBAdge.Properties.Settings.RemsConnection" <add name="RegisterBAdge.Properties.Settings.RemsConnection"
connectionString="Data Source=sqlsrv3;Initial Catalog=HPH_REMS_new;Integrated Security=True" connectionString="Data Source=sqlsrv3;Initial Catalog=eDos;Integrated Security=True"
providerName="System.Data.SqlClient" /> providerName="System.Data.SqlClient" />
</connectionStrings> </connectionStrings>
<startup> <startup>

View file

@ -36,7 +36,8 @@ namespace RegisterBAdge.Properties {
[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)]
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=sqlsrv3;Initial Catalog=HPH_REMS_new;Integrated Security=True")] [global::System.Configuration.DefaultSettingValueAttribute("Data Source=tcp:10.2.12.200\\hph,54037;Initial Catalog=eDos;Persist Security Info=" +
"True;User ID=eDosStation;Password=Infopla+8")]
public string RemsConnection { public string RemsConnection {
get { get {
return ((string)(this["RemsConnection"])); return ((string)(this["RemsConnection"]));

View file

@ -13,10 +13,10 @@
<Setting Name="RemsConnection" Type="(Connection string)" Scope="Application"> <Setting Name="RemsConnection" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt; <DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; &lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=sqlsrv3;Initial Catalog=HPH_REMS_new;Integrated Security=True&lt;/ConnectionString&gt; &lt;ConnectionString&gt;Data Source=Data Source=tcp:10.2.12.200\hph,54037;Initial Catalog=eDos;Persist Security Info=True;User ID=eDosStation;Password=Infopla+8&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt; &lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue> &lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=sqlsrv3;Initial Catalog=HPH_REMS_new;Integrated Security=True</Value> <Value Profile="(Default)">Data Source=tcp:10.2.12.200\hph,54037;Initial Catalog=eDos;Persist Security Info=True;User ID=eDosStation;Password=Infopla+8</Value>
</Setting> </Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>

View file

@ -6,7 +6,11 @@
</sectionGroup> </sectionGroup>
</configSections> </configSections>
<connectionStrings> <connectionStrings>
<add name="eDosStation.Properties.Settings.RemoteSQL" connectionString="Data Source=tcp:10.2.12.200\sag,54037;Initial Catalog=eDos;Integrated Security=True" <add name="eDosStation.Properties.Settings.masterConnectionString"
connectionString="Data Source=scksrv23;Initial Catalog=master;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="eDosStation.Properties.Settings.eDosConnectionString"
connectionString="Data Source=tcp:10.2.12.200\hph,54037;Initial Catalog=eDos;User ID=eDosStation"
providerName="System.Data.SqlClient" /> providerName="System.Data.SqlClient" />
</connectionStrings> </connectionStrings>
<startup> <startup>

14
eDosStation/AskPwd.xaml Normal file
View file

@ -0,0 +1,14 @@
<Window x:Class="eDosStation.AskPwd"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:eDosStation"
mc:Ignorable="d"
Title="First setup" Height="300" Width="600" BorderThickness="1" ResizeMode="NoResize" ShowInTaskbar="False" Topmost="True" WindowStartupLocation="CenterScreen" >
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Sql Login Paswoord" Padding="10,10,10,10" Foreground="Red" FontWeight="Bold" FontSize="14" />
<PasswordBox x:Name="ResponseTextBox" BorderBrush="Black" Margin="10,10,10,10" />
<Button Content="OK" Click="OKButton_Click" />
</StackPanel>
</Window>

View file

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace eDosStation
{
/// <summary>
/// Interaction logic for AskPwd.xaml
/// </summary>
public partial class AskPwd : Window
{
public AskPwd()
{
InitializeComponent();
}
public string ResponseText
{
get { return ResponseTextBox.Password; }
set { ResponseTextBox.Password = value; }
}
private void OKButton_Click(object sender, System.Windows.RoutedEventArgs e)
{
DialogResult = true;
}
}
}

47
eDosStation/Config.cs Normal file
View file

@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace eDosStation
{
static class Config
{
public static void ToggleConfigEncryption(string exeConfigName, string pwd)
{
// Takes the executable file name without the
// .config extension.
try
{
var config = ConfigurationManager.OpenExeConfiguration(exeConfigName);
ConnectionStringsSection section = config.GetSection("connectionStrings") as ConnectionStringsSection;
if (section.SectionInformation.IsProtected)
{
// Remove encryption.
//section.SectionInformation.UnprotectSection();
}
else
{
var x = section.ConnectionStrings["eDosStation.Properties.Settings.eDosConnectionString"].ConnectionString;
var cb = new System.Data.SqlClient.SqlConnectionStringBuilder(x);
cb.Password = pwd;
section.ConnectionStrings["eDosStation.Properties.Settings.eDosConnectionString"].ConnectionString = cb.ConnectionString;
// Encrypt the section.
section.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
}
// Save the current configuration.
config.Save();
Console.WriteLine("Protected={0}",section.SectionInformation.IsProtected);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,11 +0,0 @@
namespace eDosStation
{
partial class DataSet1
{
partial class GetTaskListDataTable
{
}
}
}

View file

@ -4,35 +4,12 @@
<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="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<Connections> <Connections>
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="RemoteSQL" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="RemoteSQL (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.eDosStation.Properties.Settings.GlobalReference.Default.RemoteSQL" 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" />
</Connections> </Connections>
<Tables> <Tables>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="GetTaskListTableAdapter" GeneratorDataComponentClassName="GetTaskListTableAdapter" Name="GetTaskList" UserDataComponentName="GetTaskListTableAdapter">
<MainSource>
<DbSource ConnectionRef="RemoteSQL (Settings)" DbObjectName="HPH_REMS_new.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>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.GetTaskList</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="ID_Task" DataSetColumn="ID_Task" />
<Mapping SourceColumn="Task_Name" DataSetColumn="Task_Name" />
<Mapping SourceColumn="TaskDescription" DataSetColumn="TaskDescription" />
<Mapping SourceColumn="EPDRad" DataSetColumn="EPDRad" />
<Mapping SourceColumn="Inst_CODE" DataSetColumn="Inst_CODE" />
<Mapping SourceColumn="TaskType_CODE" DataSetColumn="TaskType_CODE" />
</Mappings>
<Sources />
</TableAdapter>
<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="RemoteSQL (Settings)" DbObjectName="HPH_REMS_new.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="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">
<SelectCommand> <SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false"> <DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.GetTaskInfo</CommandText> <CommandText>dbo.GetTaskInfo</CommandText>
@ -47,6 +24,8 @@
</MainSource> </MainSource>
<Mappings> <Mappings>
<Mapping SourceColumn="ID_Task" DataSetColumn="ID_Task" /> <Mapping SourceColumn="ID_Task" DataSetColumn="ID_Task" />
<Mapping SourceColumn="Inst_CODE" DataSetColumn="Inst_CODE" />
<Mapping SourceColumn="TaskType_CODE" DataSetColumn="TaskType_CODE" />
<Mapping SourceColumn="Task_Name" DataSetColumn="Task_Name" /> <Mapping SourceColumn="Task_Name" DataSetColumn="Task_Name" />
<Mapping SourceColumn="TaskDescription" DataSetColumn="TaskDescription" /> <Mapping SourceColumn="TaskDescription" DataSetColumn="TaskDescription" />
<Mapping SourceColumn="EPDRad" DataSetColumn="EPDRad" /> <Mapping SourceColumn="EPDRad" DataSetColumn="EPDRad" />
@ -67,17 +46,38 @@
<Mapping SourceColumn="FNGain_ANGainValue" DataSetColumn="FNGain_ANGainValue" /> <Mapping SourceColumn="FNGain_ANGainValue" DataSetColumn="FNGain_ANGainValue" />
<Mapping SourceColumn="InstallationActivity" DataSetColumn="InstallationActivity" /> <Mapping SourceColumn="InstallationActivity" DataSetColumn="InstallationActivity" />
<Mapping SourceColumn="Description" DataSetColumn="Description" /> <Mapping SourceColumn="Description" DataSetColumn="Description" />
<Mapping SourceColumn="Inst_CODE" DataSetColumn="Inst_CODE" /> <Mapping SourceColumn="Inst_CODE1" DataSetColumn="Inst_CODE1" />
<Mapping SourceColumn="MinWorkerDosisMargin" DataSetColumn="MinWorkerDosisMargin" /> <Mapping SourceColumn="MinWorkerDosisMargin" DataSetColumn="MinWorkerDosisMargin" />
<Mapping SourceColumn="MarginExceeded" DataSetColumn="MarginExceeded" /> <Mapping SourceColumn="MarginExceeded" DataSetColumn="MarginExceeded" />
</Mappings>
<Sources />
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="GetTaskListTableAdapter" GeneratorDataComponentClassName="GetTaskListTableAdapter" Name="GetTaskList" UserDataComponentName="GetTaskListTableAdapter">
<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">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.GetTaskList</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="ID_Task" DataSetColumn="ID_Task" />
<Mapping SourceColumn="Inst_CODE" DataSetColumn="Inst_CODE" />
<Mapping SourceColumn="TaskType_CODE" DataSetColumn="TaskType_CODE" /> <Mapping SourceColumn="TaskType_CODE" DataSetColumn="TaskType_CODE" />
<Mapping SourceColumn="Inst_CODE1" DataSetColumn="Inst_CODE1" /> <Mapping SourceColumn="Task_Name" DataSetColumn="Task_Name" />
<Mapping SourceColumn="TaskDescription" DataSetColumn="TaskDescription" />
<Mapping SourceColumn="EPDRad" DataSetColumn="EPDRad" />
</Mappings> </Mappings>
<Sources /> <Sources />
</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="RemoteSQL (Settings)" DbObjectName="HPH_REMS_new.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="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">
<SelectCommand> <SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false"> <DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.CommentOnEventSelect</CommandText> <CommandText>dbo.CommentOnEventSelect</CommandText>
@ -107,40 +107,12 @@
<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="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: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="Task_Name" msprop:Generator_ColumnVarNameInTable="columnTask_Name" msprop:Generator_ColumnPropNameInRow="Task_Name" msprop:Generator_ColumnPropNameInTable="Task_NameColumn" msprop:Generator_UserColumnName="Task_Name" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2147483647" />
</xs:restriction>
</xs:simpleType>
</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:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="EPDRad" msprop:Generator_ColumnVarNameInTable="columnEPDRad" msprop:Generator_ColumnPropNameInRow="EPDRad" msprop:Generator_ColumnPropNameInTable="EPDRadColumn" msprop:Generator_UserColumnName="EPDRad">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Inst_CODE" msprop:Generator_ColumnVarNameInTable="columnInst_CODE" msprop:Generator_ColumnPropNameInRow="Inst_CODE" msprop:Generator_ColumnPropNameInTable="Inst_CODEColumn" msprop:Generator_UserColumnName="Inst_CODE" type="xs:int" minOccurs="0" />
<xs:element name="TaskType_CODE" msprop:Generator_ColumnVarNameInTable="columnTaskType_CODE" msprop:Generator_ColumnPropNameInRow="TaskType_CODE" msprop:Generator_ColumnPropNameInTable="TaskType_CODEColumn" msprop:Generator_UserColumnName="TaskType_CODE" type="xs:int" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<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_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: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" />
<xs:element name="Inst_CODE" msprop:Generator_ColumnVarNameInTable="columnInst_CODE" msprop:Generator_ColumnPropNameInRow="Inst_CODE" msprop:Generator_ColumnPropNameInTable="Inst_CODEColumn" msprop:Generator_UserColumnName="Inst_CODE" type="xs:int" minOccurs="0" />
<xs:element name="TaskType_CODE" msprop:Generator_ColumnVarNameInTable="columnTaskType_CODE" msprop:Generator_ColumnPropNameInRow="TaskType_CODE" msprop:Generator_ColumnPropNameInTable="TaskType_CODEColumn" msprop:Generator_UserColumnName="TaskType_CODE" type="xs:int" minOccurs="0" />
<xs:element name="Task_Name" msprop:Generator_ColumnVarNameInTable="columnTask_Name" msprop:Generator_ColumnPropNameInRow="Task_Name" msprop:Generator_ColumnPropNameInTable="Task_NameColumn" msprop:Generator_UserColumnName="Task_Name" minOccurs="0"> <xs:element name="Task_Name" msprop:Generator_ColumnVarNameInTable="columnTask_Name" msprop:Generator_ColumnPropNameInRow="Task_Name" msprop:Generator_ColumnPropNameInTable="Task_NameColumn" msprop:Generator_UserColumnName="Task_Name" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
@ -191,15 +163,43 @@
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="Inst_CODE" msprop:Generator_ColumnVarNameInTable="columnInst_CODE" msprop:Generator_ColumnPropNameInRow="Inst_CODE" msprop:Generator_ColumnPropNameInTable="Inst_CODEColumn" msprop:Generator_UserColumnName="Inst_CODE" type="xs:int" minOccurs="0" /> <xs:element name="Inst_CODE1" msprop:Generator_ColumnVarNameInTable="columnInst_CODE1" msprop:Generator_ColumnPropNameInRow="Inst_CODE1" msprop:Generator_ColumnPropNameInTable="Inst_CODE1Column" msprop:Generator_UserColumnName="Inst_CODE1" type="xs:int" minOccurs="0" />
<xs:element name="MinWorkerDosisMargin" msprop:Generator_ColumnVarNameInTable="columnMinWorkerDosisMargin" msprop:Generator_ColumnPropNameInRow="MinWorkerDosisMargin" msprop:Generator_ColumnPropNameInTable="MinWorkerDosisMarginColumn" msprop:Generator_UserColumnName="MinWorkerDosisMargin" type="xs:double" minOccurs="0" /> <xs:element name="MinWorkerDosisMargin" msprop:Generator_ColumnVarNameInTable="columnMinWorkerDosisMargin" msprop:Generator_ColumnPropNameInRow="MinWorkerDosisMargin" msprop:Generator_ColumnPropNameInTable="MinWorkerDosisMarginColumn" msprop:Generator_UserColumnName="MinWorkerDosisMargin" type="xs:double" minOccurs="0" />
<xs:element name="MarginExceeded" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnMarginExceeded" msprop:Generator_ColumnPropNameInRow="MarginExceeded" msprop:Generator_ColumnPropNameInTable="MarginExceededColumn" msprop:Generator_UserColumnName="MarginExceeded" type="xs:boolean" minOccurs="0" /> <xs:element name="MarginExceeded" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnMarginExceeded" msprop:Generator_ColumnPropNameInRow="MarginExceeded" msprop:Generator_ColumnPropNameInTable="MarginExceededColumn" msprop:Generator_UserColumnName="MarginExceeded" type="xs:boolean" minOccurs="0" />
<xs:element name="TaskType_CODE" msprop:Generator_ColumnVarNameInTable="columnTaskType_CODE" msprop:Generator_ColumnPropNameInRow="TaskType_CODE" msprop:Generator_ColumnPropNameInTable="TaskType_CODEColumn" msprop:Generator_UserColumnName="TaskType_CODE" type="xs:int" minOccurs="0" />
<xs:element name="Inst_CODE1" msprop:Generator_ColumnVarNameInTable="columnInst_CODE1" msprop:Generator_ColumnPropNameInRow="Inst_CODE1" msprop:Generator_ColumnPropNameInTable="Inst_CODE1Column" msprop:Generator_UserColumnName="Inst_CODE1" type="xs:int" minOccurs="0" />
</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_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: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:complexType>
<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="Inst_CODE" msprop:Generator_ColumnVarNameInTable="columnInst_CODE" msprop:Generator_ColumnPropNameInRow="Inst_CODE" msprop:Generator_ColumnPropNameInTable="Inst_CODEColumn" msprop:Generator_UserColumnName="Inst_CODE" type="xs:int" minOccurs="0" />
<xs:element name="TaskType_CODE" msprop:Generator_ColumnVarNameInTable="columnTaskType_CODE" msprop:Generator_ColumnPropNameInRow="TaskType_CODE" msprop:Generator_ColumnPropNameInTable="TaskType_CODEColumn" msprop:Generator_UserColumnName="TaskType_CODE" type="xs:int" minOccurs="0" />
<xs:element name="Task_Name" msprop:Generator_ColumnVarNameInTable="columnTask_Name" msprop:Generator_ColumnPropNameInRow="Task_Name" msprop:Generator_ColumnPropNameInTable="Task_NameColumn" msprop:Generator_UserColumnName="Task_Name" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2147483647" />
</xs:restriction>
</xs:simpleType>
</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:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="EPDRad" msprop:Generator_ColumnVarNameInTable="columnEPDRad" msprop:Generator_ColumnPropNameInRow="EPDRad" msprop:Generator_ColumnPropNameInTable="EPDRadColumn" msprop:Generator_UserColumnName="EPDRad">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</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: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" />
@ -245,11 +245,11 @@
</xs:choice> </xs:choice>
</xs:complexType> </xs:complexType>
<xs:unique name="Constraint1" msdata:PrimaryKey="true"> <xs:unique name="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:GetTaskList" /> <xs:selector xpath=".//mstns:GetTaskInfo" />
<xs:field xpath="mstns:ID_Task" /> <xs:field xpath="mstns:ID_Task" />
</xs:unique> </xs:unique>
<xs:unique name="GetTaskInfo_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true"> <xs:unique name="GetTaskList_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:GetTaskInfo" /> <xs:selector xpath=".//mstns:GetTaskList" />
<xs:field xpath="mstns:ID_Task" /> <xs:field xpath="mstns:ID_Task" />
</xs:unique> </xs:unique>
<xs:unique name="CommentOnEvent_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true"> <xs:unique name="CommentOnEvent_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">

View file

@ -4,11 +4,11 @@
Changes to this file may cause incorrect behavior and will be lost if Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated. the code is regenerated.
</autogenerated>--> </autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout"> <DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="18" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes> <Shapes>
<Shape ID="DesignTable:GetTaskList" ZOrder="3" X="70" Y="70" Height="191" Width="211" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" /> <Shape ID="DesignTable:GetTaskInfo" ZOrder="3" X="784" Y="129" Height="305" Width="269" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:GetTaskInfo" ZOrder="2" X="441" Y="77" Height="305" Width="270" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" /> <Shape ID="DesignTable:GetTaskList" ZOrder="2" X="407" Y="240" Height="191" Width="211" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
<Shape ID="DesignTable:CommentOnEvent" ZOrder="1" X="57" Y="304" Height="210" Width="285" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" /> <Shape ID="DesignTable:CommentOnEvent" ZOrder="1" X="630" Y="497" Height="210" Width="285" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
</Shapes> </Shapes>
<Connectors /> <Connectors />
</DiagramLayout> </DiagramLayout>

View file

@ -131,7 +131,7 @@ 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.RemoteSQL)) using (var co = new System.Data.SqlClient.SqlConnection(Properties.Settings.Default.eDosConnectionString))
{ {
using (var cmd1 = new SqlCommand("VisitInit", co)) using (var cmd1 = new SqlCommand("VisitInit", co))
{ {

View file

@ -120,7 +120,7 @@ namespace eDosStation
var l = new SqlLog(); var l = new SqlLog();
try try
{ {
using (var co = new System.Data.SqlClient.SqlConnection(Properties.Settings.Default.RemoteSQL)) using (var co = new System.Data.SqlClient.SqlConnection(Properties.Settings.Default.eDosConnectionString))
{ {
using (var cmd1 = new SqlCommand("VisitExit", co)) using (var cmd1 = new SqlCommand("VisitExit", co))
{ {

View file

@ -10,10 +10,9 @@
<DockPanel> <DockPanel>
<Menu DockPanel.Dock="Top"> <Menu DockPanel.Dock="Top">
<MenuItem Header="Settings" Click="MenuItem_Click" > <MenuItem Header="Settings" Click="MenuItem_Click" >
</MenuItem> </MenuItem>
<MenuItem Header="Enc" Name="mEnc" Click="MEnc_Click" >
</MenuItem>
</Menu> </Menu>
<StatusBar DockPanel.Dock="Bottom" > <StatusBar DockPanel.Dock="Bottom" >
<StatusBarItem Name="Status" Content="Offline"/> <StatusBarItem Name="Status" Content="Offline"/>

View file

@ -20,7 +20,7 @@ namespace eDosStation
/// </summary> /// </summary>
public partial class MainWindow : Window public partial class MainWindow : Window
{ {
public Station thisStation = new Station(""); public Station thisStation ;
public EpdBaseClr.Epd2 ep=null; public EpdBaseClr.Epd2 ep=null;
public MainWindow() public MainWindow()
@ -56,54 +56,73 @@ namespace eDosStation
private void Window_Loaded(object sender, RoutedEventArgs e) private void Window_Loaded(object sender, RoutedEventArgs e)
{ {
bool ok = true; var cb = new System.Data.SqlClient.SqlConnectionStringBuilder(Properties.Settings.Default.eDosConnectionString);
try if (string.IsNullOrEmpty(cb.Password))
{ {
thisStation = new Station(string.Empty); var f = new AskPwd();
} catch (System.Exception ex) f.ShowDialog();
{ string pwd = f.ResponseText;
MessageBox.Show($"Startup error {ex.Message} "); string cfg = System.IO.Path.Combine(Environment.CurrentDirectory, System.AppDomain.CurrentDomain.FriendlyName);
ok = false; Config.ToggleConfigEncryption(cfg, pwd);
Close();
} }
if (ok && thisStation.Error>0) else
{ {
MessageBox.Show($"Startup error {thisStation.ErrorMessage} "); bool ok = true;
ok = false; try
} {
thisStation = new Station(string.Empty);
if (ok) try {
//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();
ep = new EpdBaseClr.Epd2(thisStation.ComPort);
} }
catch (System.Exception ex) catch (System.Exception ex)
{ {
MessageBox.Show($"Edp software error {ex.Message}"); MessageBox.Show($"Startup error {ex.Message} ");
ok = false; ok = false;
} }
if (ok) if (ok && thisStation.Error > 0)
{
if (thisStation.insComments.Length > 2)
{ {
InstMessage w = new InstMessage(thisStation.tbComments); MessageBox.Show($"Startup error {thisStation.ErrorMessage} ");
w.ShowDialog(); ok = false;
ibComment.Child = thisStation.tbComments; }
//itComment = thisStation.tbComments;
ibComment.Visibility = Visibility.Visible; if (ok) try
{
//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();
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;
//itComment = thisStation.tbComments;
ibComment.Visibility = Visibility.Visible;
}
else
ibComment.Visibility = Visibility.Hidden;
} }
else
ibComment.Visibility = Visibility.Hidden;
} }
} }
private void MEnc_Click(object sender, RoutedEventArgs e)
{
//string cfg = System.IO.Path.Combine(Environment.CurrentDirectory, System.AppDomain.CurrentDomain.FriendlyName );
//Config.ToggleConfigEncryption(cfg);
}
} }
} }

View file

@ -35,17 +35,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=tcp:10.2.12.200\\sag,54037;Initial Catalog=eDos;Integrated Security=Tr" +
"ue")]
public string RemoteSQL {
get {
return ((string)(this["RemoteSQL"]));
}
}
[global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("1")] [global::System.Configuration.DefaultSettingValueAttribute("1")]
@ -117,5 +106,25 @@ namespace eDosStation.Properties {
this["useTestButtons"] = value; this["useTestButtons"] = value;
} }
} }
[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")]
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=tcp:10.2.12.200\\hph,54037;Initial Catalog=eDos;User ID=eDosStation")]
public string eDosConnectionString {
get {
return ((string)(this["eDosConnectionString"]));
}
}
} }
} }

View file

@ -5,14 +5,6 @@
<Setting Name="ComPort" Type="System.Int32" Scope="User"> <Setting Name="ComPort" Type="System.Int32" Scope="User">
<Value Profile="(Default)">3</Value> <Value Profile="(Default)">3</Value>
</Setting> </Setting>
<Setting Name="RemoteSQL" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=tcp:10.2.12.200\sag,54037;Initial Catalog=eDos;Integrated Security=True&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=tcp:10.2.12.200\sag,54037;Initial Catalog=eDos;Integrated Security=True</Value>
</Setting>
<Setting Name="Inst_CODE1" Type="System.Int32" Scope="User"> <Setting Name="Inst_CODE1" Type="System.Int32" Scope="User">
<Value Profile="(Default)">1</Value> <Value Profile="(Default)">1</Value>
</Setting> </Setting>
@ -31,5 +23,21 @@
<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)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=scksrv23;Initial Catalog=master;Integrated Security=True&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=scksrv23;Initial Catalog=master;Integrated Security=True</Value>
</Setting>
<Setting Name="eDosConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=tcp:10.2.12.200\hph,54037;Initial Catalog=eDos;User ID=eDosStation&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=tcp:10.2.12.200\hph,54037;Initial Catalog=eDos;User ID=eDosStation</Value>
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>

28
eDosStation/Settings.cs Normal file
View file

@ -0,0 +1,28 @@
namespace eDosStation.Properties {
// This class allows you to handle specific events on the settings class:
// The SettingChanging event is raised before a setting's value is changed.
// The PropertyChanged event is raised after a setting's value is changed.
// The SettingsLoaded event is raised after the setting values are loaded.
// The SettingsSaving event is raised before the setting values are saved.
internal sealed partial class Settings {
public Settings() {
// // To add event handlers for saving and changing settings, uncomment the lines below:
//
// this.SettingChanging += this.SettingChangingEventHandler;
//
// this.SettingsSaving += this.SettingsSavingEventHandler;
//
}
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
// Add code to handle the SettingChangingEvent event here.
}
private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
// Add code to handle the SettingsSaving event here.
}
}
}

View file

@ -41,7 +41,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 = new SqlConnection(Properties.Settings.Default.RemoteSQL)) using (var co = new SqlConnection(Properties.Settings.Default.eDosConnectionString))
{ {
co.Open(); co.Open();
using (var cmd = new SqlCommand("StationSettingsSelect", co)) using (var cmd = new SqlCommand("StationSettingsSelect", co))
@ -118,7 +118,7 @@ namespace eDosStation
public void Update() public void Update()
{ {
using (var co = new SqlConnection(Properties.Settings.Default.RemoteSQL)) using (var co = new SqlConnection(Properties.Settings.Default.eDosConnectionString))
{ {
using (var cmd = new SqlCommand("StationSettingsUpdate", co)) using (var cmd = new SqlCommand("StationSettingsUpdate", co))
{ {

View file

@ -29,7 +29,7 @@ namespace eDosStation
{ {
LastName = FirstName = conCode = Language = string.Empty; LastName = FirstName = conCode = Language = string.Empty;
AccessAllow = null; ; AccessAllow = null; ;
using (var co = new SqlConnection(Properties.Settings.Default.RemoteSQL)) using (var co = new SqlConnection(Properties.Settings.Default.eDosConnectionString))
{ {
using (var cmd = new SqlCommand("GetPersonInfo", co)) using (var cmd = new SqlCommand("GetPersonInfo", co))
{ {

View file

@ -83,6 +83,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
@ -126,10 +127,11 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</ApplicationDefinition> </ApplicationDefinition>
<Compile Include="Converters.cs" /> <Compile Include="AskPwd.xaml.cs">
<Compile Include="DataSet1.cs"> <DependentUpon>AskPwd.xaml</DependentUpon>
<DependentUpon>DataSet1.xsd</DependentUpon>
</Compile> </Compile>
<Compile Include="Config.cs" />
<Compile Include="Converters.cs" />
<Compile Include="DataSet1.Designer.cs"> <Compile Include="DataSet1.Designer.cs">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
@ -145,6 +147,7 @@
<Compile Include="InstMessage.xaml.cs"> <Compile Include="InstMessage.xaml.cs">
<DependentUpon>InstMessage.xaml</DependentUpon> <DependentUpon>InstMessage.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Settings.cs" />
<Compile Include="Settings.xaml.cs"> <Compile Include="Settings.xaml.cs">
<DependentUpon>Settings.xaml</DependentUpon> <DependentUpon>Settings.xaml</DependentUpon>
</Compile> </Compile>
@ -155,6 +158,10 @@
<Compile Include="Station.cs" /> <Compile Include="Station.cs" />
<Compile Include="TouchEnabledTextBox.cs" /> <Compile Include="TouchEnabledTextBox.cs" />
<Compile Include="User.cs" /> <Compile Include="User.cs" />
<Page Include="AskPwd.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="eDosDict.xaml"> <Page Include="eDosDict.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>