CEL_Payroll/Payroll.BO/Users/PasswordHistory.cs
2024-09-17 14:30:13 +06:00

109 lines
2.5 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ease.CoreV35;
using Ease.CoreV35.Model;
using Ease.CoreV35.Caching;
using System.Data.Linq.Mapping;
using System.Data;
using System.Web;
namespace Payroll.BO
{
[Serializable]
public class PasswordHistory : BasicBaseObject
{
public PasswordHistory() { }
#region Public Properties
#region UserID : ID
private ID userID;
public ID UserID
{
get { return userID; }
set { userID = value; }
}
#endregion
#region UserPassword
private string userPassword;
public string UserPassword
{
get { return userPassword; }
set { userPassword = value; }
}
#endregion
#endregion
#region Service Factory IUserService : IUserService
internal static IPasswordHistoryService Service
{
get { return Services.Factory.CreateService<IPasswordHistoryService>(typeof(IPasswordHistoryService)); }
}
#endregion
#region Public Methods
public ID Save()
{
return PasswordHistory.Service.Save(this);
}
public static ObjectsTemplate<PasswordHistory> Get()
{
ObjectsTemplate<PasswordHistory> histories = new ObjectsTemplate<PasswordHistory>();
try
{
histories = Service.Get();
}
catch (ServiceException e)
{
throw new Exception(e.Message, e);
}
return histories;
}
public static ObjectsTemplate<PasswordHistory> Get(ID nUserID)
{
ObjectsTemplate<PasswordHistory> histories = new ObjectsTemplate<PasswordHistory>();
try
{
histories = Service.Get(nUserID);
}
catch (ServiceException e)
{
throw new Exception(e.Message, e);
}
return histories;
}
public void Delete()
{
Service.Delete(ID);
}
#endregion
}
#region IUser Service
public interface IPasswordHistoryService
{
ObjectsTemplate<PasswordHistory> Get();
ObjectsTemplate<PasswordHistory> Get(ID nUserID);
ID Save(PasswordHistory item);
void Delete(ID id);
}
#endregion
}