199 lines
4.3 KiB
C#
199 lines
4.3 KiB
C#
using Ease.Core.Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
|
|
namespace HRM.BO
|
|
{
|
|
#region BudgetGrade
|
|
|
|
public class BudgetGrade : ObjectTemplate
|
|
{
|
|
#region Constructor
|
|
|
|
public BudgetGrade()
|
|
{
|
|
_budgetID = 0;
|
|
_changedPercentage = 0.0;
|
|
_fixedAmount = 0.0;
|
|
_gradeID = 0;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
#region BudgetID : ID
|
|
|
|
private int _budgetID;
|
|
|
|
public int BudgetID
|
|
{
|
|
get { return _budgetID; }
|
|
set { _budgetID = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ChangedPercentage : double
|
|
|
|
private double _changedPercentage;
|
|
|
|
public double ChangedPercentage
|
|
{
|
|
get { return _changedPercentage; }
|
|
set { _changedPercentage = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region FixedAmount : double
|
|
|
|
private double _fixedAmount;
|
|
|
|
public double FixedAmount
|
|
{
|
|
get { return _fixedAmount; }
|
|
set { _fixedAmount = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GradeID : ID
|
|
|
|
private int _gradeID;
|
|
|
|
public int GradeID
|
|
{
|
|
get { return _gradeID; }
|
|
set { _gradeID = value; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Service Factory IBudgetGradeService : IBudgetGradeService
|
|
|
|
internal static IBudgetGradeService Service
|
|
{
|
|
get { return Services.Factory.CreateService<IBudgetGradeService>(typeof(IBudgetGradeService)); }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
//#region Function(s)
|
|
|
|
//#region Get
|
|
|
|
//public static BudgetGrade Get(int nID)
|
|
//{
|
|
// BudgetGrade oBudgetGrade = null;
|
|
// #region Cache Header
|
|
// oBudgetGrade = (BudgetGrade)_cache["Get", nID];
|
|
// if (oBudgetGrade != null)
|
|
// return oBudgetGrade;
|
|
// #endregion
|
|
|
|
// try
|
|
// {
|
|
// oBudgetGrade = Service.Get(nID);
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
|
|
// #region Cache Footer
|
|
// _cache.Add(oBudgetGrade, "Get", nID);
|
|
// #endregion
|
|
// return oBudgetGrade;
|
|
//}
|
|
|
|
//public static List<BudgetGrade> Get()
|
|
//{
|
|
|
|
// #region Cache Header
|
|
// List<BudgetGrade> oBudgetGrades = _cache["Get"] as List<BudgetGrade>;
|
|
// if (oBudgetGrades != null)
|
|
// return oBudgetGrades;
|
|
// #endregion
|
|
|
|
// try
|
|
// {
|
|
// oBudgetGrades = Service.Get();
|
|
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
// #region Cache Footer
|
|
// _cache.Add(oBudgetGrades, "Get");
|
|
// #endregion
|
|
|
|
// return oBudgetGrades;
|
|
//}
|
|
//public static List<BudgetGrade> Get(int nBudID)
|
|
//{
|
|
|
|
// #region Cache Header
|
|
// List<BudgetGrade> oBudgetGrades = _cache["Get"] as List<BudgetGrade>;
|
|
// if (oBudgetGrades != null)
|
|
// return oBudgetGrades;
|
|
// #endregion
|
|
|
|
// try
|
|
// {
|
|
// oBudgetGrades = Service.Get(nBudID);
|
|
|
|
// }
|
|
// catch (ServiceException e)
|
|
// {
|
|
|
|
// throw new Exception(e.Message, e);
|
|
// }
|
|
// #region Cache Footer
|
|
// _cache.Add(oBudgetGrades, "Get");
|
|
// #endregion
|
|
|
|
// return oBudgetGrades;
|
|
//}
|
|
|
|
//#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 IBudgetGradeService
|
|
|
|
public interface IBudgetGradeService
|
|
{
|
|
BudgetGrade Get(int nID);
|
|
List<BudgetGrade> Get();
|
|
List<BudgetGrade> GetWithBudgetID(int nBudID);
|
|
int Save(BudgetGrade oBudgetGrade);
|
|
void Delete(int nID);
|
|
}
|
|
|
|
#endregion
|
|
} |