public JWorkFlow[] GetNextNodes(bool pCheckCon) { JDataBase DB = new JDataBase(); try { DB.setQuery("SELECT * FROM WorkFlowNode WHERE ClassName='" + ClassName + "' AND DynamicClassCode='" + DynamicClassCode.ToString() + "' AND Ordered in(" + NextNodes + ")"); DataTable _DT = DB.Query_DataTable(); JWorkFlow[] WF = new JWorkFlow[0]; foreach (DataRow _DR in _DT.Rows) { JWorkFlow tempWF = new JWorkFlow(_PublicDataRow, ReferCode); JTable.SetToClassProperty(tempWF, _DR); tempWF.SetWorkFlowCondition(); if (!pCheckCon || tempWF.CheckCondition()) { Array.Resize(ref WF, WF.Length + 1); WF[WF.Length - 1] = tempWF; } } return(WF); } catch { return(null); } finally { DB.Dispose(); } }
public void GetFirst() { JDataBase DB = new JDataBase(); try { DB.setQuery("SELECT * FROM WorkFlowNode WHERE ClassName='" + ClassName + "' AND DynamicClassCode='" + DynamicClassCode.ToString() + "' AND Ordered in(0)"); DataTable _DT = DB.Query_DataTable(); JTable.SetToClassProperty(this, _DT.Rows[0]); } catch { } finally { DB.Dispose(); } }