diff --git a/LaaProductionWeb/Data/LaaProduction.Data.Omni/OmniDbContext.cs b/LaaProductionWeb/Data/LaaProduction.Data.Omni/OmniDbContext.cs
index 5872981a..e7b2b6e3 100644
--- a/LaaProductionWeb/Data/LaaProduction.Data.Omni/OmniDbContext.cs
+++ b/LaaProductionWeb/Data/LaaProduction.Data.Omni/OmniDbContext.cs
@@ -59,21 +59,7 @@
var inspectionOrder = default(InspectionOrder);
var inspectionOrderRows = this.sql
.CreateCommand($@"
- DECLARE @search INT = @{nameof(identorpono)};
DECLARE @identnr INT;
- DECLARE @fertnr INT;
-
- SELECT @identnr = [aap].[IdentNr]
- , @fertnr = [aap].[FertigungsauftragNr]
- FROM [AlleAuftragPositionen] AS [aap]
- WHERE [aap].[FertigungsauftragNr] = @search
-
- IF @identnr IS NULL
- BEGIN
- SELECT @identnr = [idn].[IdentNr]
- FROM [Identnr] AS [idn]
- WHERE [idn].[IdentNr] = @search
- END
SELECT [d].[Id]
, [aap].[AuftragNr]
diff --git a/LaaProductionWeb/LaaProduction.Console/LaaProduction.Console.csproj b/LaaProductionWeb/LaaProduction.Console/LaaProduction.Console.csproj
new file mode 100644
index 00000000..7a8fd8ca
--- /dev/null
+++ b/LaaProductionWeb/LaaProduction.Console/LaaProduction.Console.csproj
@@ -0,0 +1,85 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {E8FCD0A3-714D-4436-9A20-B098E6A5537D}
+ Exe
+ LaaProduction.Console
+ LaaProduction.Console
+ v4.0
+ 512
+ true
+
+
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+ false
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+ false
+
+
+
+
+
+ ..\packages\Microsoft.Bcl.1.1.10\lib\net40\System.IO.dll
+
+
+ ..\packages\Microsoft.Net.Http.2.2.29\lib\net40\System.Net.Http.dll
+
+
+ ..\packages\Microsoft.Net.Http.2.2.29\lib\net40\System.Net.Http.Extensions.dll
+
+
+ ..\packages\Microsoft.Net.Http.2.2.29\lib\net40\System.Net.Http.Primitives.dll
+
+
+ ..\packages\Microsoft.Net.Http.2.2.29\lib\net40\System.Net.Http.WebRequest.dll
+
+
+ ..\packages\Microsoft.Bcl.1.1.10\lib\net40\System.Runtime.dll
+
+
+ ..\packages\Microsoft.Bcl.1.1.10\lib\net40\System.Threading.Tasks.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
\ No newline at end of file
diff --git a/LaaProductionWeb/LaaProduction.Console/Program.cs b/LaaProductionWeb/LaaProduction.Console/Program.cs
new file mode 100644
index 00000000..8ed53421
--- /dev/null
+++ b/LaaProductionWeb/LaaProduction.Console/Program.cs
@@ -0,0 +1,28 @@
+namespace LaaProduction.Console
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Net.Http;
+
+ public class Program
+ {
+ public static void Main(string[] args)
+ {
+ Console.ReadKey();
+
+ using (var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:57680/api.aspx?action=getlabel"))
+ {
+ request.Content = new FormUrlEncodedContent(new Dictionary
+ {
+ { "BUILD_INFO", "816232411982" }
+ });
+
+ using (var response = new HttpClient().SendAsync(request).Result)
+ {
+ Console.WriteLine(response.Content.ReadAsStringAsync().Result);
+ }
+ }
+
+ }
+ }
+}
diff --git a/LaaProductionWeb/LaaProduction.Console/Properties/AssemblyInfo.cs b/LaaProductionWeb/LaaProduction.Console/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..c1435e1c
--- /dev/null
+++ b/LaaProductionWeb/LaaProduction.Console/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("LaaProduction.Console")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("LaaProduction.Console")]
+[assembly: AssemblyCopyright("Copyright © 2024")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("e8fcd0a3-714d-4436-9a20-b098e6a5537d")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/LaaProductionWeb/LaaProduction.Console/app.config b/LaaProductionWeb/LaaProduction.Console/app.config
new file mode 100644
index 00000000..3f26b599
--- /dev/null
+++ b/LaaProductionWeb/LaaProduction.Console/app.config
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/LaaProductionWeb/LaaProduction.Console/packages.config b/LaaProductionWeb/LaaProduction.Console/packages.config
new file mode 100644
index 00000000..0694948c
--- /dev/null
+++ b/LaaProductionWeb/LaaProduction.Console/packages.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/LaaProductionWeb/LaaProductionVFM/API.aspx b/LaaProductionWeb/LaaProductionVFM/API.aspx
new file mode 100644
index 00000000..b95952de
--- /dev/null
+++ b/LaaProductionWeb/LaaProductionVFM/API.aspx
@@ -0,0 +1 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeFile="API.aspx.cs" Inherits="LaaProductionVFM.API" %>
diff --git a/LaaProductionWeb/LaaProductionVFM/API.aspx.cs b/LaaProductionWeb/LaaProductionVFM/API.aspx.cs
new file mode 100644
index 00000000..3575ae26
--- /dev/null
+++ b/LaaProductionWeb/LaaProductionVFM/API.aspx.cs
@@ -0,0 +1,288 @@
+namespace LaaProductionVFM
+{
+ using System;
+ using System.Collections.Specialized;
+ using System.Configuration;
+ using System.IO;
+ using System.Linq;
+ using System.Net;
+ using System.Reflection;
+ using System.Text;
+ using System.Web.UI;
+
+ public partial class API : Page
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ var actionString = this.Request.QueryString.Get("action");
+
+ if (!string.IsNullOrWhiteSpace(actionString))
+ {
+ var action = this.GetType()
+ .GetMethods(BindingFlags.Instance | BindingFlags.NonPublic)
+ .Where(method => method.Name.Equals(actionString, StringComparison.OrdinalIgnoreCase))
+ .FirstOrDefault();
+
+ if (action != null)
+ {
+ this.Response.Clear();
+ this.Response.ContentType = "application/json";
+
+ action.Invoke(this, null);
+
+ this.Response.Flush();
+ }
+ }
+ }
+
+ /*****************************************************************************************
+ *
+ * A new control variable @IMAGE_MODE allows you to dynamically change the configuration
+ * of the sentinel for the next print job.
+ * If set to 0, the sentinel prints a label. -
+ * If set to 1, the sentinel generates a preview image of the label but does not print it.
+ * If set to 2, the sentinel prints the label and generates a preview image of the label.
+ *
+ *****************************************************************************************/
+ protected void PrintTestLabel()
+ {
+ try
+ {
+ var form = this.FormData();
+ var builder = new StringBuilder();
+
+ builder.AppendLine(string.Format("@JOB_NAME = \"testlabel_{0}\"", form.PcbId));
+ builder.AppendLine(string.Format("@PRINTER_NAME = \"{0}\"", Appsettings.TestLabelPrinter));
+ builder.AppendLine(string.Format("@LABEL_NAME = \"{0}\"", Appsettings.TestLabel));
+ builder.AppendLine(string.Format("@IMAGE_MODE = \"{0}\"", 0));
+ builder.AppendLine(string.Format("ORDERNO = \"{0}\"", form.Orderno));
+ builder.AppendLine(string.Format("POSNO = \"{0}\"", form.Posno));
+ builder.AppendLine(string.Format("TESTDATE = \"{0}\"", form.TestDate));
+ builder.AppendLine(string.Format("PARTNO = \"{0}\"", form.Partno));
+ builder.AppendLine(string.Format("DESCL1 = \"{0}\"", form.DescriptionL1));
+ builder.AppendLine(string.Format("DESCL2 = \"{0}\"", form.DescriptionL2));
+ builder.AppendLine(string.Format("CUSTSN = \"{0}\"", form.CustId));
+ builder.AppendLine(string.Format("REGSN = \"{0}\"", form.FactId));
+ builder.AppendLine(string.Format("QMAXGPM = \"{0}\"", form.QmaxGPM));
+ builder.AppendLine(string.Format("QMIDGPM = \"{0}\"", form.QmidGPM));
+ builder.AppendLine(string.Format("QMINGPM = \"{0}\"", form.QminGPM));
+ builder.AppendLine(string.Format("QMAXACC = \"{0}\"", form.QmaxACC));
+ builder.AppendLine(string.Format("QMIDACC = \"{0}\"", form.QmidACC));
+ builder.AppendLine(string.Format("QMINACC = \"{0}\"", form.QminACC));
+
+ if (!string.IsNullOrWhiteSpace(Appsettings.TestLabelTxt))
+ {
+ var testDataTxt = string.Format(Appsettings.TestLabelTxt, form.PcbId);
+ var testLabelContent = builder.ToString();
+
+ File.WriteAllText(testDataTxt, testLabelContent);
+
+ this.Response.StatusCode = (int)HttpStatusCode.OK;
+ }
+ else
+ {
+ this.Response.StatusCode = (int)HttpStatusCode.BadRequest;
+ }
+ }
+ catch (Exception e)
+ {
+ this.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
+ this.Response.Write(e.ToString());
+ }
+ }
+
+ /*****************************************************************************************
+ *
+ * A new control variable @IMAGE_MODE allows you to dynamically change the configuration
+ * of the sentinel for the next print job.
+ * If set to 0, the sentinel prints a label. -
+ * If set to 1, the sentinel generates a preview image of the label but does not print it.
+ * If set to 2, the sentinel prints the label and generates a preview image of the label.
+ *
+ *****************************************************************************************/
+ protected void PrintBoxLabel()
+ {
+ try
+ {
+ var form = this.FormData();
+ var builder = new StringBuilder();
+
+ builder.AppendLine(string.Format("@JOB_NAME = \"boxlabel_{0}\"", form.CustId));
+ builder.AppendLine(string.Format("@PRINTER_NAME = \"{0}\"", Appsettings.BoxLabelPrinter));
+ builder.AppendLine(string.Format("@LABEL_NAME = \"{0}\"", Appsettings.BoxLabel));
+ builder.AppendLine(string.Format("@IMAGE_MODE = \"{0}\"", 0));
+ builder.AppendLine(string.Format("TITLE = \"{0}\"", form.Title));
+ builder.AppendLine(string.Format("DESCL1 = \"{0}\"", form.DescriptionL1));
+ builder.AppendLine(string.Format("DESCL2 = \"{0}\"", form.DescriptionL2));
+ builder.AppendLine(string.Format("PARTNO = \"{0}\"", form.Partno));
+ builder.AppendLine(string.Format("ORDERNO = \"{0}\"", form.Orderno));
+ builder.AppendLine(string.Format("CUSTSN = \"{0}\"", form.CustId));
+ builder.AppendLine(string.Format("BOXDATE = \"{0}\"", form.BoxDate));
+ builder.AppendLine(string.Format("BOXNO = \"{0}\"", form.Boxno));
+ builder.AppendLine(string.Format("QUANTITY = \"{0}\"", form.Quantity));
+
+ if (!string.IsNullOrWhiteSpace(Appsettings.BoxLabelTxt))
+ {
+ var boxDataTxt = string.Format(Appsettings.BoxLabelTxt, form.CustId);
+ var boxLabelContent = builder.ToString();
+
+ File.WriteAllText(boxDataTxt, boxLabelContent);
+
+ this.Response.StatusCode = (int)HttpStatusCode.OK;
+ }
+ else
+ {
+ this.Response.StatusCode = (int)HttpStatusCode.BadRequest;
+ }
+ }
+ catch (Exception e)
+ {
+ this.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
+ this.Response.Write(e.ToString());
+ }
+ }
+
+ private T FormData() where T : new()
+ {
+ var expectedResult = new T();
+ var properties = expectedResult
+ .GetType()
+ .GetProperties(BindingFlags.Public | BindingFlags.Instance)
+ .ToDictionary(x => x.Name.ToLower(), x => (Action