Stichproben regeln activated for pcbs
This commit is contained in:
parent
c3d5ea172d
commit
d69bfc78e0
@ -16,8 +16,5 @@
|
||||
|
||||
|
||||
</appSettings>
|
||||
<connectionStrings>
|
||||
<add name="auftrag" connectionString="Server=SLASQL01.emea.sensus.net; Database=Auftrag; User ID=sa; Password=sqlserver;"/>
|
||||
</connectionStrings>
|
||||
|
||||
</configuration>
|
||||
@ -33,8 +33,11 @@ namespace CordonelAssemblyLine
|
||||
private void BtnPresueOk_Click(Object sender, RoutedEventArgs e)
|
||||
{
|
||||
var ret = ViewModel.StoreData(true);
|
||||
|
||||
ShouldBePressureTestedModal.Check(123);
|
||||
|
||||
if (ret && int.TryParse($"{ViewModel?.CurrentPcbID}", out var pcbId))
|
||||
{
|
||||
ShouldBePressureTestedModal.Check(pcbId);
|
||||
}
|
||||
}
|
||||
|
||||
private void LockForPressureTest()
|
||||
|
||||
@ -355,8 +355,8 @@ namespace CordonelAssemblyLine.Model
|
||||
Task.Run(() =>
|
||||
{
|
||||
var url = ServiceUrls.MeterProcessStateUrl();
|
||||
|
||||
var status = DisplayCodes.PressureTestedFailed;
|
||||
|
||||
if (successfull)
|
||||
{
|
||||
status = DisplayCodes.PressureTested;
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
public Stichproben(string assemblyLocation)
|
||||
{
|
||||
this.stichprobenRules = new StichprobenRules(assemblyLocation);
|
||||
this.stichprobenDb = new StichprobenDbContext(assemblyLocation);
|
||||
this.stichprobenDb = new StichprobenDbContext("Server=SLASQL01.emea.sensus.net; Database=Auftrag; User ID=sa; Password=sqlserver;"/*TODO: assemblyLocation*/);
|
||||
}
|
||||
|
||||
public StichprobeResult ShouldBePressureTested(int pcbId)
|
||||
|
||||
@ -3,19 +3,19 @@
|
||||
using LaaPackages.SqlClient;
|
||||
|
||||
using System;
|
||||
using System.Configuration;
|
||||
|
||||
internal class StichprobenDbContext
|
||||
{
|
||||
private readonly SqlConnection sqlConnection;
|
||||
|
||||
public StichprobenDbContext(string assemblyLocation)
|
||||
public StichprobenDbContext(string connectionString/*string assemblyLocation*/)
|
||||
{
|
||||
var connectionString = ConfigurationManager
|
||||
.OpenExeConfiguration(assemblyLocation)
|
||||
.ConnectionStrings
|
||||
.ConnectionStrings["auftrag"]
|
||||
.ConnectionString;
|
||||
//TODO: Get connection string from the config
|
||||
//var connectionString = ConfigurationManager
|
||||
// .OpenExeConfiguration(assemblyLocation)
|
||||
// .ConnectionStrings
|
||||
// .ConnectionStrings["auftrag"]
|
||||
// .ConnectionString;
|
||||
this.sqlConnection = SqlConnection.CreateSqlConnection(connectionString, error =>
|
||||
{
|
||||
Console.WriteLine(error);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user