/// <summary> /// 为角色添加用户 /// </summary> /// <param name="userId">用户ID</param> /// <param name="roleId">角色ID</param> public void AddUser(Int32 userId, Int32 roleId) { if (IsSuperAdmin(userId)) { BLLFactory <User> .Instance.CancelExpireByUserId(userId); } dal.AddUser(userId, roleId); }
/// <summary> /// 为角色添加用户 /// </summary> /// <param name="userID">用户ID</param> /// <param name="roleID">角色ID</param> public void AddUser(int userID, int roleID) { this.FillAdminID(); if (roleID == m_AdminID) { BLLFactory <User> .Instance.CancelExpire(userID); } roleDal.AddUser(userID, roleID); }