/// <summary> /// Set Product, committed qty, etc. /// </summary> /// <param name="pi">project issue</param> public void SetMProjectIssue(MProjectIssue pi) { SetC_ProjectIssue_ID(pi.GetC_ProjectIssue_ID()); SetM_Product_ID(pi.GetM_Product_ID()); SetCommittedQty(pi.GetMovementQty()); if (GetDescription() != null) SetDescription(pi.GetDescription()); }
/** * Get Project Issues * @return Array of issues */ public MProjectIssue[] GetIssues() { List <MProjectIssue> list = new List <MProjectIssue>(); String sql = "SELECT * FROM C_ProjectIssue WHERE C_Project_ID=" + GetC_Project_ID() + " ORDER BY Line"; DataTable dt = null; IDataReader idr = null; try { idr = DataBase.DB.ExecuteReader(sql, null, Get_TrxName()); dt = new DataTable(); dt.Load(idr); idr.Close(); foreach (DataRow dr in dt.Rows) { list.Add(new MProjectIssue(GetCtx(), dr, Get_TrxName())); } } catch (Exception ex) { if (idr != null) { idr.Close(); } log.Log(Level.SEVERE, sql, ex); } finally { if (idr != null) { idr.Close(); } dt = null; } MProjectIssue[] retValue = new MProjectIssue[list.Count]; retValue = list.ToArray(); return(retValue); }