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(typeof(IPasswordHistoryService)); } } #endregion #region Public Methods public ID Save() { return PasswordHistory.Service.Save(this); } public static ObjectsTemplate Get() { ObjectsTemplate histories = new ObjectsTemplate(); try { histories = Service.Get(); } catch (ServiceException e) { throw new Exception(e.Message, e); } return histories; } public static ObjectsTemplate Get(ID nUserID) { ObjectsTemplate histories = new ObjectsTemplate(); 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 Get(); ObjectsTemplate Get(ID nUserID); ID Save(PasswordHistory item); void Delete(ID id); } #endregion }