using System; using System.Collections.Generic; using System.Linq; using System.Text; using Ease.Core; namespace HRM.BO { #region CardOperation [Serializable] public class CardOperation : AuditTrailBase { #region Constructor public CardOperation() { _cardID = 0; _cardNumber = string.Empty; _status = 0; _employeeID = 0; _comments = string.Empty; _assignDate = DateTime.MinValue; _employee = null; } #endregion #region Properties #region cardID : ID private int _cardID; public int CardID { get { return _cardID; } set { //base.OnPropertyChange("cardID", _cardID, value); _cardID = value; } } #endregion #region cardNumber : string private string _cardNumber; public string CardNumber { get { return _cardNumber; } set { //base.OnPropertyChange("cardNumber", _cardNumber, value); _cardNumber = value; } } #endregion #region Status : EnumCardStatus private EnumCardStatus _status; public EnumCardStatus Status { get { return _status; } set { // base.OnPropertyChange("Status", _status, value); _status = value; } } #endregion #region employeeID : ID private int _employeeID; public int EmployeeID { get { return _employeeID; } set { //base.OnPropertyChange("employeeID", _employeeID, value); _employeeID = value; } } #endregion #region comments : string private string _comments; public string Comments { get { return _comments; } set { //base.OnPropertyChange("comments", _comments, value); _comments = value; } } #endregion #region assignDate : DateTime private DateTime _assignDate; public DateTime AssignDate { get { return _assignDate; } set { //base.OnPropertyChange("assignDate", _assignDate, value); _assignDate = value; } } #endregion #region expiredDatew: Date; private DateTime _expiredDate; public DateTime ExpiredDate { get { return _expiredDate; } set { _expiredDate = value; } } #endregion #region cardExpiredDatew: Date; private DateTime _cardExpiredDate; public DateTime CardExpiredDate { get { return _cardExpiredDate; } set { //base.OnPropertyChange("assignDate", _assignDate, value); _cardExpiredDate = value; } } #endregion #region employee : Employee private Employee _employee; public Employee Employee { get { //if (_employeeID.Integer > 0 && _employee == null) //{ // _employee = new Employee(); // _employee = Employee.Get(_employeeID); //} return this._employee; } set { _employee = value; } } #endregion #region AccessCard : AccessCard private AccessCard _accessCard; public AccessCard AccessCard { get { //if (_cardID.Integer > 0 && _accessCard == null) //{ // _accessCard = new AccessCard(); // _accessCard = AccessCard.Get(_cardID); //} return this._accessCard; } set { _accessCard = value; } } #endregion //for Excel Data Upload private Shift _shift; public Shift Shift { get { if (_shift == null) { _shift = new Shift(); } return _shift; } set { _shift = value; } } #endregion } #endregion public interface ICardOperationService { void AssignCardToEmployee(List cardOperations); void DetachCardFromEmployee(int EmployeeID, string CardNumber, DateTime DetachDateDate, EnumCardStatus cardStatus); DateTime LastCardOperationDate(int EmpID); void AssignCardToEmployee(int EmployeeID, string CardNumber, DateTime AssignDate, int userid); CardOperation Get(int id); CardOperation GetByCardID(int nID); CardOperation GetByEmpIDAndCardID(int EmpID, int CardID); CardOperation Get(string CardNumber); List Get(); int Save(CardOperation item); void Save(List _cardOperations, int payrollTypeId); void Delete(int id); } }