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 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<IProdBonusAttnService>(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<ProdBonusAttn> Get()
|
|
|
|
|
//{
|
|
|
|
|
// #region Cache Header
|
|
|
|
|
|
|
|
|
|
// List<ProdBonusAttn> ProdBonusAttns = _cache["Get"] as List<ProdBonusAttn>;
|
|
|
|
|
// 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<ProdBonusAttn> Get(int setupID, int ScheduleID)
|
|
|
|
|
//{
|
|
|
|
|
// List<ProdBonusAttn> ProdBonusAttns = new List<ProdBonusAttn>();
|
|
|
|
|
// try
|
|
|
|
|
// {
|
|
|
|
|
// ProdBonusAttns = Service.Get(setupID, ScheduleID);
|
|
|
|
|
// }
|
|
|
|
|
// catch (ServiceException e)
|
|
|
|
|
// {
|
|
|
|
|
// throw new Exception(e.Message, e);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// return ProdBonusAttns;
|
|
|
|
|
//}
|
|
|
|
|
//public static List<ProdBonusAttn> Get(EnumStatus status)
|
|
|
|
|
//{
|
|
|
|
|
// #region Cache Header
|
|
|
|
|
|
|
|
|
|
// List<ProdBonusAttn> ProdBonusAttns = _cache["Get", status] as List<ProdBonusAttn>;
|
|
|
|
|
// 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<ProdBonusAttn> GetBySetupID(int iD)
|
|
|
|
|
//{
|
|
|
|
|
// List<ProdBonusAttn> ProdBonusAttns = new List<ProdBonusAttn>();
|
|
|
|
|
// try
|
|
|
|
|
// {
|
|
|
|
|
// ProdBonusAttns = Service.GetBySetupID(iD);
|
|
|
|
|
// }
|
|
|
|
|
// catch (ServiceException e)
|
|
|
|
|
// {
|
|
|
|
|
// throw new Exception(e.Message, e);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// return ProdBonusAttns;
|
|
|
|
|
//}
|
|
|
|
|
//public static List<ProdBonusAttn> GetByLineID(int lineID)
|
|
|
|
|
//{
|
|
|
|
|
// List<ProdBonusAttn> ProdBonusAttns = new List<ProdBonusAttn>();
|
|
|
|
|
// 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<ProdBonusAttn> 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<ProdBonusAttn> Get();
|
|
|
|
|
|
|
|
|
|
int Save(ProdBonusAttn item);
|
|
|
|
|
void Delete(int id);
|
|
|
|
|
|
|
|
|
|
void Save(List<ProdBonusAttn> oProdBonusAttns, int bSetupID, int scheduleID, DateTime date);
|
|
|
|
|
|
|
|
|
|
List<ProdBonusAttn> Get(int setupID, int ScheduleID);
|
|
|
|
|
List<ProdBonusAttn> Get(int setupID, DateTime dateTime);
|
2024-11-14 16:34:31 +06:00
|
|
|
|
List<ProdBonusAttn> GetBySetupLineDate(int setupID, int lineID, DateTime dateTime);
|
2024-10-14 10:01:49 +06:00
|
|
|
|
List<ProdBonusAttn> GetBySetupID(int iD);
|
|
|
|
|
List<ProdBonusAttn> GetBySetupIDs(string iDs);
|
|
|
|
|
|
|
|
|
|
List<ProdBonusAttn> GetByLineID(int lineID);
|
|
|
|
|
List<ProdBonusAttn> GetbySetupAndLineID(int setupID, int lineID);
|
2024-11-14 16:34:31 +06:00
|
|
|
|
DateTime? GetMaxDate(int setupID, int lineID, DateTime date);
|
2024-10-14 10:01:49 +06:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|