EchoTex_Payroll/HRM.BO/Bonus/ProdBonusProcess.cs

427 lines
9.9 KiB
C#
Raw Permalink 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
{
public class ProdBonusProcess : BasicBaseObject
{
#region Constructor
public ProdBonusProcess()
{
}
#endregion
#region Properties
#region SalaryMonth : DateTime
private DateTime _SalaryMonth;
public DateTime SalaryMonth
{
get { return _SalaryMonth; }
set { _SalaryMonth = value; }
}
#endregion
#region ProcessDate : DateTime
private DateTime _ProcessDate;
public DateTime ProcessDate
{
get { return _ProcessDate; }
set { _ProcessDate = value; }
}
#endregion
public List<ProdBonusProcessEmp> ProdBonusProcessEmps { get; set; }
public List<ProdBonusProcessItem> ProdBonusProcessItems { get; set; }
public List<ADParameterEmployee> ADParamEmps { get; set; }
//#region Property ProdBonusProcessEmps : ProdBonusProcessEmp
//private List<ProdBonusProcessEmp> _ProdBonusProcessEmps;
//public List<ProdBonusProcessEmp> ProdBonusProcessEmps
//{
// get
// {
// if (_ProdBonusProcessEmps == null && !this.ID.IsUnassigned && this.ID.Integer > 0)
// {
// _ProdBonusProcessEmps = Service.GetProdBonusProcessEmps(this.ID);
// }
// return _ProdBonusProcessEmps;
// }
// set
// {
// _ProdBonusProcessEmps = value;
// }
//}
//#endregion
//#region Property ProdBonusProcessItems : ProdBonusProcessItem
//private List<ProdBonusProcessItem> _ProdBonusProcessItems;
//public List<ProdBonusProcessItem> ProdBonusProcessItems
//{
// get
// {
// if (_ProdBonusProcessItems == null && !this.ID.IsUnassigned && this.ID.Integer > 0)
// {
// _ProdBonusProcessItems = Service.GetProdBonusProcessItems(this.ID);
// }
// return _ProdBonusProcessItems;
// }
// set
// {
// _ProdBonusProcessItems = value;
// }
//}
//#endregion
#endregion
//#region Functions
//#region Get All
//public static List<ProdBonusProcess> Get()
//{
// return ProdBonusProcess.Service.Get();
//}
//public static ProdBonusProcessEmp GetProdBonusEmp(int Id, DateTime salaryMonth)
//{
// return ProdBonusProcess.Service.GetProdBonusEmp(Id,salaryMonth);
//}
//#endregion
//#region Get By ID
//public static ProdBonusProcess Get(int id)
//{
// return ProdBonusProcess.Service.Get(id);
//}
//#endregion
//#region Get By Status
//public static List<ProdBonusProcess> Get(DateTime dtSalaryMonth)
//{
// return ProdBonusProcess.Service.Get(dtSalaryMonth);
//}
//#endregion
//#region Get DataSet For Report
//public static DataSet GetMontlyProdBonus(DateTime dBonusMonth)
//{
// DataSet ds = null;
// try
// {
// ds = Service.GetMontlyProdBonus(dBonusMonth);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
//}
//public static DataSet GetProdBonusDetail(int designID)
//{
// DataSet ds = null;
// try
// {
// ds = Service.GetProdBonusDetail(designID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
//}
//public static DataSet EmpDesignWiseProdBonus(DateTime dBonusMonth)
//{
// DataSet ds = null;
// try
// {
// ds = Service.EmpDesignWiseProdBonus(dBonusMonth);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
//}
//#endregion
//#region Save
//public static void Save(List<ProdBonusProcess> items)
//{
// foreach(ProdBonusProcess item in items)
// item.SetAuditTrailProperties();
// ProdBonusProcess.Service.Save(items);
//}
//#endregion
//#region Delete
//public static void Delete(int id)
//{
// ProdBonusProcess.Service.Delete(id);
//}
//#endregion
//#region Undo
//public static void UndoProcess(List<ProdBonusProcess> oProdBonusProsses, ADParameter _ADParam, DateTime dtSalaryMonth)
//{
// ProdBonusProcess.Service.UndoProcess(oProdBonusProsses, _ADParam,dtSalaryMonth);
//}
//#endregion
//#endregion
//#region Service Factory IProdBonusProcess : IProdBonusProcess
//internal static IProdBonusProcessService Service
//{
// get { return Services.Factory.CreateService<IProdBonusProcessService>(typeof(IProdBonusProcessService)); }
//}
//#endregion
}
public class ProdBonusProcessEmp : BasicBaseObject
{
#region Constructor
public ProdBonusProcessEmp()
{
_description = string.Empty;
}
#endregion
#region Properties
#region ProdBonusProcessID : ID
private int _ProdBonusProcessID;
public int ProdBonusProcessID
{
get { return _ProdBonusProcessID; }
set { _ProdBonusProcessID = value; }
}
#endregion
#region EmployeeID : ID
private int _EmployeeID;
public int EmployeeID
{
get { return _EmployeeID; }
set { _EmployeeID = value; }
}
#endregion
#region Amount : Double
private double _Amount;
public double Amount
{
get { return _Amount; }
set { _Amount = value; }
}
#endregion
#region Description : string
private string _description;
public string Description
{
get { return _description; }
set { _description = value; }
}
#endregion
#endregion
}
public class ProdBonusProcessItem : BasicBaseObject
{
#region Constructor
public ProdBonusProcessItem()
{
}
#endregion
#region Properties
#region ProdBonusProcessID : ID
private int _ProdBonusProcessID;
public int ProdBonusProcessID
{
get { return _ProdBonusProcessID; }
set { _ProdBonusProcessID = value; }
}
#endregion
#region ProdBonusSetupID : ID
private int _ProdBonusSetupID;
public int ProdBonusSetupID
{
get { return _ProdBonusSetupID; }
set { _ProdBonusSetupID = value; }
}
#endregion
#region ProdBonusLineID : ID
private int _prodBonusLineID;
public int ProdBonusLineID
{
get { return _prodBonusLineID; }
set { _prodBonusLineID = value; }
}
#endregion
#region EmployeeID : ID
private int _EmployeeID;
public int EmployeeID
{
get { return _EmployeeID; }
set { _EmployeeID = value; }
}
#endregion
#region Amount : double
private double _Amount;
public double Amount
{
get { return _Amount; }
set { _Amount = value; }
}
#endregion
#region OTHour : double
private double _oTHour;
public double OTHour
{
get { return _oTHour; }
set { _oTHour = value; }
}
#endregion
#region AchievePercent : double
private double _achievePercent;
public double AchievePercent
{
get { return _achievePercent; }
set { _achievePercent = value; }
}
#endregion
#region WorkingHour : double
private double _workingHour;
public double WorkingHour
{
get { return _workingHour; }
set { _workingHour = value; }
}
#endregion
#region WorkingHour : double
private string _description;
public string Description
{
get { return _description; }
set { _description = value; }
}
#endregion
#endregion
}
#region IProdBonusProcess Service
public interface IProdBonusProcessService
{
List<ProdBonusProcess> Get();
List<ProdBonusProcess> Get(DateTime dtSalaryMonth);
DataSet GetDetailItems(DateTime dtSalaryMonth);
ProdBonusProcess Get(int id);
void Save(ProdBonusProcess item);
void Save(List<ProdBonusProcess> items);
void Delete(int id);
List<ProdBonusProcessEmp> GetProdBonusProcessEmps(int nProcessID);
List<ProdBonusProcessItem> GetProdBonusProcessItems(int nProcessID);
DataSet GetMontlyProdBonus(DateTime dBonusMonth);
DataSet GetProdBonusDetail(int designID);
DataSet EmpDesignWiseProdBonus(DateTime dBonusMonth);
ProdBonusProcess Process(List<ProductionBonusSetup> _oProductionBonusSetups, DateTime SalaryMonth, int payrollTypeId);
void UndoProcess(List<ProdBonusProcess> oProdBonusProsses, ADParameter _ADParam, DateTime dtSalaryMonth);
ProdBonusProcessEmp GetProdBonusEmp(int Id, DateTime salaryMonth);
}
#endregion
}