NET8
This commit is contained in:
@ -74,12 +74,12 @@ else
|
||||
}
|
||||
</style>
|
||||
<div id="cover-spin"></div>
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<a href="/Training/ViewTrainings" class="btn btn-primary">Back To Trainings</a>
|
||||
}
|
||||
@Html.ActionLink("Go to ECN", "ReadOnly", "ECN", new { IssueID = Convert.ToInt32(ViewBag.ECNNumber) }, new { @class = "btn btn-primary" })
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<button class="btn btn-primary" id="openAddUserBtn">Add User</button>
|
||||
<button class="btn btn-primary" id="openAddGroupBtn">Add Group</button>
|
||||
@ -98,7 +98,7 @@ else
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.status)
|
||||
</th>
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<th>
|
||||
|
||||
@ -130,7 +130,7 @@ else
|
||||
<td>Incomplete</td>
|
||||
}
|
||||
<td>
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null && item.status != true)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session) && item.status != true)
|
||||
{
|
||||
|
||||
<button class="btn btn-primary" onclick="DeleteAssignment(@item.ID)">Delete</button>
|
||||
@ -138,7 +138,7 @@ else
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if (Session[GlobalVars.IS_ADMIN] != null && item.status != true)
|
||||
@if (GlobalVars.IsAdminValueNotNull(Session) && item.status != true)
|
||||
{
|
||||
|
||||
<button id="ReminderButton" class="btn btn-primary" onclick="SendReminder(@item.UserID, @item.ID, @Convert.ToInt32(ViewBag.ECNNumber))">Remind</button>
|
||||
|
@ -18,7 +18,7 @@
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
if (item.UserID.ToString() == Session[GlobalVars.SESSION_USERID].ToString() || Session[GlobalVars.IS_ADMIN] != null)
|
||||
if (item.UserID.ToString() == GlobalVars.GetUserIdValue(Session) || GlobalVars.IsAdminValueNotNull(Session))
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -137,7 +137,7 @@
|
||||
<td>
|
||||
@Html.ActionLink("View", "ViewTrainingAssignments", new { trainingID = item.TrainingID }, new { @class = "btn btn-primary" })
|
||||
</td>
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN] == true)
|
||||
@if (GlobalVars.IsAdmin(Session))
|
||||
{
|
||||
<td>
|
||||
@Html.ActionLink("Delete", "DeleteTrainingByID", new { trainingId = item.TrainingID }, new { @class = "btn btn-primary" })
|
||||
|
Reference in New Issue
Block a user