public static void DeleteUserRelation(int id, string userName) { UserPermissions.DeleteFieldPermissions(id, 0); UserPermissions.DeleteNodePermissions(id, -2); UserPermissions.DeleteSpecialPermissions(id); UserValidLog.Delete(userName); UserPointLog.Delete(userName); Contacter.DeleteByUserName(userName); }
private void AddPointLog(int point, IList <UserInfo> userList, string reason, string memo) { foreach (UserInfo info in userList) { UserPointLogInfo userPointLogInfo = new UserPointLogInfo(); userPointLogInfo.Inputer = string.IsNullOrEmpty(this.m_FromUser) ? "System" : this.m_FromUser; userPointLogInfo.IP = this.m_FromUserIp; userPointLogInfo.UserName = info.UserName; userPointLogInfo.LogTime = DateTime.Now; userPointLogInfo.Remark = reason; userPointLogInfo.Memo = memo; if (point > 0) { userPointLogInfo.IncomePayOut = 1; } else { userPointLogInfo.IncomePayOut = 2; } userPointLogInfo.Point = Math.Abs(point); UserPointLog.Add(userPointLogInfo); } }