More Header Common
This commit is contained in:
@ -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",
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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; }
|
||||
}
|
Reference in New Issue
Block a user