Upgrading from 9.05.702A to 10.1.500.14. The code that works in E9 in Part Maintenance to populate an epiCombo does not work in E10.
I added the Custom Assembly Ice.Contracts.BO.DynamicQuery
Receiving the following errors:
Error: CS0246 - line 59 (473) - The type or namespace name ‘DynamicQuery’ could not be found (are you missing a using directive or an assembly reference?)
Error: CS0246 - line 59 (473) - The type or namespace name ‘DynamicQuery’ could not be found (are you missing a using directive or an assembly reference?)
Error: CS0246 - line 59 (473) - The type or namespace name ‘Session’ could not be found (are you missing a using directive or an assembly reference?)
Error: CS0246 - line 61 (475) - The type or namespace name ‘QueryDesignDataSet’ could not be found (are you missing a using directive or an assembly reference?)
Error: CS0246 - line 63 (477) - The type or namespace name ‘QueryExecutionDataSet’ could not be found (are you missing a using directive or an assembly reference?)
Here is my added code:
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Erp.Adapters;
using Erp.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;
public class Script
{
// ** Wizard Insert Location - Do Not Remove ‘Begin/End Wizard Added Module Level Variables’ Comments! **
// Begin Wizard Added Module Level Variables **
// End Wizard Added Module Level Variables **
// Add Custom Module Level Variables Here **
public void InitializeCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
// Begin Wizard Added Variable Initialization
// End Wizard Added Variable Initialization
// Begin Wizard Added Custom Method Calls
this.cboRptCategory.ValueChanged += new System.EventHandler(this.cboRptCategory_ValueChanged);
// End Wizard Added Custom Method Calls
}
public void DestroyCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
// Begin Wizard Added Object Disposal
this.cboRptCategory.ValueChanged -= new System.EventHandler(this.cboRptCategory_ValueChanged);
// End Wizard Added Object Disposal
// Begin Custom Code Disposal
// End Custom Code Disposal
}
private void cboRptCategory_ValueChanged(object sender, System.EventArgs args)
{
// Get Business Object
DynamicQuery bo = new DynamicQuery(((Session)oTrans.Session).ConnectionPool);
// Get BAQ
QueryDesignDataSet ds = bo.GetByID("BECK-CategoryToSubCategory");
// Put Category parameter into BAQ
QueryExecutionDataSet execDS = bo.GetQueryExecutionParameters(ds);
EpiCombo cb = (EpiCombo)sender;
execDS.ExecutionParameter.AddExecutionParameterRow("Category", cb.Text, "character", false, "", "", null);
int topNRecords = 0;
bool hasMoreRows;
DataSet results = bo.ExecuteParametrized(ds, execDS, "", topNRecords, out hasMoreRows);