215 lines
4.8 KiB
C#
215 lines
4.8 KiB
C#
using Ease.Core.Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
|
|
namespace HRM.BO
|
|
{
|
|
#region BudgetCostCenter
|
|
|
|
public class BudgetCostCenter : ObjectTemplate
|
|
{
|
|
#region Constructor
|
|
|
|
public BudgetCostCenter()
|
|
{
|
|
_costCenterID = 0;
|
|
_budgetID = 0;
|
|
_employeeID = 0;
|
|
_fromMonth = DateTime.MinValue;
|
|
_percentage = 0.0;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
#region CostCenterID : ID
|
|
|
|
private int _costCenterID;
|
|
|
|
public int CostCenterID
|
|
{
|
|
get { return _costCenterID; }
|
|
set { _costCenterID = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region BudgetID : ID
|
|
|
|
private int _budgetID;
|
|
|
|
public int BudgetID
|
|
{
|
|
get { return _budgetID; }
|
|
set { _budgetID = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region EmployeeID : ID
|
|
|
|
private int _employeeID;
|
|
|
|
public int EmployeeID
|
|
{
|
|
get { return _employeeID; }
|
|
set { _employeeID = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region FromMonth : Datetime
|
|
|
|
private DateTime _fromMonth;
|
|
|
|
public DateTime FromMonth
|
|
{
|
|
get { return _fromMonth; }
|
|
set { _fromMonth = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
#region Percentage : double
|
|
|
|
private double _percentage;
|
|
|
|
public double Percentage
|
|
{
|
|
get { return _percentage; }
|
|
set { _percentage = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
//#region Service Factory IBudgetCostCenterService : IBudgetCostCenterService
|
|
|
|
//internal static IBudgetCostCenterService Service
|
|
//{
|
|
// get { return Services.Factory.CreateService<IBudgetCostCenterService>(typeof(IBudgetCostCenterService)); }
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
//#region Function(s)
|
|
|
|
//#region Get
|
|
|
|
//public static BudgetCostCenter Get(int nID)
|
|
//{
|
|
// BudgetCostCenter oBudgetCostCenter = null;
|
|
// #region Cache Header
|
|
// oBudgetCostCenter = (BudgetCostCenter)_cache["Get", nID];
|
|
// if (oBudgetCostCenter != null)
|
|
// return oBudgetCostCenter;
|
|
// #endregion
|
|
|
|
// try
|
|
// {
|
|
// oBudgetCostCenter = Service.Get(nID);
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
|
|
// #region Cache Footer
|
|
// _cache.Add(oBudgetCostCenter, "Get", nID);
|
|
// #endregion
|
|
// return oBudgetCostCenter;
|
|
//}
|
|
|
|
//public static List<BudgetCostCenter> Get()
|
|
//{
|
|
|
|
// #region Cache Header
|
|
// List<BudgetCostCenter> oBudgetCostCenters = _cache["Get"] as List<BudgetCostCenter>;
|
|
// if (oBudgetCostCenters != null)
|
|
// return oBudgetCostCenters;
|
|
// #endregion
|
|
|
|
// try
|
|
// {
|
|
// oBudgetCostCenters = Service.Get();
|
|
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
// #region Cache Footer
|
|
// _cache.Add(oBudgetCostCenters, "Get");
|
|
// #endregion
|
|
|
|
// return oBudgetCostCenters;
|
|
//}
|
|
//public static List<BudgetCostCenter> Get(int nBudID)
|
|
//{
|
|
|
|
// #region Cache Header
|
|
// List<BudgetCostCenter> oBudgetCostCenters = _cache["Get"] as List<BudgetCostCenter>;
|
|
// if (oBudgetCostCenters != null)
|
|
// return oBudgetCostCenters;
|
|
// #endregion
|
|
|
|
// try
|
|
// {
|
|
// oBudgetCostCenters = Service.Get(nBudID);
|
|
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
// #region Cache Footer
|
|
// _cache.Add(oBudgetCostCenters, "Get");
|
|
// #endregion
|
|
|
|
// return oBudgetCostCenters;
|
|
//}
|
|
|
|
//#endregion
|
|
|
|
//#region Save
|
|
//public int Save()
|
|
//{
|
|
// //SetAuditTrailProperties();
|
|
// return Service.Save(this);
|
|
//}
|
|
//#endregion
|
|
|
|
//#region Delete
|
|
//public void Delete(int id)
|
|
//{
|
|
// Service.Delete(id);
|
|
|
|
//}
|
|
//#endregion
|
|
|
|
//#endregion
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IBudgetCostCenterService
|
|
|
|
public interface IBudgetCostCenterService
|
|
{
|
|
BudgetCostCenter Get(int nID);
|
|
List<BudgetCostCenter> Get();
|
|
List<BudgetCostCenter> GetWithBudgetID(int nBudID);
|
|
int Save(BudgetCostCenter item);
|
|
void Delete(int nID);
|
|
}
|
|
|
|
#endregion
|
|
} |