More Header Common
This commit is contained in:
@ -120,9 +120,12 @@ function loadHeaderGridRunHeaders() {
|
|||||||
],
|
],
|
||||||
columns: [
|
columns: [
|
||||||
{ key: "ID", dataType: "number", hidden: true },
|
{ key: "ID", dataType: "number", hidden: true },
|
||||||
{ key: "ToolID", dataType: "number", hidden: true },
|
{ key: "ToolTypeID", dataType: "number", hidden: true },
|
||||||
{ key: "ToolName", dataType: "string", width: "10%" },
|
{ key: "ToolTypeName", dataType: "string", width: "10%" },
|
||||||
{ key: "Title", dataType: "string", width: "70%" },
|
{ 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%" }
|
{ key: "InsertDate", dataType: "date", format: "dateTime", width: "20%" }
|
||||||
],
|
],
|
||||||
dataSource: headerURL,
|
dataSource: headerURL,
|
||||||
@ -139,7 +142,7 @@ function clearFieldsGridRunHeaders() {
|
|||||||
function headerSelectionChangedRunHeaders(evt, ui) {
|
function headerSelectionChangedRunHeaders(evt, ui) {
|
||||||
clearFieldsGridRunHeaders();
|
clearFieldsGridRunHeaders();
|
||||||
var rowData = ui.owner.grid.dataSource.dataView()[ui.row.index];
|
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({
|
$("#FieldsGrid").igGrid({
|
||||||
autoGenerateColumns: false,
|
autoGenerateColumns: false,
|
||||||
primaryKey: "Column",
|
primaryKey: "Column",
|
||||||
|
@ -634,7 +634,7 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
for (int i = 0; i < toolTypes.Length; i++)
|
for (int i = 0; i < toolTypes.Length; i++)
|
||||||
{
|
{
|
||||||
tt = toolTypes[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)
|
if (i != toolTypes.Length - 1)
|
||||||
_ = stringBuilder.Append(" UNION ALL ");
|
_ = stringBuilder.Append(" UNION ALL ");
|
||||||
}
|
}
|
||||||
@ -662,7 +662,7 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
throw new Exception("Invalid tool type ID");
|
throw new Exception("Invalid tool type ID");
|
||||||
|
|
||||||
using DbConnection conn = GetDbConnection();
|
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)
|
if (pageNo.HasValue && pageSize.HasValue)
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,9 @@ public class HeaderCommon
|
|||||||
public string? Title { get; set; }
|
public string? Title { get; set; }
|
||||||
public string? Recipe { get; set; }
|
public string? Recipe { get; set; }
|
||||||
public DateTime Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
public long ToolID { get; set; }
|
public long ToolTypeID { get; set; }
|
||||||
public string? ToolName { 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