using Ease.Core.Model; using System; using System.Collections.Generic; using System.Data; namespace HRM.BO { #region Bonus public class Bonus : BasicBaseObject { #region Constructor public Bonus() { _code = string.Empty; _name = string.Empty; _nameInBangla = string.Empty; _status = EnumStatus.Active; //#### _payrollTypeID = SystemInformation.CurrentSysInfo.PayrollTypeID; } #endregion #region Propertiesyee #region Code : string private string _code; public string Code { get { return _code; } set { _code = value; } } #endregion #region Name : string private string _name; public string Name { get { return _name; } set { _name = value; } } #endregion #region NameInBangla : string private string _nameInBangla; public string NameInBangla { get { return _nameInBangla; } set { _nameInBangla = value; } } #endregion #region PayrollTypeID : ID private int _payrollTypeID; public int PayrollTypeID { get { return _payrollTypeID; } set { _payrollTypeID = value; } } #endregion //#region Service Factory IBonusService : IBonusService //internal static IBonusService Service //{ // get { return Services.Factory.CreateService(typeof(IBonusService)); } //} //#endregion #endregion //#region Functions //public static Bonus Get(int nID) //{ // Bonus oBonus = null; // #region Cache Header // oBonus = (Bonus)_cache["Get", nID]; // if (oBonus != null) // return oBonus; // #endregion // oBonus = Bonus.Service.Get(nID); // #region Cache Footer // _cache.Add(oBonus, "Get", nID); // #endregion // return oBonus; //} //public static List Get(EnumStatus status) //{ // #region Cache Header // List bonus = _cache["Get",status] as List; // if (bonus != null) // return bonus; // #endregion // try // { // bonus = Service.Get(status, SystemInformation.CurrentSysInfo.PayrollTypeID.Integer); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(bonus, "Get",status); // #endregion // return bonus; //} //public static List GetParameterizedBonus(EnumStatus status) //{ // #region Cache Header // List bonus = _cache["Get", status] as List; // if (bonus != null) // return bonus; // #endregion // try // { // bonus = Service.GetParameterizedBonus(status,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(bonus, "Get", status); // #endregion // return bonus; //} //public static List GetActiveProccessedBonus(DateTime bonusMonth) //{ // List bonuses = new List(); // try // { // bonuses = Service.GetActiveProccessedBonus(SystemInformation.CurrentSysInfo.PayrollTypeID.Integer, bonusMonth); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // return bonuses; //} //public int Save() //{ // this.SetAuditTrailProperties(); // return Bonus.Service.Save(this); //} //public void Delete(int id) //{ // Bonus.Service.Delete(id); //} //#endregion } #endregion #region IBonus Service public interface IBonusService { Bonus Get(int id); List Get(EnumStatus status, int payrollTypeID); List GetParameterizedBonus(EnumStatus status, int payrollTypeID); List GetActiveProccessedBonus(int payrollTypeID, DateTime bonusMonth); int Save(Bonus item); void Delete(int id); List GetAllBonus(int payrollTypeID, EnumStatus status, string code, string name); DataSet GetCCWiseBonusSummary(DateTime bMonthDate, string bonus); DataSet GetCCWiseBonus(DateTime bMonthDate, string bonus); } #endregion }