CEL_Payroll/Payroll.BO/Workflow/WFRuleDertailNode.cs

110 lines
2.4 KiB
C#
Raw Normal View History

2024-09-17 14:30:13 +06:00
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 WFRuleDetailNode : BasicBaseObject
{
#region Cache Store
private static Cache _cache = new Cache(typeof(WFRuleDetailNode));
#endregion
#region Constructor
public WFRuleDetailNode()
{
_nodeId = null;
_sequenceId = 0;
_wfSetupId = null;
_wfSetupRuleId = null;
}
#endregion
#region Property
#region NodeId : int
private ID _nodeId;
public ID NodeId
{
get { return _nodeId; }
set { _nodeId = value; }
}
#endregion
#region Property WfSetupId : ID
private ID _wfSetupId;
public ID WfSetupId
{
get { return _wfSetupId; }
set { _wfSetupId = value; }
}
#endregion
#region Property WfSetupRuleId : ID
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 OrganogramBasic : OrganogramBasic Object
private OrganogramBasic _organogramBasic;
public OrganogramBasic OrganogramBasic
{
get
{
if (_organogramBasic == null)
{
_organogramBasic = OrganogramBasic.Get(NodeId);
}
return _organogramBasic;
}
set { _organogramBasic = value; }
}
#endregion
#region IsInitiator : Boolean
public static bool IsInitiator(ObjectsTemplate<WFRuleDetailNode> ooss, ID nodeId)
{
foreach (WFRuleDetailNode oItem in ooss)
{
if (oItem.SequenceId == 1 && oItem.NodeId.Integer == nodeId.Integer)
{
return true;
}
}
return false;
}
#endregion
#endregion
}
}