using System; using System.Collections.Generic; using System.Linq; using System.Text; using Ease.Core; namespace HRM.BO { #region ShiftTermDetail [Serializable] public class ShiftTermDetail : AuditTrailBase { //#region Cache Store //private static Cache _cache = new Cache(typeof(ShiftTermDetail)); //#endregion #region Constructor public ShiftTermDetail() { _shiftTermID = 0; _hour = 0; _sequenceNo = 0; _termID = 0; } #endregion #region Properties #region shiftTermID : ID private int _shiftTermID; public int ShiftTermID { get { return _shiftTermID; } set { //base.OnPropertyChange("shiftTermID", _shiftTermID, value); _shiftTermID = value; } } #endregion #region hour : double private double _hour; public double Hour { get { return _hour; } set { //base.OnPropertyChange("hour", _hour, value); _hour = value; } } #endregion #region sequenceNo : int private int _sequenceNo; public int SequenceNo { get { return _sequenceNo; } set { //base.OnPropertyChange("sequenceNo", _sequenceNo, value); _sequenceNo = value; } } #endregion #region TermID : ID private int _termID; public int TermID { get { return _termID; } set { //base.OnPropertyChange("TermID", _termID, value); _termID = value; } } #endregion //#region Service Factory IShiftTermDetailService : IShiftTermDetailService //internal static IShiftTermDetailService Service //{ // get { return Services.Factory.CreateService(typeof(IShiftTermDetailService)); } //} //#endregion #endregion //#region Functions //public static ShiftTermDetail Get(ID nID) //{ // ShiftTermDetail oShiftTermDetail = null; // #region Cache Header // oShiftTermDetail = (ShiftTermDetail)_cache["Get", nID]; // if (oShiftTermDetail != null) // return oShiftTermDetail; // #endregion // oShiftTermDetail = ShiftTermDetail.Service.Get(nID); // #region Cache Footer // _cache.Add(oShiftTermDetail, "Get", nID); // #endregion // return oShiftTermDetail; //} //public static ObjectsTemplate Get() //{ // #region Cache Header // ObjectsTemplate shiftTermDetails = _cache["Get"] as ObjectsTemplate; // if (shiftTermDetails != null) // return shiftTermDetails; // #endregion // try // { // shiftTermDetails = Service.Get(); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(shiftTermDetails, "Get"); // #endregion // return shiftTermDetails; //} //public static ObjectsTemplate GetByShiftTermID(ID nShiftTermID) //{ // #region Cache Header // ObjectsTemplate shiftTermDetails = _cache["GetByShiftTermID", nShiftTermID] as ObjectsTemplate; // if (shiftTermDetails != null) // return shiftTermDetails; // #endregion // try // { // shiftTermDetails = Service.GetByShiftTermID(nShiftTermID); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(shiftTermDetails, "GetByShiftTermID", nShiftTermID); // #endregion // return shiftTermDetails; //} //public ID Save() //{ // return ShiftTermDetail.Service.Save(this); //} //public void Delete() //{ // ShiftTermDetail.Service.Delete(ID); //} //#endregion } #endregion //#region IShiftTermDetail Service //public interface IShiftTermDetailService //{ // ShiftTermDetail Get(ID id); // ObjectsTemplate GetByShiftTermID(ID nShiftTermID); // ObjectsTemplate Get(); // ID Save(ShiftTermDetail item); // void Delete(ID id); //} //#endregion }