コード例 #1
0
 public void AddUserRole(int PortalID, int UserId, int RoleId, System.DateTime EffectiveDate, System.DateTime ExpiryDate)
 {
     UserInfo objUser = UserController.GetUserById(PortalID, UserId);
     UserRoleInfo objUserRole = GetUserRole(PortalID, UserId, RoleId);
     Services.Log.EventLog.EventLogController objEventLog = new Services.Log.EventLog.EventLogController();
     if (objUserRole == null)
     {
         objUserRole = new UserRoleInfo();
         objUserRole.UserID = UserId;
         objUserRole.RoleID = RoleId;
         objUserRole.PortalID = PortalID;
         objUserRole.EffectiveDate = EffectiveDate;
         objUserRole.ExpiryDate = ExpiryDate;
         provider.AddUserToRole(PortalID, objUser, objUserRole);
         objEventLog.AddLog(objUserRole, PortalController.GetCurrentPortalSettings(), UserController.GetCurrentUserInfo().UserID, "", Services.Log.EventLog.EventLogController.EventLogType.USER_ROLE_CREATED);
     }
     else
     {
         objUserRole.EffectiveDate = EffectiveDate;
         objUserRole.ExpiryDate = ExpiryDate;
         provider.UpdateUserRole(objUserRole);
         objEventLog.AddLog(objUserRole, PortalController.GetCurrentPortalSettings(), UserController.GetCurrentUserInfo().UserID, "", Services.Log.EventLog.EventLogController.EventLogType.USER_ROLE_UPDATED);
     }
 }
コード例 #2
0
 public abstract void RemoveUserFromRole(int portalId, UserInfo user, UserRoleInfo userRole);
コード例 #3
0
 public abstract void UpdateUserRole(UserRoleInfo userRole);
コード例 #4
0
 public abstract bool AddUserToRole(int portalId, UserInfo user, UserRoleInfo userRole);