using System; using System.Collections.Generic; using System.Linq; using System.Text; using Ease.Core; using Ease.Core.Model; using System.Data; namespace HRM.BO { #region OTSlab public class OTSlab:AuditTrailBase { #region Constructor public OTSlab() { //_termID = null; //_hours = 0; //_amount = 0; } #endregion #region Properties public int TermID { get; set; } public int Hours { get; set; } public double Amount { get; set; } //#region Service Factory IOTSlabService : IOTSlabService //internal static IOTSlabService Service //{ // get { return Services.Factory.CreateService(typeof(IOTSlabService)); } //} //#endregion #endregion //#region Functions //public static OTSlab Get(ID nID) //{ // OTSlab oOTSlab = null; // #region Cache Header // oOTSlab = (OTSlab)_cache["Get", nID]; // if (oOTSlab != null) // return oOTSlab; // #endregion // oOTSlab = OTSlab.Service.Get(nID); // #region Cache Footer // _cache.Add(oOTSlab, "Get", nID); // #endregion // return oOTSlab; //} //public static List Get() //{ // #region Cache Header // List oTSlabs = _cache["Get"] as List; // if (oTSlabs != null) // return oTSlabs; // #endregion // try // { // oTSlabs = Service.Get(); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oTSlabs, "Get"); // #endregion // return oTSlabs; //} //public static List GetByTermID(ID nTermID) //{ // #region Cache Header // List oTSlabs = _cache["Get",nTermID] as List; // if (oTSlabs != null) // return oTSlabs; // #endregion // try // { // oTSlabs = Service.GetByTermID(nTermID); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oTSlabs, "Get",nTermID); // #endregion // return oTSlabs; //} //public static void Save(List _OTSlabs) //{ // //foreach (OTSlab oTSlab in _OTSlabs) // //{ // // oTSlab.SetAuditTrailProperties(); // //} // OTSlab.Service.Save(_OTSlabs); //} //public ID Save() //{ // return OTSlab.Service.Save(this); //} //public void Delete() //{ // OTSlab.Service.Delete(ID); //} //#endregion } #endregion //#region IOTSlab Service //public interface IOTSlabService //{ // OTSlab Get(ID id); // List Get(); // List GetByTermID(ID nTermID); // ID Save(OTSlab item); // void Save(List _OTSlabs); // void Delete(ID id); //} //#endregion }