diff --git a/ClientHub/wwwroot/site.js b/ClientHub/wwwroot/site.js index 7dee282..7784521 100644 --- a/ClientHub/wwwroot/site.js +++ b/ClientHub/wwwroot/site.js @@ -120,9 +120,12 @@ function loadHeaderGridRunHeaders() { ], columns: [ { key: "ID", dataType: "number", hidden: true }, - { key: "ToolID", dataType: "number", hidden: true }, - { key: "ToolName", dataType: "string", width: "10%" }, - { key: "Title", dataType: "string", width: "70%" }, + { key: "ToolTypeID", dataType: "number", hidden: true }, + { key: "ToolTypeName", dataType: "string", width: "10%" }, + { key: "Title", dataType: "string", width: "40%" }, + { key: "Reactor", dataType: "string", width: "10%" }, + { key: "RDS", dataType: "string", width: "10%" }, + { key: "PSN", dataType: "string", width: "10%" }, { key: "InsertDate", dataType: "date", format: "dateTime", width: "20%" } ], dataSource: headerURL, @@ -139,7 +142,7 @@ function clearFieldsGridRunHeaders() { function headerSelectionChangedRunHeaders(evt, ui) { clearFieldsGridRunHeaders(); var rowData = ui.owner.grid.dataSource.dataView()[ui.row.index]; - var url = _apiUrl + "/api/tooltypes/" + rowData.ToolID + "/headers/" + ui.row.id + "/fields"; + var url = _apiUrl + "/api/tooltypes/" + rowData.ToolTypeID + "/headers/" + ui.row.id + "/fields"; $("#FieldsGrid").igGrid({ autoGenerateColumns: false, primaryKey: "Column", diff --git a/Server/Repositories/MetrologyRepository.cs b/Server/Repositories/MetrologyRepository.cs index 7ee883f..99542ad 100644 --- a/Server/Repositories/MetrologyRepository.cs +++ b/Server/Repositories/MetrologyRepository.cs @@ -634,7 +634,7 @@ public class MetrologyRepository : IMetrologyRepository for (int i = 0; i < toolTypes.Length; i++) { tt = toolTypes[i]; - _ = stringBuilder.Append($" SELECT ID, InsertDate, AttachmentID, Title, [Date], {tt.ID} AS ToolID, '{tt.ToolTypeName}' AS ToolName FROM {tt.HeaderTableName} "); + _ = stringBuilder.Append($" SELECT ID, InsertDate, AttachmentID, Title, [Date], {tt.ID} AS ToolTypeID, '{tt.ToolTypeName}' AS ToolTypeName, Reactor, RDS, PSN FROM {tt.HeaderTableName} "); if (i != toolTypes.Length - 1) _ = stringBuilder.Append(" UNION ALL "); } @@ -662,7 +662,7 @@ public class MetrologyRepository : IMetrologyRepository throw new Exception("Invalid tool type ID"); using DbConnection conn = GetDbConnection(); - string sql = $"SELECT ID, InsertDate, AttachmentID, Title, [Date], {tt.ID} AS ToolID, '{tt.ToolTypeName}' AS ToolName FROM {tt.HeaderTableName} ORDER BY [Date] DESC "; + string sql = $"SELECT ID, InsertDate, AttachmentID, Title, [Date], {tt.ID} AS ToolTypeID, '{tt.ToolTypeName}' AS ToolTypeName, Reactor, RDS, PSN FROM {tt.HeaderTableName} ORDER BY [Date] DESC "; if (pageNo.HasValue && pageSize.HasValue) { diff --git a/Shared/DataModels/HeaderCommon.cs b/Shared/DataModels/HeaderCommon.cs index 2c87d36..d75f9e2 100644 --- a/Shared/DataModels/HeaderCommon.cs +++ b/Shared/DataModels/HeaderCommon.cs @@ -8,6 +8,9 @@ public class HeaderCommon public string? Title { get; set; } public string? Recipe { get; set; } public DateTime Date { get; set; } - public long ToolID { get; set; } - public string? ToolName { get; set; } + public long ToolTypeID { get; set; } + public string? ToolTypeName { get; set; } + public string? Reactor { get; set; } + public string? RDS { get; set; } + public string? PSN { get; set; } } \ No newline at end of file