using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WindowsFormsApp4 { public static class Session { public static DatabaseHelper.User CurrentUser { get; set; } public static bool IsLoggedIn => CurrentUser != null; public static bool IsAdmin => CurrentUser?.Role == "admin"; public static bool IsManager => CurrentUser?.Role == "manager"; public static bool IsClient => CurrentUser?.Role == "client"; public static void Logout() { CurrentUser = null; } } }