334 lines
8.8 KiB
C#
334 lines
8.8 KiB
C#
|
using Ease.Core.Model;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Data;
|
|||
|
|
|||
|
namespace HRM.BO
|
|||
|
{
|
|||
|
#region ProductionBonusSetup
|
|||
|
|
|||
|
public class ProductionBonusSetup : BasicBaseObject
|
|||
|
{
|
|||
|
#region Constructor
|
|||
|
|
|||
|
public ProductionBonusSetup()
|
|||
|
{
|
|||
|
_oTHour = 0;
|
|||
|
_salaryMonth = DateTime.MinValue;
|
|||
|
_designNo = string.Empty;
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
|
|||
|
#region AchivedPercent : double
|
|||
|
|
|||
|
private double _achivedPercent;
|
|||
|
|
|||
|
public double AchivedPercent
|
|||
|
{
|
|||
|
get { return _achivedPercent; }
|
|||
|
set { _achivedPercent = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region OTHour : double
|
|||
|
|
|||
|
private double _oTHour;
|
|||
|
|
|||
|
public double OTHour
|
|||
|
{
|
|||
|
get { return _oTHour; }
|
|||
|
set { _oTHour = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region SalaryMonth : string
|
|||
|
|
|||
|
private DateTime _salaryMonth;
|
|||
|
|
|||
|
public DateTime SalaryMonth
|
|||
|
{
|
|||
|
get { return _salaryMonth; }
|
|||
|
set { _salaryMonth = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region DesignNo : string
|
|||
|
|
|||
|
private string _designNo;
|
|||
|
|
|||
|
public string DesignNo
|
|||
|
{
|
|||
|
get { return _designNo; }
|
|||
|
set { _designNo = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region ProgramName : string
|
|||
|
public string ProgramName { get; set; }
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region FromDate : DateTime
|
|||
|
|
|||
|
private DateTime _fromDate;
|
|||
|
|
|||
|
public DateTime FromDate
|
|||
|
{
|
|||
|
get { return _fromDate; }
|
|||
|
set { _fromDate = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region ToDate : DateTime
|
|||
|
|
|||
|
private DateTime _toDate;
|
|||
|
|
|||
|
public DateTime ToDate
|
|||
|
{
|
|||
|
get { return _toDate; }
|
|||
|
set { _toDate = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region ProductionBonusType : EnumProductionBonusType
|
|||
|
public EnumProductionBonusType ProductionBonusType { get; set; }
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region MaxPerson : int
|
|||
|
public int MaxPerson { get; set; }
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Status : EnumBonusStatus
|
|||
|
|
|||
|
private EnumBonusStatus _Status;
|
|||
|
|
|||
|
public EnumBonusStatus Status
|
|||
|
{
|
|||
|
get { return _Status; }
|
|||
|
set { _Status = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
public List<ProdBonusWorkSchedule> ProdBonusWorkSchedules { get; set; }
|
|||
|
public List<ProdBonusLine> ProductionBonusLines { get; set; }
|
|||
|
public List<ProdBonusLine> ProductionBonusLinesNew { get; set; }
|
|||
|
|
|||
|
//#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 ProductionBonusLines : ProductionBonusLine
|
|||
|
|
|||
|
//private List<ProdBonusLine> _ProdBonusLines;
|
|||
|
|
|||
|
//public List<ProdBonusLine> ProductionBonusLines
|
|||
|
//{
|
|||
|
// get
|
|||
|
// {
|
|||
|
// if (_ProdBonusLines == null && !this.ID.IsUnassigned && this.ID.Integer > 0)
|
|||
|
// {
|
|||
|
// _ProdBonusLines = Service.GetProductionBonusLine(this.ID);
|
|||
|
// }
|
|||
|
// return _ProdBonusLines;
|
|||
|
// }
|
|||
|
// set
|
|||
|
// {
|
|||
|
// _ProdBonusLines = value;
|
|||
|
// }
|
|||
|
//}
|
|||
|
|
|||
|
//#endregion
|
|||
|
|
|||
|
//#region Service Factory IProductionBonusSetupService : IProductionBonusSetupService
|
|||
|
|
|||
|
//internal static IProductionBonusSetupService Service
|
|||
|
//{
|
|||
|
// get { return Services.Factory.CreateService<IProductionBonusSetupService>(typeof(IProductionBonusSetupService)); }
|
|||
|
//}
|
|||
|
|
|||
|
//#endregion
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
//#region Functions
|
|||
|
|
|||
|
//public static ProductionBonusSetup Get(int nID)
|
|||
|
//{
|
|||
|
// ProductionBonusSetup oProductionBonusSetup = null;
|
|||
|
// #region Cache Header
|
|||
|
// oProductionBonusSetup = (ProductionBonusSetup)_cache["Get", nID];
|
|||
|
// if (oProductionBonusSetup != null)
|
|||
|
// return oProductionBonusSetup;
|
|||
|
// #endregion
|
|||
|
// oProductionBonusSetup = ProductionBonusSetup.Service.Get(nID);
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(oProductionBonusSetup, "Get", nID);
|
|||
|
// #endregion
|
|||
|
// return oProductionBonusSetup;
|
|||
|
//}
|
|||
|
|
|||
|
//public static ProductionBonusSetup Get(string DesignNo)
|
|||
|
//{
|
|||
|
// ProductionBonusSetup oProductionBonusSetup = null;
|
|||
|
// #region Cache Header
|
|||
|
// oProductionBonusSetup = (ProductionBonusSetup)_cache["Get", DesignNo];
|
|||
|
// if (oProductionBonusSetup != null)
|
|||
|
// return oProductionBonusSetup;
|
|||
|
// #endregion
|
|||
|
// oProductionBonusSetup = ProductionBonusSetup.Service.Get(DesignNo);
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(oProductionBonusSetup, "Get", DesignNo);
|
|||
|
// #endregion
|
|||
|
// return oProductionBonusSetup;
|
|||
|
//}
|
|||
|
|
|||
|
//public static List<ProductionBonusSetup> Get()
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<ProductionBonusSetup> ProductionBonusSetups = _cache["Get"] as List<ProductionBonusSetup>;
|
|||
|
// if (ProductionBonusSetups != null)
|
|||
|
// return ProductionBonusSetups;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// ProductionBonusSetups = Service.Get();
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(ProductionBonusSetups, "Get");
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return ProductionBonusSetups;
|
|||
|
//}
|
|||
|
|
|||
|
//public static List<ProductionBonusSetup> Get(DateTime dtSalaryMonth)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<ProductionBonusSetup> ProductionBonusSetups = _cache["Get"] as List<ProductionBonusSetup>;
|
|||
|
// if (ProductionBonusSetups != null)
|
|||
|
// return ProductionBonusSetups;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// ProductionBonusSetups = Service.Get(dtSalaryMonth);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(ProductionBonusSetups, "Get");
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return ProductionBonusSetups;
|
|||
|
//}
|
|||
|
|
|||
|
//public static List<ProductionBonusSetup> Get(EnumBonusStatus status)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<ProductionBonusSetup> ProductionBonusSetups = _cache["Get", status] as List<ProductionBonusSetup>;
|
|||
|
// if (ProductionBonusSetups != null)
|
|||
|
// return ProductionBonusSetups;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// ProductionBonusSetups = Service.Get(status);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(ProductionBonusSetups, "Get", status);
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return ProductionBonusSetups;
|
|||
|
//}
|
|||
|
|
|||
|
//public int Save()
|
|||
|
//{
|
|||
|
// this.SetAuditTrailProperties();
|
|||
|
// return ProductionBonusSetup.Service.Save(this);
|
|||
|
//}
|
|||
|
|
|||
|
//public void Delete(int id)
|
|||
|
//{
|
|||
|
// ProductionBonusSetup.Service.Delete(id);
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region IProductionBonusSetup Service
|
|||
|
|
|||
|
public interface IProductionBonusSetupService
|
|||
|
{
|
|||
|
ProductionBonusSetup Get(int id);
|
|||
|
List<ProductionBonusSetup> Get();
|
|||
|
List<ProductionBonusSetup> Get(DateTime dtSalaryMonth);
|
|||
|
List<ProductionBonusSetup> Get(EnumBonusStatus status);
|
|||
|
int Save(ProductionBonusSetup item);
|
|||
|
void Delete(int id);
|
|||
|
ProductionBonusSetup Get(string DesignNo);
|
|||
|
List<ProdBonusLine> GetProductionBonusLine(int iD);
|
|||
|
List<ProdBonusWorkSchedule> GetProdBonusWorkSchedules(int iD);
|
|||
|
DataTable GetLayout(DateTime dtCreatedDate);
|
|||
|
DataTable GetLayoutMonthly(DateTime dtCreatedDate);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|