132 lines
3.0 KiB
C#
132 lines
3.0 KiB
C#
|
using Ease.Core.Model;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Data;
|
|||
|
|
|||
|
|
|||
|
namespace HRM.BO
|
|||
|
{
|
|||
|
#region BudgetDepartment
|
|||
|
|
|||
|
public class BudgetDepartment : BasicBaseObject
|
|||
|
{
|
|||
|
#region Constructor
|
|||
|
|
|||
|
public BudgetDepartment()
|
|||
|
{
|
|||
|
_deptID = 0;
|
|||
|
_budID = 0;
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Properties
|
|||
|
|
|||
|
#region BudgetID : ID
|
|||
|
|
|||
|
private int _budID;
|
|||
|
|
|||
|
public int BudgetudID
|
|||
|
{
|
|||
|
get { return _budID; }
|
|||
|
set { _budID = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region DepartmentID : ID
|
|||
|
|
|||
|
private int _deptID;
|
|||
|
|
|||
|
public int DepartmentID
|
|||
|
{
|
|||
|
get { return _deptID; }
|
|||
|
set { _deptID = value; }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
#region Service Factory IBudgetDepartmentService : IBudgetDepartmentService
|
|||
|
|
|||
|
internal static IBudgetDepartmentService Service
|
|||
|
{
|
|||
|
get { return Services.Factory.CreateService<IBudgetDepartmentService>(typeof(IBudgetDepartmentService)); }
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
//#region Functions
|
|||
|
|
|||
|
//public static BudgetDepartment Get(int nID)
|
|||
|
//{
|
|||
|
// BudgetDepartment oBudgetDepartment = null;
|
|||
|
// #region Cache Header
|
|||
|
// oBudgetDepartment = (BudgetDepartment)_cache["Get", nID];
|
|||
|
// if (oBudgetDepartment != null)
|
|||
|
// return oBudgetDepartment;
|
|||
|
// #endregion
|
|||
|
// oBudgetDepartment = BudgetDepartment.Service.Get(nID);
|
|||
|
// #region Cache Footer
|
|||
|
// _cache.Add(oBudgetDepartment, "Get", nID);
|
|||
|
// #endregion
|
|||
|
// return oBudgetDepartment;
|
|||
|
//}
|
|||
|
|
|||
|
//public static List<BudgetDepartment> Get(int nBudgetID)
|
|||
|
//{
|
|||
|
// #region Cache Header
|
|||
|
|
|||
|
// List<BudgetDepartment> BudgetDepartments = _cache["Get",nBudgetID] as List<BudgetDepartment>;
|
|||
|
// if (BudgetDepartments != null)
|
|||
|
// return BudgetDepartments;
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// try
|
|||
|
// {
|
|||
|
// BudgetDepartments = Service.Get(nBudgetID);
|
|||
|
// }
|
|||
|
// catch (ServiceException e)
|
|||
|
// {
|
|||
|
// throw new Exception(e.Message, e);
|
|||
|
// }
|
|||
|
|
|||
|
// #region Cache Footer
|
|||
|
|
|||
|
// _cache.Add(BudgetDepartments, "Get",nBudgetID);
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// return BudgetDepartments;
|
|||
|
//}
|
|||
|
|
|||
|
//public int Save()
|
|||
|
//{
|
|||
|
// this.SetAuditTrailProperties();
|
|||
|
// return BudgetDepartment.Service.Save(this);
|
|||
|
//}
|
|||
|
|
|||
|
//public void Delete(int id)
|
|||
|
//{
|
|||
|
// BudgetDepartment.Service.Delete(id);
|
|||
|
//}
|
|||
|
//#endregion
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region IBudgetDepartment Service
|
|||
|
|
|||
|
public interface IBudgetDepartmentService
|
|||
|
{
|
|||
|
BudgetDepartment Get(int id);
|
|||
|
List<BudgetDepartment> GetWithBudgetID(int nBudgetID);
|
|||
|
int Save(BudgetDepartment item);
|
|||
|
void Delete(int id);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|