narsil/Tanshu.Accounts.PointOfSale/User Management/RoleFactoryBI.cs

40 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using Tanshu.Accounts.Repository;
using Tanshu.Accounts.Contracts;
namespace Tanshu.Accounts.PointOfSale
{
public class RoleFactoryBI
{
private RoleFactoryBI()
{ }
private static RoleBI GetRoleBI(RoleConstants role)
{
RoleBI roleBI;
if (Session.User != null)
roleBI = new RoleBI(role.Role, Session.User.UserID);
else
roleBI = new RoleBI(role.Role, -1);
return roleBI;
//bool repeat = true;
//while (!roleBI.IsAllowed && repeat)
//{
// using (LoginForm frm = new LoginForm())
// {
// frm.ShowDialog();
// string userName;
// if (frm.Cancelled)
// repeat = false;
// else if (frm.UserName(out userName))
// roleBI.Evelvate(frm.UserName);
// }
//}
//return roleBI;
}
}
}