/// reset the static variables for each Web Request call. public static void ResetStaticVariables() { UUserManager = null; UErrorLog = null; ULoginLog = null; UMaintenanceLogonMessage = null; }
public static ILoginLog GetFactory() { if (factory == null) { Type type = Type.GetType("Common." + SystemDefaultConfig.DatabaseProvider + "Repository.LoginLogDAL,Common." + SystemDefaultConfig.DatabaseProvider + "Repository", true); factory = (ILoginLog)Activator.CreateInstance(type); } return(factory); }
public UserController(IUser _iuser, IRole _irole, IDepartment _idepartment, IMenu _imenu, ILoginLog _loginLog, IUserReportingHierarchy _iuserReportingHierarchy) { iuser = _iuser; irole = _irole; idepartment = _idepartment; imenu = _imenu; iloginLog = _loginLog; iuserReportingHierarchy = _iuserReportingHierarchy; }
/// <summary> /// initialize variables that are initialized from classes specific to the server, eg. with access to OpenPetra database /// </summary> public static void InitializeStaticVariables( IUserManager AUserManager, IErrorLog AErrorLog, ILoginLog ALoginLog, IMaintenanceLogonMessage AMaintenanceLogonMessage) { UUserManager = AUserManager; UErrorLog = AErrorLog; ULoginLog = ALoginLog; UMaintenanceLogonMessage = AMaintenanceLogonMessage; }
public static void UpdateLogoutTime(string loginAccount) { if (string.IsNullOrWhiteSpace(loginAccount)) { throw new ArgumentNullException("loginAccount"); } ILoginLog factory = LoginLogFactory.GetFactory(); factory.UpdateLogoutTime(loginAccount); }
public static void Add(LoginLog model) { if (model == null) { throw new ArgumentNullException("model"); } ILoginLog factory = LoginLogFactory.GetFactory(); factory.Add(model); }
public LoginLog() : base() { if (isMultiDatabase) { base.Init(this.GetType().FullName, System.Reflection.Assembly.GetExecutingAssembly().GetName().Name, dicmultiDatabase[this.GetType().Name].ToString()); } else { base.Init(this.GetType().FullName, System.Reflection.Assembly.GetExecutingAssembly().GetName().Name); } baseDal.OnOperationLog += new OperationLogEventHandler(OperationLog.OnOperationLog);//如果需要记录操作日志,则实现这个事件 dal = baseDal as ILoginLog; }
public static LoginLogData ToModel(this ILoginLog log, bool withDetails = false) { if (log == null) { return(null); } var data = new LoginLogData() { EventType = log.EventType, LoginId = log.LoginId }; if (withDetails) { data.Notes = log.Notes; } data.AssignCommon(log); return(data); }
public LoginController(IUser _iuser, ILoginLog _iloginLog) { iuser = _iuser; iLoginLog = _iloginLog; }
public LoginLogInfo GetLastLoginInfo(string userId) { ILoginLog baseDal = base.baseDal as ILoginLog; return(baseDal.GetLastLoginInfo(userId)); }
public static Paging <LoginLog> QueryPage(LoginLogCondition condition, int pagesize, int pageindex, out int total) { ILoginLog factory = LoginLogFactory.GetFactory(); return(factory.QueryPage(condition, pagesize, pageindex, out total)); }