235 lines
6.2 KiB
C#
235 lines
6.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Ease.CoreV35;
|
|
using Ease.CoreV35.Model;
|
|
using Ease.CoreV35.Caching;
|
|
using System.Data.Linq.Mapping;
|
|
|
|
namespace Payroll.BO
|
|
{
|
|
#region OPIProcessDetailItem
|
|
[Serializable]
|
|
public class OPIProcessDetailItem : BasicBaseObject
|
|
{
|
|
#region Cache Store
|
|
private static Cache _cache = new Cache(typeof(OPIProcessDetailItem));
|
|
#endregion
|
|
|
|
#region Constructor
|
|
public OPIProcessDetailItem()
|
|
{
|
|
_changeNetAmount = 0;
|
|
_description = string.Empty;
|
|
_netAmount = 0;
|
|
_taxAmount = 0;
|
|
_oPIItemID = null;
|
|
_oPIProcessDetailID = null;
|
|
_oPIType = EnumOpiType.Provision;
|
|
}
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
#region ChangeNetAmount : double
|
|
private double _changeNetAmount;
|
|
public double ChangeNetAmount
|
|
{
|
|
get
|
|
{
|
|
return _changeNetAmount;
|
|
}
|
|
set
|
|
{
|
|
base.OnPropertyChange<double>("changenetamount", _changeNetAmount, value);
|
|
_changeNetAmount = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region Description : string
|
|
private string _description;
|
|
public string Description
|
|
{
|
|
get
|
|
{
|
|
return _description;
|
|
}
|
|
set
|
|
{
|
|
base.OnPropertyChange<string>("description", _description, value);
|
|
_description = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region NetAmount : double
|
|
private double _netAmount;
|
|
public double NetAmount
|
|
{
|
|
get
|
|
{
|
|
return _netAmount;
|
|
}
|
|
set
|
|
{
|
|
base.OnPropertyChange<double>("netamount", _netAmount, value);
|
|
_netAmount = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region Paramter: Paramter
|
|
private OpiParameter _paramter;
|
|
public OpiParameter Paramter
|
|
{
|
|
get
|
|
{
|
|
return _paramter;
|
|
}
|
|
set
|
|
{
|
|
_paramter = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region OPIItemID : ID
|
|
private ID _oPIItemID;
|
|
public ID OPIItemID
|
|
{
|
|
get
|
|
{
|
|
return _oPIItemID;
|
|
}
|
|
set
|
|
{
|
|
base.OnPropertyChange<ID>("opiitemid", _oPIItemID, value);
|
|
_oPIItemID = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region OPIProcessDetailID : ID
|
|
private ID _oPIProcessDetailID;
|
|
public ID OPIProcessDetailID
|
|
{
|
|
get
|
|
{
|
|
return _oPIProcessDetailID;
|
|
}
|
|
set
|
|
{
|
|
base.OnPropertyChange<ID>("opiprocessdetailid", _oPIProcessDetailID, value);
|
|
_oPIProcessDetailID = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region OPIType : EnumOpiType
|
|
private EnumOpiType _oPIType;
|
|
public EnumOpiType OPIType
|
|
{
|
|
get
|
|
{
|
|
return _oPIType;
|
|
}
|
|
set
|
|
{
|
|
base.OnPropertyChange<short>("_opitype", (short)_oPIType, (short)value);
|
|
_oPIType = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region TaxAmount : double
|
|
private double _taxAmount;
|
|
public double TaxAmount
|
|
{
|
|
get
|
|
{
|
|
return _taxAmount;
|
|
}
|
|
set
|
|
{
|
|
base.OnPropertyChange<double>("taxamount", _taxAmount, value);
|
|
_taxAmount = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region Service Factory IOPIProcessDetailItemService : IOPIProcessDetailItemService
|
|
internal static IOPIProcessDetailItemService Service
|
|
{
|
|
get
|
|
{
|
|
return Services.Factory.CreateService<IOPIProcessDetailItemService>(typeof(IOPIProcessDetailItemService));
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region Functions
|
|
public static OPIProcessDetailItem Get(ID nOPIProcessDetailItemID)
|
|
{
|
|
OPIProcessDetailItem oOPIProcessDetailItem = null;
|
|
#region Cache Header
|
|
oOPIProcessDetailItem = (OPIProcessDetailItem)_cache["Get", nOPIProcessDetailItemID];
|
|
if (oOPIProcessDetailItem != null)
|
|
return oOPIProcessDetailItem;
|
|
#endregion
|
|
oOPIProcessDetailItem = OPIProcessDetailItem.Service.Get(nOPIProcessDetailItemID);
|
|
#region Cache Footer
|
|
_cache.Add(oOPIProcessDetailItem, "Get", nOPIProcessDetailItemID);
|
|
#endregion
|
|
return oOPIProcessDetailItem;
|
|
}
|
|
public static ObjectsTemplate<OPIProcessDetailItem> Get()
|
|
{
|
|
#region Cache Header
|
|
ObjectsTemplate<OPIProcessDetailItem> oOPIProcessDetailItems = _cache["Get"] as ObjectsTemplate<OPIProcessDetailItem>;
|
|
if (oOPIProcessDetailItems != null)
|
|
return oOPIProcessDetailItems;
|
|
#endregion
|
|
try
|
|
{
|
|
oOPIProcessDetailItems = Service.Get();
|
|
}
|
|
catch (ServiceException e)
|
|
{
|
|
throw new Exception(e.Message, e);
|
|
}
|
|
#region Cache Footer
|
|
_cache.Add(oOPIProcessDetailItems, "Get");
|
|
#endregion
|
|
return oOPIProcessDetailItems;
|
|
}
|
|
|
|
public ID Save()
|
|
{
|
|
this.SetAuditTrailProperties();
|
|
return OPIProcessDetailItem.Service.Save(this);
|
|
}
|
|
public void Delete(ID id)
|
|
{
|
|
OPIProcessDetailItem.Service.Delete(id);
|
|
}
|
|
#endregion
|
|
}
|
|
#endregion
|
|
|
|
#region IOPIProcessDetailItem Service
|
|
public interface IOPIProcessDetailItemService
|
|
{
|
|
OPIProcessDetailItem Get(ID id);
|
|
ObjectsTemplate<OPIProcessDetailItem> Get();
|
|
ID Save(OPIProcessDetailItem item);
|
|
void Delete(ID id);
|
|
}
|
|
#endregion
|
|
}
|