using System; using System.Collections.Generic; using System.Linq; using System.Text; using Ease.Core; namespace HRM.BO { [Serializable] public class BadliProcess : BasicBaseObject { #region Constructor public BadliProcess() { _fromDate = DateTime.MinValue; _toDate = DateTime.MinValue; _employeeID = 0; _workPlanGroupID = 0; _processDate = DateTime.MinValue; _description = string.Empty; _processCode = string.Empty; } #endregion #region Properties #region FromDate : DateTime private DateTime _fromDate; public DateTime FromDate { get { return _fromDate; } set { //base.OnPropertyChange("FromDate", _fromDate, value); _fromDate = value; } } #endregion #region ToDate : DateTime private DateTime _toDate; public DateTime ToDate { get { return _toDate; } set { //base.OnPropertyChange("ToDate", _toDate, value); _toDate = value; } } #endregion #region EmployeeID : ID private int _employeeID; public int EmployeeID { get { return _employeeID; } set { //base.OnPropertyChange("EmployeeID", _employeeID, value); _employeeID = value; } } #endregion #region WorkPlanGroupID : ID private int _workPlanGroupID; public int WorkPlanGroupID { get { return _workPlanGroupID; } set { //base.OnPropertyChange("WorkPlanGroupID", _workPlanGroupID, value); _workPlanGroupID = value; } } #endregion #region ProcessDate : DateTime private DateTime _processDate; public DateTime ProcessDate { get { return _processDate; } set { //base.OnPropertyChange("ProcessDate", _processDate, value); _processDate = value; } } #endregion #region Description : string private string _description; public string Description { get { return _description; } set { //base.OnPropertyChange("Description", _description, value); _description = value; } } #endregion #region ProcessCode : string private string _processCode; public string ProcessCode { get { return _processCode; } set { //base.OnPropertyChange("ProcessCode", _processCode, value); _processCode = value; } } private List _payments; public List Payments { get { //if (_payments == null) //{ // //throw new ServiceException("Arrear Paid Grade Salary not yet set"); // _payments = new ObjectsTemplate(); //} return _payments; } set { _payments = value; } } #endregion #endregion //#region Service Factory IBadliProcessService : IAccessCardService //internal static IBadliProcessService Service //{ // get { return Services.Factory.CreateService(typeof(IBadliProcessService)); } //} //#endregion //public static ObjectsTemplate Get() //{ // #region Cache Header // ObjectsTemplate oBadliProcess = _cache["Get"] as ObjectsTemplate; // if (oBadliProcess != null) // return oBadliProcess; // #endregion // try // { // oBadliProcess = Service.Get(); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliProcess, "Get"); // #endregion // return oBadliProcess; //} //public static ObjectsTemplate Get(DateTime processDate) //{ // #region Cache Header // ObjectsTemplate oBadliProcess = _cache["Get"] as ObjectsTemplate; // if (oBadliProcess != null) // return oBadliProcess; // #endregion // try // { // oBadliProcess = Service.Get(processDate); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliProcess, "Get"); // #endregion // return oBadliProcess; //} //public static ObjectsTemplate Get(DateTime processDate, ID WorkPlanGroupID) //{ // #region Cache Header // ObjectsTemplate oBadliProcess = _cache["Get"] as ObjectsTemplate; // if (oBadliProcess != null) // return oBadliProcess; // #endregion // try // { // oBadliProcess = Service.Get(processDate, WorkPlanGroupID); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliProcess, "Get"); // #endregion // return oBadliProcess; //} //public static ObjectsTemplate Get(DateTime fromdate, DateTime todate) //{ // #region Cache Header // ObjectsTemplate oBadliProcess = _cache["Get"] as ObjectsTemplate; // if (oBadliProcess != null) // return oBadliProcess; // #endregion // try // { // oBadliProcess = Service.Get(fromdate, todate); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliProcess, "Get"); // #endregion // return oBadliProcess; //} //public static ObjectsTemplate Get(DateTime fromdate, DateTime todate, ID WorkPlanGroupId) //{ // #region Cache Header // ObjectsTemplate oBadliProcess = _cache["Get"] as ObjectsTemplate; // if (oBadliProcess != null) // return oBadliProcess; // #endregion // try // { // oBadliProcess = Service.Get(fromdate, todate, WorkPlanGroupId); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliProcess, "Get"); // #endregion // return oBadliProcess; //} //public static ObjectsTemplate Get(ID WorkPlanGroupID) //{ // #region Cache Header // ObjectsTemplate oBadliProcess = _cache["Get"] as ObjectsTemplate; // if (oBadliProcess != null) // return oBadliProcess; // #endregion // try // { // oBadliProcess = Service.Get(WorkPlanGroupID); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliProcess, "Get"); // #endregion // return oBadliProcess; //} //public static DateTime GetLastProcessDate() //{ // DateTime lastProcessDate = DateTime.MinValue; // try // { // lastProcessDate = Service.GetLastProcessDate(); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // return lastProcessDate; //} //public static ObjectsTemplate Get(string WorkPlanGroupIDs) //{ // #region Cache Header // ObjectsTemplate oBadliProcess = _cache["Get"] as ObjectsTemplate; // if (oBadliProcess != null) // return oBadliProcess; // #endregion // try // { // oBadliProcess = Service.Get(WorkPlanGroupIDs); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliProcess, "Get"); // #endregion // return oBadliProcess; //} //public static void Save(BadliProcess oBadliProcess, ObjectsTemplate oBadliDailyPayments, ObjectsTemplate badliRecruit) //{ // oBadliProcess.SetAuditTrailProperties(); // BadliProcess.Service.Save(oBadliProcess, oBadliDailyPayments, badliRecruit); //} } //#region IBadliDailyRecruit Service //public interface IBadliProcessService //{ // ObjectsTemplate Get(); // ObjectsTemplate Get(DateTime processDate); // ObjectsTemplate Get(DateTime processDate, ID WorkPlanGroupID); // ObjectsTemplate Get(DateTime fromdate, DateTime todate); // DateTime GetLastProcessDate(); // ObjectsTemplate Get(ID WorkPlanGroupID); // ObjectsTemplate Get(string WorkPlanGroupIDs); // ObjectsTemplate Get(DateTime fromdate, DateTime todate, ID WorkPlanGroupId); // void Save(BadliProcess oBadliProcess, ObjectsTemplate oBadliDailyPayments, ObjectsTemplate badliRecruit); //} //#endregion }