narsil/Tanshu.Accounts.PointOfSale/Authentication/Session.cs

38 lines
881 B
C#
Raw Normal View History

2011-01-06 07:17:00 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tanshu.Accounts.Contracts;
using Tanshu.Accounts.Repository;
using System.Configuration;
using Tanshu.Accounts.Entities.Auth;
2011-01-06 07:17:00 +00:00
namespace Tanshu.Accounts.PointOfSale
{
static class Session
{
private static User currentUser;
2011-01-06 07:17:00 +00:00
public static bool IsAuthenticated { get; private set; }
public static User User
2011-01-06 07:17:00 +00:00
{
get
{
return currentUser;
}
set
{
if (value != null)
{
currentUser = value;
IsAuthenticated = true;
}
else
{
currentUser = null;
IsAuthenticated = false;
}
}
}
}
}