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
30 lines
882 B
C#
30 lines
882 B
C#
using System;
|
|
|
|
namespace Fab2ApprovalSystem.Models;
|
|
|
|
public class User {
|
|
public int UserID { get; set; }
|
|
public string LoginID { get; set; }
|
|
public string FirstName { get; set; }
|
|
public string LastName { get; set; }
|
|
public string Email { get; set; }
|
|
public bool IsAdmin { get; set; } = false;
|
|
public bool IsManager { get; set; } = false;
|
|
public bool IsActive { get; set; } = false;
|
|
public bool OOO { get; set; } = false;
|
|
public DateTime OOOStartDate { get; set; }
|
|
public DateTime OOOExpirationDate { get; set; }
|
|
public int DelegatedTo { get; set; }
|
|
|
|
public string GetFullName() =>
|
|
$"{FirstName} {LastName}";
|
|
|
|
public override bool Equals(object? obj) {
|
|
User? u = obj as User;
|
|
|
|
return u is not null && u.UserID == UserID;
|
|
}
|
|
|
|
public override int GetHashCode() =>
|
|
UserID.GetHashCode();
|
|
} |