CEL_Payroll/Payroll.BO/Workflow/WFRuleDetailOS.cs
2024-09-17 14:30:13 +06:00

112 lines
2.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ease.CoreV35;
using Ease.CoreV35.Caching;
using Ease.CoreV35.Model;
using Ease.CoreV35.Utility;
namespace Payroll.BO
{
[Serializable]
public class WFRuleDetailOS : BasicBaseObject
{
public delegate void ItemChanged();
#region Cache Store
private static Cache _cache = new Cache(typeof(WFRuleDetailOS));
#endregion
#region Constructor & Private Declarations
public WFRuleDetailOS()
{
_osID = null;
_wfSetupId = null;
_wfSetupRuleId = null;
_sequenceId = 0;
}
#endregion
#region Property
#region Property OsID : ID
private ID _osID;
public ID OsID
{
get { return _osID; }
set { _osID = value; }
}
#endregion
#region WfSetupId : int
private ID _wfSetupId;
public ID WfSetupId
{
get { return _wfSetupId; }
set { _wfSetupId = value; }
}
#endregion
#region WfSetupRuleId : int
private ID _wfSetupRuleId;
public ID WfSetupRuleId
{
get { return _wfSetupRuleId; }
set { _wfSetupRuleId = value; }
}
#endregion
#region SequenceId : int
private int _sequenceId;
public int SequenceId
{
get { return _sequenceId; }
set { _sequenceId = value; }
}
#endregion
#region Department : Department Object
private Department _department;
public Department Department
{
get
{
if (_department == null)
{
_department = Department.Get(_osID);
}
return _department;
}
set { _department = value; }
}
#endregion
#region IsInitiator : Boolean
public static bool IsInitiator(ObjectsTemplate<WFRuleDetailOS> ooss, ID organizationid)
{
foreach (WFRuleDetailOS oItem in ooss)
{
if (oItem.SequenceId == 1 && oItem.OsID.Integer == organizationid.Integer)
{
return true;
}
}
return false;
}
#endregion
#endregion
}
}