narsil/Tanshu.Accounts.PointOfSale/User Management/RoleFactoryBI.cs
2011-01-06 12:47:00 +05:30

39 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using Tanshu.Accounts.BI;
namespace Tanshu.Accounts.PointOfSale
{
public class RoleFactoryBI
{
private RoleFactoryBI()
{ }
public static RoleBI GetRoleBI(string roleID)
{
RoleBI roleBI;
if (Session.User != null)
roleBI = new RoleBI(roleID, Session.User.UserID);
else
roleBI = new RoleBI(roleID, new Guid());
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;
}
}
}