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
104 lines
2.8 KiB
Plaintext
104 lines
2.8 KiB
Plaintext
@model IEnumerable<Fab2ApprovalSystem.Models.TrainingAssignment>
|
|
<input type="hidden" value="@ViewBag.ECNNumber" id="ECNNumber"/>
|
|
<table class="table">
|
|
<tr>
|
|
<th>
|
|
Name
|
|
</th>
|
|
<th>
|
|
Date Assigned
|
|
</th>
|
|
<th>
|
|
Date Completed
|
|
</th>
|
|
<th>
|
|
Status
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
|
|
@foreach (var item in Model) {
|
|
if (item.UserID.ToString() == GlobalVars.GetUserIdValue(Session) || GlobalVars.IsAdminValueNotNull(Session))
|
|
{
|
|
<tr>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.FullName)
|
|
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.DateAssigned)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.DateCompleted)
|
|
</td>
|
|
@if (item.status == true)
|
|
{
|
|
<td>Acknowledged</td>
|
|
}
|
|
else
|
|
{
|
|
<td>Not Acknowledged</td>
|
|
}
|
|
|
|
<td>
|
|
<button type="button" class="btn btn-default" id="CompleteTraining" onclick="CompleteTraining(@item.ID)">Complete Training</button>
|
|
</td>
|
|
</tr>
|
|
}
|
|
|
|
}
|
|
|
|
</table>
|
|
@foreach (var item in Model)
|
|
{
|
|
<div class="modal fade" id="DocumentWin" 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">
|
|
<h4 class="modal-title" id="myModalLabel">Review Affected Documents - </h4>
|
|
</div>
|
|
<div class="modal-body" id="docsDisplay">
|
|
@{Html.RenderAction("ViewTrainingDocsPartial", "Training", new { trainingAssignmentId = item.ID});}
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<script type="text/javascript">
|
|
function CompleteTraining(AssignmentID) {
|
|
$("#DocumentWin").modal('show');
|
|
}
|
|
$('#CompleteTraining').on('click', function () {
|
|
$("#DocumentWin").modal('show');
|
|
//GetDocuments();
|
|
return false;
|
|
})
|
|
function GetDocuments() {
|
|
var ecnNumber = document.getElementById('ECNNumber').value;
|
|
var sendInfo = {
|
|
ecnNumber: ecnNumber
|
|
|
|
};
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "/ECN/Attachment_Read",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(sendInfo),
|
|
dataType: "json",
|
|
success: function (r) {
|
|
//var json = $.parseJSON(r);
|
|
alert('Success');
|
|
RefreshData();
|
|
},
|
|
error: function (req, status, error) {
|
|
alert(error);
|
|
}
|
|
});
|
|
}
|
|
</script>
|