using Ease.Core.Model; using System; using System.Collections.Generic; using System.Data; namespace HRM.BO { #region ProdBonusAttn public class ProdBonusAttn : BasicBaseObject { #region Constructor #region Input validator #endregion public ProdBonusAttn() { _isCommon = false; } #endregion #region Properties #region ProdBonusSetupID : ID private int _prodBonusSetupID; public int ProdBonusSetupID { get { return _prodBonusSetupID; } set { _prodBonusSetupID = value; } } #endregion #region BonusScheduleID : ID private int _bonusScheduleID; public int BonusScheduleID { get { return _bonusScheduleID; } set { _bonusScheduleID = value; } } #endregion #region ProdBonusLineID : ID private int _prodBonusLineID; public int ProdBonusLineID { get { return _prodBonusLineID; } set { _prodBonusLineID = value; } } #endregion #region InTime : DateTime private DateTime _inTime; public DateTime InTime { get { return _inTime; } set { _inTime = value; } } #endregion #region OutTime : DateTime private DateTime _outTime; public DateTime OutTime { get { return _outTime; } set { _outTime = value; } } #endregion #region BonusHour : float private double _bonusHour; public double BonusHour { get { return _bonusHour; } set { _bonusHour = value; } } #endregion #region EmployeeID : ID private int _employeeID; public int EmployeeID { get { return _employeeID; } set { _employeeID = value; } } #endregion #region IsCommon : bool private bool _isCommon; public bool IsCommon { get { return _isCommon; } set { _isCommon = value; } } #endregion #region Service Factory IProdBonusAttnService : IProdBonusAttnService internal static IProdBonusAttnService Service { get { return Services.Factory.CreateService(typeof(IProdBonusAttnService)); } } #endregion #endregion //#region Functions //public static ProdBonusAttn Get(int nID) //{ // ProdBonusAttn oProdBonusAttn = null; // #region Cache Header // oProdBonusAttn = (ProdBonusAttn)_cache["Get", nID]; // if (oProdBonusAttn != null) // return oProdBonusAttn; // #endregion // oProdBonusAttn = ProdBonusAttn.Service.Get(nID); // #region Cache Footer // _cache.Add(oProdBonusAttn, "Get", nID); // #endregion // return oProdBonusAttn; //} //public static List Get() //{ // #region Cache Header // List ProdBonusAttns = _cache["Get"] as List; // if (ProdBonusAttns != null) // return ProdBonusAttns; // #endregion // try // { // ProdBonusAttns = Service.Get(); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(ProdBonusAttns, "Get"); // #endregion // return ProdBonusAttns; //} //public static List Get(int setupID, int ScheduleID) //{ // List ProdBonusAttns = new List(); // try // { // ProdBonusAttns = Service.Get(setupID, ScheduleID); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // return ProdBonusAttns; //} //public static List Get(EnumStatus status) //{ // #region Cache Header // List ProdBonusAttns = _cache["Get", status] as List; // if (ProdBonusAttns != null) // return ProdBonusAttns; // #endregion // try // { // //ProdBonusAttns = Service.Get(status); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(ProdBonusAttns, "Get", status); // #endregion // return ProdBonusAttns; //} //public static List GetBySetupID(int iD) //{ // List ProdBonusAttns = new List(); // try // { // ProdBonusAttns = Service.GetBySetupID(iD); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // return ProdBonusAttns; //} //public static List GetByLineID(int lineID) //{ // List ProdBonusAttns = new List(); // try // { // ProdBonusAttns = Service.GetByLineID(lineID); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // return ProdBonusAttns; //} //public int Save() //{ // this.SetAuditTrailProperties(); // return ProdBonusAttn.Service.Save(this); //} //public static void SaveAll(List oProdBonusAttns,int bSetupID, int scheduleID) //{ // foreach (ProdBonusAttn item in oProdBonusAttns) // { // item.SetAuditTrailProperties(); // } // ProdBonusAttn.Service.Save(oProdBonusAttns, bSetupID, scheduleID); //} //public void Delete(int id) //{ // ProdBonusAttn.Service.Delete(id); //} //#endregion } #endregion #region IProdBonusAttn Service public interface IProdBonusAttnService { ProdBonusAttn Get(int id); List Get(); int Save(ProdBonusAttn item); void Delete(int id); void Save(List oProdBonusAttns, int bSetupID, int scheduleID, DateTime date); List Get(int setupID, int ScheduleID); List Get(int setupID, DateTime dateTime); List GetBySetupLineDate(int setupID, int lineID, DateTime dateTime); List GetBySetupID(int iD); List GetBySetupIDs(string iDs); List GetByLineID(int lineID); List GetbySetupAndLineID(int setupID, int lineID); DateTime? GetMaxDate(int setupID, int lineID, DateTime date); } #endregion }