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

40 lines
1.1 KiB
C#
Raw Normal View History

2010-03-02 17:56:21 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using Tanshu.Accounts.Repository;
using Tanshu.Accounts.Contracts;
2010-03-02 17:56:21 +00:00
namespace Tanshu.Accounts.PointOfSale
{
public class RoleFactoryBI
{
private RoleFactoryBI()
{ }
private static RoleBI GetRoleBI(RoleConstants role)
2010-03-02 17:56:21 +00:00
{
2011-01-06 07:17:00 +00:00
RoleBI roleBI;
if (Session.User != null)
roleBI = new RoleBI(role.Role, Session.User.UserID);
2011-01-06 07:17:00 +00:00
else
roleBI = new RoleBI(role.Role, -1);
2010-03-02 17:56:21 +00:00
return roleBI;
2011-01-06 07:17:00 +00:00
//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;
2010-03-02 17:56:21 +00:00
}
}
}