using Ease.Core.DataAccess; using Ease.Core.Model; using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Reflection; namespace HRM.BO { public class WFRuleDetailDesignation : BasicBaseObject { #region Constructor & Private Declarations public WFRuleDetailDesignation() { _designationId = (0); _wfSetupId = 0; _wfSetupRuleId = 0; _sequenceId = 0; } #endregion #region Property #region DesignationId : ID private int _designationId; public int DesignationId { get { return _designationId; } set { _designationId = value; } } #endregion #region Property WfSetupId : ID private int _wfSetupId; public int WfSetupId { get { return _wfSetupId; } set { _wfSetupId = value; } } #endregion #region Property WfSetupRuleId : ID private int _wfSetupRuleId; public int WfSetupRuleId { get { return _wfSetupRuleId; } set { _wfSetupRuleId = value; } } #endregion #region SequenceID : int private int _sequenceId; public int SequenceId { get { return _sequenceId; } set { _sequenceId = value; } } #endregion // public Designation Designation { get; set; } //#region Designation : Designation Object //private Designation _designation; //public Designation Designation //{ // get // { // if (_designation == null) // { // _designation = Designation.Get(_designationId); // } // return _designation; // } // set { _designation = value; } //} //#endregion #region IsInitiator : Boolean public static bool IsInitiator(List ordesgs, int designationID) { foreach (WFRuleDetailDesignation oItem in ordesgs) { if (oItem.SequenceId == 1 && oItem.DesignationId == designationID) { return true; } } return false; } #endregion #endregion } public enum enumWFRuleManual { Employee = 1, Line_Manager = 2, Positions_type = 3, Og_Nodes = 4 } public class WFRuleDetailManual : BasicBaseObject { #region Constructor & Private Declarations public WFRuleDetailManual() { _objectId = 0; _wfSetupId = 0; _wfSetupRuleId = 0; _sequenceId = 0; _ruleType = enumWFRuleManual.Employee; } #endregion #region Property #region DesignationId : ID private int _objectId; public int ObjectID { get { return _objectId; } set { _objectId = value; } } #endregion #region Property WfSetupId : ID private int _wfSetupId; public int WfSetupId { get { return _wfSetupId; } set { _wfSetupId = value; } } #endregion #region Property WfSetupRuleId : ID private int _wfSetupRuleId; public int 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 SequenceID : int private enumWFRuleManual _ruleType; public enumWFRuleManual RuleType { get { return _ruleType; } set { _ruleType = value; } } #endregion //public string GetRuleDetailDescription(int nSequenceID) //{ // string desc = string.Empty; // foreach (WFRuleDetailManual oItem in WFRuleDetailNodes) // { // if (oItem.SequenceId == nSequenceID) // { // desc = desc + oItem.OrganogramBasic.PositionName + ", "; // } // } // if (WFRuleDetailNodes.Count >= 1) desc = desc.Substring(0, desc.Length - 2); // return desc; //} #region IsInitiator : Boolean //public static bool IsInitiator(List Manuals, int nodeid) //{ // foreach (WFRuleDetailManual oItem in Manuals) // { // if (oItem.SequenceId == 1 && oItem.RuleType != enumWFRuleManual.Line_Manager) // { // if (oItem.RuleType == enumWFRuleManual.Employee) return true; // else if (oItem.RuleType == enumWFRuleManual.Positions_type) // { // List opprovers = OrganogramBasic.GetbyPositionTypeid(Ease.CoreV35.Model.(oItem.ObjectID)); // if (opprovers.Contains(nodeid) == true) return true; // } // else // { // OrganogramBasic og = OrganogramBasic.Get((oItem.ObjectID)); // if (og != null) return true; // } // } // } // return false; //} #endregion #endregion } }