/// <summary> /// Get the transitions /// </summary> /// <param name="AD_Client_ID">for client</param> /// <returns>array of next nodes</returns> public MWFNodeNext[] GetTransitions(int AD_Client_ID) { List <MWFNodeNext> list = new List <MWFNodeNext>(); for (int i = 0; i < _next.Count; i++) { MWFNodeNext next = _next[i]; if (next.GetAD_Client_ID() == 0 || next.GetAD_Client_ID() == AD_Client_ID) { list.Add(next); } } MWFNodeNext[] retValue = new MWFNodeNext[list.Count]; retValue = list.ToArray(); return(retValue); }
/// <summary> ///Set Client Org /// </summary> /// <param name="AD_Client_ID">client</param> /// <param name="AD_Org_ID">org</param> //public void SetClientOrg(int AD_Client_ID, int AD_Org_ID) //{ // base.SetClientOrg(AD_Client_ID, AD_Org_ID); //} /// <summary> /// Load Next /// </summary> private void LoadNext() { String sql = "SELECT * FROM AD_WF_NodeNext WHERE AD_WF_Node_ID=" + Get_ID() + " AND IsActive='Y' ORDER BY SeqNo"; bool splitAnd = SPLITELEMENT_AND.Equals(GetSplitElement()); DataSet ds = null; try { ds = DataBase.DB.ExecuteDataset(sql, null, Get_Trx()); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { DataRow dr = ds.Tables[0].Rows[i]; MWFNodeNext next = new MWFNodeNext(GetCtx(), dr, Get_Trx()); next.SetFromSplitAnd(splitAnd); _next.Add(next); } ds = null; } catch (SqlException e) { log.Log(Level.SEVERE, sql, e); } log.Fine("#" + _next.Count); }