Ready to Test
This commit is contained in:
77
Archive/Views/Pages/AwaitingDispo.cshtml
Normal file
77
Archive/Views/Pages/AwaitingDispo.cshtml
Normal file
@ -0,0 +1,77 @@
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Awaiting Disposition";
|
||||
}
|
||||
|
||||
<h4>Awaiting Disposition</h4>
|
||||
|
||||
<div style="height: 450px;">
|
||||
<table id="grid"></table>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
||||
<div class="col-xs-1">
|
||||
<input type="button" id="OpenButton" value="Open" />
|
||||
</div>
|
||||
<div class="col-xs-1">
|
||||
<input type="button" id="RefreshButton" value="Refresh" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#grid").igGrid({
|
||||
autoGenerateColumns: false,
|
||||
width: "70%",
|
||||
height: "100%",
|
||||
primaryKey: "PK",
|
||||
columns: [
|
||||
{ key: "PK", dataType: "string", hidden: true, },
|
||||
{ key: "ID", dataType: "number", hidden: true, },
|
||||
{ key: "ToolTypeID", dataType: "number", hidden: true, },
|
||||
{ headerText: "Tool Type", key: "ToolType", dataType: "string", width: "15%" },
|
||||
{ key: "Tool", dataType: "string", width: "10%" },
|
||||
{ key: "Reactor", dataType: "string", width: "10%" },
|
||||
{ key: "RDS", dataType: "string", width: "10%" },
|
||||
{ key: "PSN", dataType: "string", width: "10%" },
|
||||
{ key: "Layer", dataType: "string", width: "10%" },
|
||||
{ key: "Zone", dataType: "string", width: "10%" },
|
||||
{ key: "InsertDate", dataType: "date", width: "10%", format: "dateTime" },
|
||||
{ key: "Expiration", dataType: "date", width: "10%", format: "dateTime" }
|
||||
],
|
||||
dataSource: "@Url.Content("~/api/awaitingdispo/")",
|
||||
responseDataKey: "Results",
|
||||
tabIndex: 1,
|
||||
features: [
|
||||
{ name: "Selection", mode: "row", multipleSelection: false },
|
||||
{ name: "Filtering", type: "local"},
|
||||
{ name: "Sorting", type:"local"},
|
||||
]
|
||||
});
|
||||
|
||||
function LoadRunInfo() {
|
||||
var row = $("#grid").igGrid("selectedRow");
|
||||
if (row == null)
|
||||
return;
|
||||
var data = $("#grid").igGrid("findRecordByKey", row.id);
|
||||
if (data == null)
|
||||
return;
|
||||
var targetURL = "@Url.Action("RunInfo")?tooltypeid=" + data.ToolTypeID + "&headerid=" + data.ID;
|
||||
window.location.href = targetURL;
|
||||
}
|
||||
|
||||
$("#RefreshButton").click(function () {
|
||||
$("#grid").igGrid("dataBind");
|
||||
});
|
||||
|
||||
$("#OpenButton").click(LoadRunInfo);
|
||||
|
||||
$("#grid").on("dblclick", "tr", LoadRunInfo);
|
||||
});
|
||||
|
||||
setInterval(function () {
|
||||
$("#RefreshButton").click();
|
||||
}, 60000);
|
||||
|
||||
</script>
|
Reference in New Issue
Block a user