EchoTex_Payroll/HRM.BO/Bonus/ProdBonusLine.cs

259 lines
6.5 KiB
C#
Raw Normal View History

2024-10-14 10:01:49 +06:00
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> _prodBonusParameter;
//public List<ProdBonusParameter> 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<ProdBonusWorkSchedule> ProdBonusWorkSchedules { get; set; }
public List<ProdBonusSupervisor> ProdBonusSupervisors { get; set; }
public List<ProdBonusParameter> 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> _prodBonusWorkSchedule;
//public List<ProdBonusWorkSchedule> 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> _prodBonusSupervisor;
//public List<ProdBonusSupervisor> 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<IProdBonusLineService>(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<ProdBonusLine> Get()
//{
// #region Cache Header
// List<ProdBonusLine> ProdBonusSupervisors = _cache["Get"] as List<ProdBonusLine>;
// 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<ProdBonusLine> Get();
int Save(ProdBonusLine item);
void Delete(int id);
List<ProdBonusLine> GetLines(int id);
List<ProdBonusParameter> GetProdBonusParameters(int iD);
List<ProdBonusWorkSchedule> GetProdBonusWorkSchedules(int iD);
List<ProdBonusSupervisor> GetProdBonusSupervisors(int iD);
List<ProdBonusLine> GetLineBySetupId(int setupID);
}
#endregion
}