diff --git a/LaaProductionWeb/LaaProductionWeb.Data/DbContext.cs b/LaaProductionWeb/LaaProductionWeb.Data/DbContext.cs index ec1c6579..3a48cf8d 100644 --- a/LaaProductionWeb/LaaProductionWeb.Data/DbContext.cs +++ b/LaaProductionWeb/LaaProductionWeb.Data/DbContext.cs @@ -85,6 +85,27 @@ return firstOrDefaultResult; } + public int ExecuteNonQuery(string query, Action parameters) + { + var rowsAffected = 0; + + using (var sqlConnection = new SqlConnection(this.connectionString)) + { + sqlConnection.OpenWithErrorHandling(); + + using (var sqlCommand = sqlConnection.CreateCommand()) + { + sqlCommand.CommandText = query; + + parameters(sqlCommand.Parameters); + + rowsAffected = sqlCommand.ExecuteNonQuery(); + } + } + + return rowsAffected; + } + public T ScalarTransaction(string query, Action parameters) { var scalarResult = default(T); diff --git a/LaaProductionWeb/LaaProductionWeb.Data/DbContextExtensions.cs b/LaaProductionWeb/LaaProductionWeb.Data/DbContextExtensions.cs index d5d94c28..d5d0387e 100644 --- a/LaaProductionWeb/LaaProductionWeb.Data/DbContextExtensions.cs +++ b/LaaProductionWeb/LaaProductionWeb.Data/DbContextExtensions.cs @@ -3,8 +3,7 @@ using LaaProductionWeb.Data.Interfaces; using Microsoft.Extensions.DependencyInjection; - - using System; + using System.Data.SqlClient; using System.Diagnostics; diff --git a/LaaProductionWeb/LaaProductionWeb.Data/Interfaces/IDbContext.cs b/LaaProductionWeb/LaaProductionWeb.Data/Interfaces/IDbContext.cs index 9b32c72e..25a9521d 100644 --- a/LaaProductionWeb/LaaProductionWeb.Data/Interfaces/IDbContext.cs +++ b/LaaProductionWeb/LaaProductionWeb.Data/Interfaces/IDbContext.cs @@ -9,6 +9,8 @@ IEnumerable AsEnumerable(string query, Func reader); + int ExecuteNonQuery(string query, Action parameters); + T FirstOrDefault(string query, Action parameters, Func reader); T ScalarTransaction(string query, Action parameters); diff --git a/LaaProductionWeb/LaaProductionWeb.Data/ParameterCollection.cs b/LaaProductionWeb/LaaProductionWeb.Data/ParameterCollection.cs index 38ba97ef..36b2e65d 100644 --- a/LaaProductionWeb/LaaProductionWeb.Data/ParameterCollection.cs +++ b/LaaProductionWeb/LaaProductionWeb.Data/ParameterCollection.cs @@ -2,6 +2,7 @@ { using LaaProductionWeb.Data.Interfaces; + using System; using System.Data; using System.Data.SqlClient; @@ -14,17 +15,23 @@ public IParameterCollection Add(string name, object value) { - this.parameters.Add(new SqlParameter(name, value)); + this.parameters.Add(new SqlParameter(name, value ?? DBNull.Value)); return this; } public IParameterCollection AddFile(string name, byte[] fileContent) { - var sqlParameter = new SqlParameter(name, SqlDbType.VarBinary) + var sqlParameter = new SqlParameter(name, SqlDbType.VarBinary); + + if (fileContent is null) { - Value = fileContent - }; + sqlParameter.Value = DBNull.Value; + } + else + { + sqlParameter.Value = fileContent; + } this.parameters.Add(sqlParameter); diff --git a/LaaProductionWeb/LaaProductionWeb.Services/LaaProductionWeb.Services.csproj b/LaaProductionWeb/LaaProductionWeb.Services/LaaProductionWeb.Services.csproj index e01a42ec..6f9ca82b 100644 --- a/LaaProductionWeb/LaaProductionWeb.Services/LaaProductionWeb.Services.csproj +++ b/LaaProductionWeb/LaaProductionWeb.Services/LaaProductionWeb.Services.csproj @@ -70,6 +70,7 @@ + diff --git a/LaaProductionWeb/LaaProductionWeb.Services/Models/HeliumReportFilter.cs b/LaaProductionWeb/LaaProductionWeb.Services/Models/HeliumReportFilter.cs index 059ca2f4..a451ff5a 100644 --- a/LaaProductionWeb/LaaProductionWeb.Services/Models/HeliumReportFilter.cs +++ b/LaaProductionWeb/LaaProductionWeb.Services/Models/HeliumReportFilter.cs @@ -11,25 +11,25 @@ { var model = default(HeliumReportItem); - this.Add(model.Property(x => x.FertigungNr, this.Count)); - this.Add(model.Property(x => x.AuftragNr, this.Count)); - this.Add(model.Property(x => x.PositionNr, this.Count)); - this.Add(model.Property(x => x.SerialNr, this.Count)); - this.Add(model.Property(x => x.IdentNr, this.Count)); - this.Add(model.Property(x => x.HeId, this.Count)); - this.Add(model.Property(x => x.HeTestId, this.Count)); - this.Add(model.Property(x => x.PcbId, this.Count)); - this.Add(model.Property(x => x.Nennweite, this.Count)); - this.Add(model.Property(x => x.Baulaenge, this.Count)); - this.Add(model.Property(x => x.Typ, this.Count)); - this.Add(model.Property(x => x.Druck, this.Count)); - this.Add(model.Property(x => x.Temperatur, this.Count)); - this.Add(model.Property(x => x.HeLakeRate, this.Count)); - this.Add(model.Property(x => x.HeTestPressure, this.Count)); - this.Add(model.Property(x => x.IsValid, this.Count)); + this.Add(model.Text(x => x.FertigungNr, this.Count)); + this.Add(model.Text(x => x.AuftragNr, this.Count)); + this.Add(model.Text(x => x.PositionNr, this.Count)); + this.Add(model.Text(x => x.SerialNr, this.Count)); + this.Add(model.Text(x => x.IdentNr, this.Count)); + this.Add(model.Text(x => x.HeId, this.Count)); + this.Add(model.Text(x => x.HeTestId, this.Count)); + this.Add(model.Text(x => x.PcbId, this.Count)); + this.Add(model.Text(x => x.Nennweite, this.Count)); + this.Add(model.Text(x => x.Baulaenge, this.Count)); + this.Add(model.Text(x => x.Typ, this.Count)); + this.Add(model.Text(x => x.Druck, this.Count)); + this.Add(model.Text(x => x.Temperatur, this.Count)); + this.Add(model.Text(x => x.HeLakeRate, this.Count)); + this.Add(model.Text(x => x.HeTestPressure, this.Count)); + this.Add(model.Boolean(x => x.IsValid, this.Count)); + this.Add(model.Text(x => x.Text, this.Count)); this.Add(model.DateTime(x => x.TestDate, this.Count, -1)); - this.Add(model.Property(x => x.Tester, this.Count)); - this.Add(model.Property(x => x.Text, this.Count)); + this.Add(model.Text(x => x.Tester, this.Count)); } internal SqlExpression OrderBy() @@ -57,7 +57,12 @@ foreach (var property in this) { - if (property.Type == "date") + if (string.IsNullOrWhiteSpace(property.Like)) + { + continue; + } + + if (property.Type == PropertyType.Date) { if (!string.IsNullOrWhiteSpace(property.Like)) { @@ -98,9 +103,12 @@ } } } - else if (string.IsNullOrWhiteSpace(property.Like)) + else if (property.Type == PropertyType.Bool) { - continue; + var propertyName = $"{property.Property}_{property.Index}"; + var propertyValue = int.TryParse(property.Like, out int bit) ? bit : 0; + + sqlExpression.Add($"{property.Column} = @{propertyName}", propertyName, property.Like); } else { diff --git a/LaaProductionWeb/LaaProductionWeb.Services/Models/HeliumReportFilterProperty.cs b/LaaProductionWeb/LaaProductionWeb.Services/Models/HeliumReportFilterProperty.cs index 0d6070e8..8d4beffc 100644 --- a/LaaProductionWeb/LaaProductionWeb.Services/Models/HeliumReportFilterProperty.cs +++ b/LaaProductionWeb/LaaProductionWeb.Services/Models/HeliumReportFilterProperty.cs @@ -4,7 +4,7 @@ { public int Index { get; set; } - public string Type { get; set; } + public PropertyType Type { get; set; } public string Property { get; set; } diff --git a/LaaProductionWeb/LaaProductionWeb.Services/Models/HeliumReportModelExtensions.cs b/LaaProductionWeb/LaaProductionWeb.Services/Models/HeliumReportModelExtensions.cs index 59fa2c6b..a1fb7c81 100644 --- a/LaaProductionWeb/LaaProductionWeb.Services/Models/HeliumReportModelExtensions.cs +++ b/LaaProductionWeb/LaaProductionWeb.Services/Models/HeliumReportModelExtensions.cs @@ -5,31 +5,31 @@ using System.Linq.Expressions; using System.Reflection; + public enum PropertyType + { + Text, + Date, + Bool + } + public static class HeliumReportModelExtensions { - public static HeliumReportFilterProperty Property(this HeliumReportItem model, Expression> expression, int index, int orderBy = 0) - { - var memberInfo = default(MemberInfo); - if (expression.Body is MemberExpression memberExpression) - { - memberInfo = memberExpression.Member; - } - else if (expression.Body is UnaryExpression unaryExpression && unaryExpression.Operand is MemberExpression operandExpression) - { - memberInfo = operandExpression.Member; - } + public static HeliumReportFilterProperty Text(this HeliumReportItem model, Expression> expression, int index, int orderBy = 0) + => model.Property(expression, index, PropertyType.Text, orderBy); - return new HeliumReportFilterProperty - { - Column = memberInfo?.GetCustomAttribute()?.Name, - Property = memberInfo?.Name, - OrderBy = orderBy, - Index = index, - Type = "text" - }; - } public static HeliumReportFilterProperty DateTime(this HeliumReportItem model, Expression> expression, int index, int orderBy = 0) + => model.Property(expression, index, PropertyType.Date, orderBy); + + public static HeliumReportFilterProperty Boolean(this HeliumReportItem model, Expression> expression, int index, int orderBy = 0) + => model.Property(expression, index, PropertyType.Bool, orderBy); + + public static HeliumReportFilterProperty Property( + this HeliumReportItem model + , Expression> expression + , int index + , PropertyType propertyType + , int orderBy) { var memberInfo = default(MemberInfo); @@ -48,7 +48,7 @@ Property = memberInfo?.Name, OrderBy = orderBy, Index = index, - Type = "date" + Type = propertyType }; } } diff --git a/LaaProductionWeb/LaaProductionWeb.Services/Models/OrderIdentity.cs b/LaaProductionWeb/LaaProductionWeb.Services/Models/OrderIdentity.cs new file mode 100644 index 00000000..4654dc46 --- /dev/null +++ b/LaaProductionWeb/LaaProductionWeb.Services/Models/OrderIdentity.cs @@ -0,0 +1,13 @@ +namespace LaaProductionWeb.Services.Models +{ + public class OrderIdentity + { + public int OrderNr { get; set; } + + public int PositionNr { get; set; } + + public int SerialNr { get; set; } + + public string ClientSerialNr { get; set; } + } +} diff --git a/LaaProductionWeb/LaaProductionWeb.Services/Models/OrderModel.cs b/LaaProductionWeb/LaaProductionWeb.Services/Models/OrderModel.cs index ec40de84..b9372851 100644 --- a/LaaProductionWeb/LaaProductionWeb.Services/Models/OrderModel.cs +++ b/LaaProductionWeb/LaaProductionWeb.Services/Models/OrderModel.cs @@ -9,8 +9,7 @@ [Required] public int? OrderNr { get; set; } - - [Required] + public int? PositionNr { get; set; } [Required] diff --git a/LaaProductionWeb/LaaProductionWeb.Services/Models/ShipmentModel.cs b/LaaProductionWeb/LaaProductionWeb.Services/Models/ShipmentModel.cs index bb748b08..8d592b76 100644 --- a/LaaProductionWeb/LaaProductionWeb.Services/Models/ShipmentModel.cs +++ b/LaaProductionWeb/LaaProductionWeb.Services/Models/ShipmentModel.cs @@ -22,8 +22,7 @@ [Required(ErrorMessage = "Auftrags-Nr. ist erforderlich!")] [Display(Name = "Auftrags-Nr. scanen oder eingeben")] public int? OrderNr { get; set; } - - [Required(ErrorMessage = "Positions-Nr. ist erforderlich!")] + [Display(Name = "Positions-Nr. auswählen")] public int? PositionNr { get; set; } diff --git a/LaaProductionWeb/LaaProductionWeb.Services/ShipmentsService.cs b/LaaProductionWeb/LaaProductionWeb.Services/ShipmentsService.cs index f7cffa2c..e446f055 100644 --- a/LaaProductionWeb/LaaProductionWeb.Services/ShipmentsService.cs +++ b/LaaProductionWeb/LaaProductionWeb.Services/ShipmentsService.cs @@ -33,11 +33,12 @@ var palletsCount = this.dbContext.FirstOrDefault( query: $@" SELECT COUNT(1) - FROM (SELECT [PalettenNr] AS [PalletNr] - , COUNT([SerienNr]) AS [Count] + FROM (SELECT [PalettenNr] AS [PalletNr] + , COUNT([SerienNr]) AS [Count] FROM [PalettenScan] - WHERE [AuftragNr] = @{nameof(model.OrderNr)} - AND [PositionNr] = @{nameof(model.PositionNr)} + WHERE [AuftragNr] = @{nameof(model.OrderNr)} + AND (@{nameof(model.PositionNr)} IS NULL + OR [PositionNr] = @{nameof(model.PositionNr)}) GROUP BY [PalettenNr]) AS [Paletten] WHERE [Count] > 0", @@ -90,10 +91,13 @@ AND [PalettenScan].[PositionNr] = [AuftragPositionSerienNr].[PositionNr] AND [PalettenScan].[SerienNr] = REPLACE(RTRIM(LTRIM([AuftragPositionSerienNr].[KundeneigeneSerienNr])), ' ', '') WHERE [AuftragPositionSerienNr].[AuftragNr] = @{nameof(model.OrderNr)} + AND (@{nameof(model.PositionNr)} IS NULL + OR [AuftragPositionSerienNr].[PositionNr] = @{nameof(model.PositionNr)}) AND ([PalettenScan].[PalettenNr] = @{nameof(model.PalletNr)} OR [PalettenScan].[PalettenNr] IS NULL)", parameters: parameters => parameters .Add(nameof(model.OrderNr), model.OrderNr) + .Add(nameof(model.PositionNr), model.PositionNr) .Add(nameof(model.PalletNr), model.PalletNr), reader: reader => new SerialNr { @@ -111,22 +115,24 @@ public PalletsBatchModel LoadBatchModel(OrderScanModel model) { const string orderNr = nameof(model.OrderNr); - const string posNr = nameof(model.PositionNr); const string palNr = nameof(model.PalletNr); var batchModel = this.dbContext.FirstOrDefault( query: $@" SELECT TOP 1 - [Auftrag].[AuftragNr] -- 0 - , [Auftrag].[FertigungsauftragNr] -- 1 - , [Auftrag].[Menge] -- 2 - , [Kunde].[Name] -- 3 - , [Auftrag].[ZusatzText] -- 4 + [Auftrag].[AuftragNr] -- 0 + , [Auftrag].[FertigungsauftragNr] -- 1 + , (SELECT SUM([AAP].[Menge]) + FROM [AlleAuftragPositionen] AS [AAP] + WHERE [AAP].[AuftragNr] = [Auftrag].[AuftragNr]) -- 2 + , [Kunde].[Name] -- 3 + , [Auftrag].[ZusatzText] -- 4 FROM [AlleAuftragPositionen] AS [Auftrag] JOIN [Kunde] ON [Kunde].[KundenNr] = [Auftrag].[KundenNr] - WHERE [Auftrag].[AuftragNr] = @{orderNr} - AND [Auftrag].[PositionNr] = @{posNr} - ORDER BY [Auftrag].[FertigungsauftragNr] DESC", + WHERE [Auftrag].[AuftragNr] = @{nameof(model.OrderNr)} + AND (@{nameof(model.PositionNr)} IS NULL + OR [Auftrag].[PositionNr] = @{nameof(model.PositionNr)}) + ORDER BY [Auftrag].[FertigungsauftragNr] DESC", parameters: parameters => parameters .Add(nameof(model.OrderNr), model.OrderNr) .Add(nameof(model.PositionNr), model.PositionNr), @@ -196,16 +202,16 @@ return $"Der Packet mit Serien-Nr: {model.SerialNr} wurde bereits hinzugefügt."; } - var orderKVP = this.GetOrderKVP(model.OrderNr, model.PositionNr, model.SerialNr); + var orderIdentity = this.UpdateOrderIdentifiers(model.OrderNr, model.PositionNr, model.SerialNr); - if (orderKVP.Key <= 0) + if (orderIdentity is null) { return $"Der Packet mit Serien-Nr: {model.SerialNr} ist nicht dem Auftrag/Position: {model.OrderNr}/{model.PositionNr} zugewiesen."; } else { - model.SerialNr = orderKVP.Value; - model.PalletNr = this.GetPalletNr(model); + model.SerialNr = orderIdentity.ClientSerialNr; + model.PositionNr = orderIdentity.PositionNr; } var rowsAffected = this.InsertPalletEntry(model); @@ -216,18 +222,6 @@ return false; } - private int GetPalletNr(OrderScanModel model) - => this.dbContext.FirstOrDefault( - query: $@" - SELECT MAX([PalettenNr]) + 1 - FROM [PalettenScan] - WHERE [AuftragNr] = @{nameof(model.OrderNr)} - AND [PositionNr] = @{nameof(model.PositionNr)}", - parameters: parameters => parameters - .Add(nameof(model.OrderNr), model.OrderNr) - .Add(nameof(model.PositionNr), model.PositionNr), - reader: reader => Math.Min(reader.GetValue(0), model.PalletNr)); - private OrderScanModel DeletePalletEntryById(int id) => this.dbContext.FirstOrDefault( query: $@" @@ -245,26 +239,31 @@ PalletNr = reader.GetValue(2) }); - private KeyValuePair GetOrderKVP(int? orderNr, int? positionNr, string serialNr) + private OrderIdentity UpdateOrderIdentifiers(int? orderNr, int? positionNr, string serialNr) => this.dbContext.FirstOrDefault( query: $@" SELECT DISTINCT TOP 1 - [AuftragPositionSerienNr].[SerienNr] -- 0 - , REPLACE(RTRIM(LTRIM([AuftragPositionSerienNr].[KundeneigeneSerienNr])), ' ', '') -- 1 + [AuftragPositionSerienNr].[PositionNr] -- 0 + , [AuftragPositionSerienNr].[SerienNr] -- 1 + , REPLACE(RTRIM(LTRIM([AuftragPositionSerienNr].[KundeneigeneSerienNr])), ' ', '') -- 2 FROM [AuftragPositionSerienNr] - WHERE [AuftragPositionSerienNr].[AuftragNr] = @{nameof(orderNr)} - AND [AuftragPositionSerienNr].[PositionNr] = @{nameof(positionNr)} - AND @{nameof(serialNr)} LIKE '%' + (REPLACE(RTRIM(LTRIM([AuftragPositionSerienNr].[KundeneigeneSerienNr])), ' ', '')) + '%'", + WHERE [AuftragPositionSerienNr].[AuftragNr] = @{nameof(orderNr)} + AND ([AuftragPositionSerienNr].[PositionNr] = @{nameof(positionNr)} OR @{nameof(positionNr)} IS NULL) + AND @{nameof(serialNr)} LIKE '%' + (REPLACE(RTRIM(LTRIM([AuftragPositionSerienNr].[KundeneigeneSerienNr])), ' ', '')) + '%'", parameters: parameters => parameters .Add(nameof(orderNr), orderNr) .Add(nameof(positionNr), positionNr) .Add(nameof(serialNr), serialNr), - reader: reader => new KeyValuePair( - key: reader.GetValue(0), - value: reader.GetValue(1))); + reader: reader => new OrderIdentity + { + OrderNr = orderNr ?? -1, + PositionNr = reader.GetValue(0), + SerialNr = reader.GetValue(1), + ClientSerialNr = reader.GetValue(2), + }); private int InsertPalletEntry(OrderScanModel model) - => this.dbContext.ScalarTransaction($@" + => this.dbContext.ExecuteNonQuery($@" INSERT INTO [PalettenScan] ( [PalettenNr] @@ -294,11 +293,9 @@ SELECT CAST(CASE WHEN [PalettenScan].[ID] IS NULL THEN 0 ELSE 1 END AS BIT) FROM [PalettenScan] WHERE [PalettenScan].[AuftragNr] = @{nameof(orderNr)} - AND [PalettenScan].[PositionNr] = @{nameof(positionNr)} AND [PalettenScan].[SerienNr] = @{nameof(serialNr)}", parameters => parameters .Add(nameof(orderNr), orderNr) - .Add(nameof(positionNr), positionNr) .Add(nameof(serialNr), serialNr), reader => reader.GetValue(0)); diff --git a/LaaProductionWeb/LaaProductionWeb/Controllers/ProtocolController.cs b/LaaProductionWeb/LaaProductionWeb/Controllers/ProtocolController.cs index d5bedd5a..2518a914 100644 --- a/LaaProductionWeb/LaaProductionWeb/Controllers/ProtocolController.cs +++ b/LaaProductionWeb/LaaProductionWeb/Controllers/ProtocolController.cs @@ -32,44 +32,47 @@ [HttpPost] public ActionResult Index(OrderClientModel model) { - var files = this.Request.Files; - - if (model.OrderId is null || model.OrderId <= 0) + if (model.OrderId > 0 && model.ClientId > 0) { - this.TempData[FilePDF] = $"Bitte Auftrag auswählen."; - } - else if (files.Count > 0) - { - var file = this.Request.Files.Get(0); + var files = this.Request.Files; - if (file.ContentType == "application/pdf" && model.ClientId > 0 && model.OrderId > 0) + if (files.Count > 0) { - if (!this.protocolService.OrderCompleted(model.OrderId.Value)) - { - this.TempData[FilePDF] = $"Auftrag enthält nicht bestandene Prüfungen."; - } - else - { - model.FileId = this.protocolService.SaveFile(file.InputStream, model.ClientId.Value, model.OrderId.Value); + var file = files.Get(0); - if (model.FileId > 0) + if (file.ContentType == "application/pdf") + { + if (this.protocolService.OrderCompleted(model.OrderId.Value)) { - return this.RedirectToAction(nameof(this.Document), model); + model.FileId = this.protocolService.SaveFile(file.InputStream, model.ClientId.Value, model.OrderId.Value); + + if (model.FileId > 0) + { + return this.RedirectToAction(nameof(this.Document), model); + } + else + { + this.TempData[FilePDF] = $"Der PDF Datei wurde nicht hochgeladen."; + } } else { - this.TempData[FilePDF] = $"Der PDF Datei wurde nicht hochgeladen."; + this.TempData[FilePDF] = $"Auftrag enthält nicht bestandene Prüfungen."; } } + else + { + this.TempData[FilePDF] = $"Bitte, PDF Datei hochladen."; + } } else { - this.TempData[FilePDF] = $"Bitte, PDF Datei hochladen."; + this.TempData[FilePDF] = "Kein PDF Datei wurde ausgewählt."; } } else { - this.TempData[FilePDF] = "Kein PDF Datei wurde ausgewählt."; + this.TempData[FilePDF] = $"Bitte Auftrag auswählen."; } return this.View(model); diff --git a/LaaProductionWeb/LaaProductionWeb/Controllers/ShipmentsController.cs b/LaaProductionWeb/LaaProductionWeb/Controllers/ShipmentsController.cs index 31451c42..61689afe 100644 --- a/LaaProductionWeb/LaaProductionWeb/Controllers/ShipmentsController.cs +++ b/LaaProductionWeb/LaaProductionWeb/Controllers/ShipmentsController.cs @@ -63,6 +63,7 @@ if (result) { + model.PositionNr = null; model.SerialNr = default(string); } else @@ -78,6 +79,7 @@ public ActionResult Delete(int id) { var orderScanModel = this.shipmentsService.DeletePalletEntry(id); + orderScanModel.PositionNr = null; return this.View(nameof(this.Index), new ShipmentModel(orderScanModel)); } diff --git a/LaaProductionWeb/LaaProductionWeb/Views/Protocol/Index.cshtml b/LaaProductionWeb/LaaProductionWeb/Views/Protocol/Index.cshtml index b12a1caf..03021b02 100644 --- a/LaaProductionWeb/LaaProductionWeb/Views/Protocol/Index.cshtml +++ b/LaaProductionWeb/LaaProductionWeb/Views/Protocol/Index.cshtml @@ -98,7 +98,7 @@ clientMenu.classList.add(show); }) } else { - clientMenu.classList.remove(show); + orderMenu.classList.remove(show); } }, 50); }; diff --git a/LaaProductionWeb/LaaProductionWeb/Views/Report/Filter.cshtml b/LaaProductionWeb/LaaProductionWeb/Views/Report/Filter.cshtml index 0d0a4949..291448e7 100644 --- a/LaaProductionWeb/LaaProductionWeb/Views/Report/Filter.cshtml +++ b/LaaProductionWeb/LaaProductionWeb/Views/Report/Filter.cshtml @@ -5,10 +5,10 @@ Func bgColor = x => !x ? "bg-light" : string.Empty; } + -
diff --git a/LaaProductionWeb/LaaProductionWeb/Views/Report/Index.cshtml b/LaaProductionWeb/LaaProductionWeb/Views/Report/Index.cshtml index 8198df95..f51cc352 100644 --- a/LaaProductionWeb/LaaProductionWeb/Views/Report/Index.cshtml +++ b/LaaProductionWeb/LaaProductionWeb/Views/Report/Index.cshtml @@ -1,7 +1,7 @@ @model LaaProductionWeb.Services.Models.HeliumReportModel
-
+
@@ -21,14 +21,14 @@ + - @foreach (var filter in this.Model.Filter) { - if (filter.Type == "date") + if (filter.Type == LaaProductionWeb.Services.Models.PropertyType.Date) { } @@ -42,31 +42,31 @@ @foreach (var item in this.Model.Items) { - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + }
@this.Model.Display(x => x.HeLakeRate) @this.Model.Display(x => x.HeTestPressure) @this.Model.Display(x => x.IsValid)@this.Model.Display(x => x.Text) @this.Model.Display(x => x.TestDate) @this.Model.Display(x => x.Tester)@this.Model.Display(x => x.Text)
@this.Html.Partial("DateFilter", filter)
@item.FertigungNr@item.AuftragNr@item.PositionNr@item.SerialNr@item.IdentNr@item.HeId - - @item.HeTestId - - @item.PcbId@item.Nennweite@item.Baulaenge@item.Typ@item.Druck@item.Temperatur@item.HeLakeRate@item.HeTestPressure@($"{item.TestDate:dd.MM.yyyy}")@item.Tester@item.Text
@item.FertigungNr@item.AuftragNr@item.PositionNr@item.SerialNr@item.IdentNr@item.HeId + + @item.HeTestId + + @item.PcbId@item.Nennweite@item.Baulaenge@item.Typ@item.Druck@item.Temperatur@item.HeLakeRate@item.HeTestPressure@item.Text@($"{item.TestDate:dd.MM.yyyy}")@item.Tester
diff --git a/LaaProductionWeb/LaaProductionWeb/Views/Search/Positions.cshtml b/LaaProductionWeb/LaaProductionWeb/Views/Search/Positions.cshtml index 49f15b7a..0a020584 100644 --- a/LaaProductionWeb/LaaProductionWeb/Views/Search/Positions.cshtml +++ b/LaaProductionWeb/LaaProductionWeb/Views/Search/Positions.cshtml @@ -1,5 +1,7 @@ @model LaaProductionWeb.Services.Models.OrderPositions +
  • Alle
  • + @foreach (var position in this.Model) {
  • @position
  • diff --git a/LaaProductionWeb/LaaProductionWeb/Views/Shipments/Index.cshtml b/LaaProductionWeb/LaaProductionWeb/Views/Shipments/Index.cshtml index 44c83313..c7069bf9 100644 --- a/LaaProductionWeb/LaaProductionWeb/Views/Shipments/Index.cshtml +++ b/LaaProductionWeb/LaaProductionWeb/Views/Shipments/Index.cshtml @@ -17,10 +17,9 @@