EchoTex_Payroll/HRM.BO/Budget/BudgetIndivisualChange.cs

360 lines
9.1 KiB
C#
Raw Permalink Normal View History

2024-10-14 10:01:49 +06:00
using Ease.Core.Model;
using System;
using System.Collections.Generic;
using System.Data;
namespace HRM.BO
{
#region Class BudgetIndividualChange
public class BudgetIndivisualChange : UpdateAuditTrail
{
#region Constructor
public BudgetIndivisualChange()
{
_budgetID = 0;
_employeeID = 0;
_butGetIndvChangeType = EnumBudgetChangeType.None;
_effectDate = DateTime.MinValue;
_value = 0;
_changedBasic = 0.0;
_valueType = EnumValueType.Amount;
}
#endregion
#region Properties
#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 ButGetIndvChangeType : EnumBudgetChangeType
private EnumBudgetChangeType _butGetIndvChangeType;
public EnumBudgetChangeType ButGetIndvChangeType
{
get { return _butGetIndvChangeType; }
set { _butGetIndvChangeType = value; }
}
#endregion
#region EffectDate : Datetime
private DateTime _effectDate;
public DateTime EffectDate
{
get { return _effectDate; }
set { _effectDate = value; }
}
#endregion
#region _valueType : EnumValueType
private EnumValueType _valueType;
public EnumValueType ValueType
{
get { return _valueType; }
set { _valueType = value; }
}
#endregion
#region Value : ID
private int _value;
public int Value
{
get { return _value; }
set { _value = value; }
}
#endregion
#region Value : Double
private double _changedBasic;
public double ChangedBasic
{
get { return _changedBasic; }
set { _changedBasic = value; }
}
#endregion
//public Grade Grade { get; set; }
//public Department Department { get; set; }
//public Location Location { get; set; }
//public Costcenter CC { get; set; }
//#region grade : Grade
//private Grade _grade;
//public Grade Grade
//{
// get
// {
// if (_value != null && !_value.IsUnassigned)
// {
// if (_value.Integer > 0 && _grade == null)
// {
// _grade = new Grade();
// _grade = Grade.Get(_value);
// }
// }
// return this._grade;
// }
// set
// {
// _grade = value;
// }
//}
//#endregion
//#region department : Department
//private Department _department;
//public Department Department
//{
// get
// {
// if (_value != null && !_value.IsUnassigned)
// {
// if (_value.Integer > 0 && _department == null)
// {
// _department = new Department();
// _department = Department.Get(_value);
// }
// }
// return this._department;
// }
// set
// {
// _department = value;
// }
//}
//#endregion
//#region location : Location
//private Location _location;
//public Location Location
//{
// get
// {
// if (_value != null && !_value.IsUnassigned)
// {
// if (_value.Integer > 0 && _location == null)
// {
// _location = new Location();
// _location = Location.Get(_value);
// }
// }
// return this._location;
// }
// set
// {
// _location = value;
// }
//}
//#endregion
//#region cc : CC
//private Costcenter _cc;
//public Costcenter CC
//{
// get
// {
// if (_value != null && !_value.IsUnassigned)
// {
// if (_value.Integer > 0 && _cc == null)
// {
// _cc = new Costcenter();
// _cc = Costcenter.Get(_value);
// }
// }
// return this._cc;
// }
// set
// {
// _cc = value;
// }
//}
//#endregion
//#region function : Function
//private Function _function;
//public Function Function
//{
// get
// {
// if (_value != null && !_value.IsUnassigned)
// {
// if (_value.Integer > 0 && _function == null)
// {
// _function = new Function();
// _function = Function.Get(_value);
// }
// }
// return this._function;
// }
// set
// {
// _function = value;
// }
//}
//#endregion
//#region Service Factory IBudgetIndivisualChangeService : IBudgetIndivisualChangeService
//internal static IBudgetIndivisualChangeService Service
//{
// get { return Services.Factory.CreateService<IBudgetIndivisualChangeService>(typeof(IBudgetIndivisualChangeService)); }
//}
//#endregion
#endregion
//#region Function(s)
//#region Get
//public static BudgetIndivisualChange Get(int nID)
//{
// BudgetIndivisualChange oBudgetIndividualChange = null;
// #region Cache Header
// oBudgetIndividualChange = (BudgetIndivisualChange)_cache["Get", nID];
// if (oBudgetIndividualChange != null)
// return oBudgetIndividualChange;
// #endregion
// try
// {
// oBudgetIndividualChange = Service.Get(nID);
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(oBudgetIndividualChange, "Get", nID);
// #endregion
// return oBudgetIndividualChange;
//}
//public static List<BudgetIndivisualChange> Get()
//{
// #region Cache Header
// List<BudgetIndivisualChange> oBudgetIndividualChanges = _cache["Get"] as List<BudgetIndivisualChange>;
// if (oBudgetIndividualChanges != null)
// return oBudgetIndividualChanges;
// #endregion
// try
// {
// oBudgetIndividualChanges = Service.Get();
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(oBudgetIndividualChanges, "Get");
// #endregion
// return oBudgetIndividualChanges;
//}
//public static List<BudgetIndivisualChange> Get(int nBudID)
//{
// #region Cache Header
// List<BudgetIndivisualChange> oBudgetIndividualChanges = _cache["Get"] as List<BudgetIndivisualChange>;
// if (oBudgetIndividualChanges != null)
// return oBudgetIndividualChanges;
// #endregion
// try
// {
// oBudgetIndividualChanges = Service.Get(nBudID);
// }
// catch (ServiceException e)
// {
// throw new Exception(e.Message, e);
// }
// #region Cache Footer
// _cache.Add(oBudgetIndividualChanges, "Get");
// #endregion
// return oBudgetIndividualChanges;
//}
//#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 IBudgetIndividualChangeService
public interface IBudgetIndivisualChangeService
{
BudgetIndivisualChange Get(int nID);
List<BudgetIndivisualChange> Get();
List<BudgetIndivisualChange> GetWithBudgetID(int nBudID);
int Save(BudgetIndivisualChange item);
void Delete(int nID);
}
#endregion
}