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 ProdBonusProcessEmps { get; set; } public List ProdBonusProcessItems { get; set; } public List ADParamEmps { get; set; } //#region Property ProdBonusProcessEmps : ProdBonusProcessEmp //private List _ProdBonusProcessEmps; //public List 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 _ProdBonusProcessItems; //public List 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 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 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 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 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(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 Get(); List Get(DateTime dtSalaryMonth); DataSet GetDetailItems(DateTime dtSalaryMonth); ProdBonusProcess Get(int id); void Save(ProdBonusProcess item); void Save(List items); void Delete(int id); List GetProdBonusProcessEmps(int nProcessID); List GetProdBonusProcessItems(int nProcessID); DataSet GetMontlyProdBonus(DateTime dBonusMonth); DataSet GetProdBonusDetail(int designID); DataSet EmpDesignWiseProdBonus(DateTime dBonusMonth); ProdBonusProcess Process(List _oProductionBonusSetups, DateTime SalaryMonth, int payrollTypeId); void UndoProcess(List oProdBonusProsses, ADParameter _ADParam, DateTime dtSalaryMonth); ProdBonusProcessEmp GetProdBonusEmp(int Id, DateTime salaryMonth); } #endregion }