initial add
This commit is contained in:
103
Fab2ApprovalSystem/Views/Training/ViewTrainingPartial.cshtml
Normal file
103
Fab2ApprovalSystem/Views/Training/ViewTrainingPartial.cshtml
Normal file
@ -0,0 +1,103 @@
|
||||
@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() == Session[GlobalVars.SESSION_USERID].ToString() || Session[GlobalVars.IS_ADMIN] != null)
|
||||
{
|
||||
<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>
|
Reference in New Issue
Block a user