68 lines
1.9 KiB
C#
68 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace HRM.BO
|
|
{
|
|
#region BadLoginAttemptInfo
|
|
|
|
public class BadLoginAttemptInfo : BasicBaseObject
|
|
{
|
|
#region Constructor
|
|
|
|
public BadLoginAttemptInfo()
|
|
{
|
|
UserID = 0;
|
|
AttemptTime = DateTime.Now;
|
|
PCNumber = string.Empty;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
public int UserID { get; set; }
|
|
public DateTime AttemptTime { get; set; }
|
|
public string PCNumber { get; set; }
|
|
|
|
// Client of the failed login (BadLoginAttemptInfo_ClientInfo_DB_Changes.sql).
|
|
// Filled by BadLoginAttemptInfoService.Save from the HTTP request when not set.
|
|
public string IPAddress { get; set; }
|
|
/// <summary>Mobile / tab device id; null for a browser login.</summary>
|
|
public string DeviceId { get; set; }
|
|
|
|
// Display only, not persisted: filled by GetAuditTrail (joined from Users)
|
|
// for the System Audit Trail screen.
|
|
public string LoginID { get; set; }
|
|
public string UserName { get; set; }
|
|
|
|
|
|
//#region Service Factory IBadLoginAttemptInfoService : IBadLoginAttemptInfoService
|
|
|
|
//internal static IBadLoginAttemptInfoService Service
|
|
//{
|
|
// get { return Services.Factory.CreateService<IBadLoginAttemptInfoService>(typeof(IBadLoginAttemptInfoService)); }
|
|
//}
|
|
|
|
|
|
//#endregion
|
|
|
|
#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IBadLoginAttemptInfo Service
|
|
|
|
public interface IBadLoginAttemptInfoService
|
|
{
|
|
BadLoginAttemptInfo Get(int id);
|
|
List<BadLoginAttemptInfo> Get();
|
|
void Save(BadLoginAttemptInfo item);
|
|
void SaveInThread(BadLoginAttemptInfo item);
|
|
List<BadLoginAttemptInfo> Get(DateTime dtFrom, DateTime dtTo);
|
|
void Delete(int id);
|
|
List<BadLoginAttemptInfo> GetAuditTrail(DateTime dtFrom, DateTime dtTo);
|
|
}
|
|
|
|
#endregion
|
|
} |