using Ease.Core.Model; using System; using System.Collections.Generic; using System.Data; namespace HRM.BO { #region ProdBonusLine public class ProdBonusLine : BasicBaseObject { #region Constructor public ProdBonusLine() { _scheduledHour = 0; } #endregion #region Properties #region ProdBonusSetupID : ID private int _prodBonusSetupID; public int ProdBonusSetupID { get { return _prodBonusSetupID; } set { _prodBonusSetupID = value; } } #endregion #region LineName : string private string _lineName; public string LineName { get { return _lineName; } set { _lineName = value; } } //#region Property ProdBonusParameters : ProdBonusParameters //private List _prodBonusParameter; //public List ProdBonusParameters //{ // get // { // if (_prodBonusParameter == null && !this.ID.IsUnassigned && this.ID.Integer > 0) // { // _prodBonusParameter = Service.GetProdBonusParameters(this.ID); // } // return _prodBonusParameter; // } // set // { // _prodBonusParameter = value; // } //} //#endregion #endregion #region LineAchievedPercent : double private double _lineAchievedPercent; public double LineAchievedPercent { get { return _lineAchievedPercent; } set { _lineAchievedPercent = value; } } #endregion #region OTHour : double private double _lineOTHour; public double LineOTHour { get { return _lineOTHour; } set { _lineOTHour = value; } } #endregion #region ScheduledHour : double private double _scheduledHour; public double ScheduledHour { get { return _scheduledHour; } set { _scheduledHour = value; } } #endregion public List ProdBonusWorkSchedules { get; set; } public List ProdBonusSupervisors { get; set; } public List ProdBonusParameters { get; set; } //#region EmployeeID : ID //private int _employeeID; //public int EmployeeID //{ // get { return _employeeID; } // set // { // // _employeeID = value; // } //} //#endregion //#region Property ProdBonusWorkSchedule : ProdBonusWorkSchedules //private List _prodBonusWorkSchedule; //public List ProdBonusWorkSchedules //{ // get // { // if (_prodBonusWorkSchedule == null && !this.ID.IsUnassigned && this.ID.Integer > 0) // { // _prodBonusWorkSchedule = Service.GetProdBonusWorkSchedules(this.ID); // } // return _prodBonusWorkSchedule; // } // set // { // _prodBonusWorkSchedule = value; // } //} //#endregion //#region Property ProdBonusSupervisor : ProdBonusSupervisors //private List _prodBonusSupervisor; //public List ProdBonusSupervisors //{ // get // { // if (_prodBonusSupervisor == null && !this.ID.IsUnassigned && this.ID.Integer > 0) // { // _prodBonusSupervisor = Service.GetProdBonusSupervisors(this.ID); // } // return _prodBonusSupervisor; // } // set // { // _prodBonusSupervisor = value; // } //} //#endregion //#region Service Factory IProdBonusLineService : IProdBonusLineService //internal static IProdBonusLineService Service //{ // get { return Services.Factory.CreateService(typeof(IProdBonusLineService)); } //} //#endregion #endregion //#region Functions //public static ProdBonusLine Get(int nID) //{ // ProdBonusLine oProdBonusSupervisor = null; // #region Cache Header // oProdBonusSupervisor = (ProdBonusLine)_cache["Get", nID]; // if (oProdBonusSupervisor != null) // return oProdBonusSupervisor; // #endregion // oProdBonusSupervisor = ProdBonusLine.Service.Get(nID); // #region Cache Footer // _cache.Add(oProdBonusSupervisor, "Get", nID); // #endregion // return oProdBonusSupervisor; //} //public static List Get() //{ // #region Cache Header // List ProdBonusSupervisors = _cache["Get"] as List; // if (ProdBonusSupervisors != null) // return ProdBonusSupervisors; // #endregion // try // { // ProdBonusSupervisors = Service.Get(); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(ProdBonusSupervisors, "Get"); // #endregion // return ProdBonusSupervisors; //} //public int Save() //{ // this.SetAuditTrailProperties(); // return ProdBonusLine.Service.Save(this); //} //public void Delete(int id) //{ // ProdBonusLine.Service.Delete(id); //} //#endregion } #endregion #region ProdBonusLine Service public interface IProdBonusLineService { ProdBonusLine Get(int id); List Get(); int Save(ProdBonusLine item); void Delete(int id); List GetLines(int id); List GetProdBonusParameters(int iD); List GetProdBonusWorkSchedules(int iD); List GetProdBonusSupervisors(int iD); List GetLineBySetupId(int setupID); } #endregion }