Added HttpException class for missing HttpException for net8 Wrapped HttpContext.Session, GetJsonResult, IsAjaxRequest and GetUserIdentityName in controllers for net8 Added AuthenticationService to test Fab2ApprovalMKLink code for net8 Compile conditionally flags to debug in dotnet core
202 lines
12 KiB
Plaintext
202 lines
12 KiB
Plaintext
@using Microsoft.AspNet.Identity
|
|
@{
|
|
Layout = "_HomeLayout.cshtml";
|
|
}
|
|
|
|
<!DOCTYPE html>
|
|
<link rel="stylesheet" href="~/Scripts/js.cookie.js" />
|
|
<html>
|
|
<head>
|
|
<meta name="viewport" content="width=device-width" />
|
|
<title>@ViewBag.Title</title>
|
|
</head>
|
|
|
|
|
|
<body>
|
|
@*<body>*@
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<table style="width: 100%">
|
|
<tr>
|
|
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
|
|
|
<label id="header" style="font-size: large; font-weight: bold; color: crimson; font-family: 'Times New Roman'">
|
|
ECN List
|
|
</label><br />
|
|
<label id="headerID" style="font-size: small; font-weight: bold; color: blue; font-family: 'Times New Roman'">
|
|
|
|
</label>
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="ecnTasklistdiv" class="k-content" style="font-size: 11px;">
|
|
@if (GlobalVars.IsAdmin(Session))
|
|
{
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
|
.Name("ecnTasklist")
|
|
.Columns(columns =>
|
|
{
|
|
//columns.Bound(l => l.IssueID);
|
|
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
|
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
|
columns.Bound(l => l.DocumentType);
|
|
columns.Bound(l => l.SubDoc);
|
|
columns.Bound(l => l.Originator);
|
|
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
|
columns.Bound(l => l.Title);
|
|
columns.Bound(l => l.LotNos);
|
|
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" }).Width("350px");
|
|
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
|
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
|
columns.Template(t => { }).HeaderTemplate("").ClientTemplate(@"
|
|
<a href='javascript: void(0)' class='abutton delete' onclick='deleteRowECN(this)' title='button delete'>button delete</a>");
|
|
|
|
})
|
|
//.Events(e => e.DataBound("onAllDocsDB"))
|
|
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
|
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
|
.HtmlAttributes(new { style = "height: 700px;" })
|
|
.Scrollable()
|
|
.Sortable()
|
|
.Filterable(filterable => filterable
|
|
.Extra(false)
|
|
.Operators(operators => operators
|
|
.ForString(str => str
|
|
.Clear()
|
|
.Contains("Contains")
|
|
.DoesNotContain("Does not contain")
|
|
.StartsWith("Starts with")
|
|
.EndsWith("Ends with")
|
|
.IsEqualTo("Is equal to")
|
|
.IsNotEqualTo("Is not equal to ")
|
|
)
|
|
)
|
|
)
|
|
.Pageable(pageable => pageable
|
|
.Refresh(true)
|
|
.PageSizes(true)
|
|
.ButtonCount(5))
|
|
|
|
.DataSource(dataSource => dataSource
|
|
.Ajax()
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.IssueID);
|
|
|
|
//model.Field(p => p.TotalCost).Editable(false);
|
|
})
|
|
//.Events(e => e.RequestEnd("LoadState"))
|
|
.PageSize(50)
|
|
.Read(read => read.Action("GetECNList", "Home"))
|
|
.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
|
)
|
|
)
|
|
}
|
|
else
|
|
{
|
|
|
|
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
|
.Name("ecnTasklist")
|
|
.Columns(columns =>
|
|
{
|
|
//columns.Bound(l => l.IssueID);
|
|
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
|
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
|
columns.Bound(l => l.DocumentType);
|
|
columns.Bound(l => l.SubDoc);
|
|
columns.Bound(l => l.Originator);
|
|
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
|
columns.Bound(l => l.Title);
|
|
columns.Bound(l => l.LotNos);
|
|
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" }).Width("350px");
|
|
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
|
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
|
})
|
|
//.Events(e => e.DataBound("onAllDocsDB"))
|
|
// .Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
|
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
|
.HtmlAttributes(new { style = "height: 700px;" })
|
|
.Scrollable()
|
|
.Sortable()
|
|
.Filterable(filterable => filterable
|
|
.Extra(false)
|
|
.Operators(operators => operators
|
|
.ForString(str => str
|
|
.Clear()
|
|
.Contains("Contains")
|
|
.DoesNotContain("Does not contain")
|
|
.StartsWith("Starts with")
|
|
.EndsWith("Ends with")
|
|
.IsEqualTo("Is equal to")
|
|
.IsNotEqualTo("Is not equal to ")
|
|
)
|
|
)
|
|
)
|
|
.Pageable(pageable => pageable
|
|
.Refresh(true)
|
|
.PageSizes(true)
|
|
.ButtonCount(5))
|
|
|
|
.DataSource(dataSource => dataSource
|
|
|
|
.Ajax()
|
|
.Model(model =>
|
|
{
|
|
model.Id(p => p.IssueID);
|
|
|
|
//model.Field(p => p.TotalCost).Editable(false);
|
|
})
|
|
// .Events(e => e.RequestEnd("LoadState"))
|
|
.PageSize(50)
|
|
.Read(read => read.Action("GetECNList", "Home"))
|
|
.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
|
)
|
|
|
|
)
|
|
}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="ReAssignApproval" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval From: <label class="bg-danger" id="ReAssignApproverFromLabel">Me</label></h4>
|
|
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval to:</h4>
|
|
<div id='lstReAssignApproval'>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
<button type="button" class="btn btn-primary" id="ConfirmReAssignment">Confirm Re-assignment</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
function deleteRowECN(element) {
|
|
grid = $("#ecnTasklist").data("kendoGrid");
|
|
grid.removeRow($(element).closest("tr"));
|
|
}
|
|
</script>
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|