JobEntryAdapter could not be found

Good afternoon all and happy Friday!

If anyone has any time to look at my code and tell me what I did to deserve an error I would greatly appreciate it. :smile:
In Report Qty:
I’m trying to create an instance of the JobEntryAdapter and run a search to make sure the estimated quantity for a given operation hasn’t already been reported. If it has a MessageBox.Show is thrown advising the user of the fact.

I’m getting an error at: using (JobEntryAdapter adapterJobEntry = new JobEntryAdapter(this.oTrans))

private void CallJobEntryAdapterInvokeSearchMethod()
{
try
{
// Declare and Initialize EpiDataView Variables
// Declare and create an instance of the Adapter.
using (JobEntryAdapter adapterJobEntry = new JobEntryAdapter(this.oTrans))
{
//MessageBox.Show(edvRQ.HasRow.ToString());
if (edvRQ.HasRow)
{
adapterJobEntry.BOConnect();

  			// Declare and Initialize Variables
  			Ice.Lib.Searches.SearchOptions opts;
  			opts = new SearchOptions( SearchMode.AutoSearch);
  			opts.DataSetMode = DataSetMode.RowsDataSet;
  			opts.SelectMode = SelectMode.SingleSelect;
              opts.NamedSearch.WhereClauses["JobHead"] = "JobNum = '" + edvRQ.dataView[edvRQ.Row]["JobNum"].ToString() + "'";
              opts.NamedSearch.WhereClauses["JobOper"] = "JobNum = '" + edvRQ.dataView[edvRQ.Row]["JobNum"].ToString() + "' and AssemblySeq = " + edvRQ.dataView[edvRQ.Row]["AssemblySeq"].ToString() + " and OprSeq = " + edvRQ.dataView[edvRQ.Row]["OprSeq"].ToString(); 
  
  			// Call Adapter method
  			adapterJobEntry.InvokeSearch(opts);
  			//MessageBox.Show(adapterJobEntry.JobEntryData.JobOper.Rows.Count.ToString());
  			if (adapterJobEntry.JobEntryData.JobOper.Rows.Count > 0)
  			{
  				NumRunQty.Value = adapterJobEntry.JobEntryData.JobOper[0]["RunQty"].ToString();
  				NumQtyCmplt.Value = adapterJobEntry.JobEntryData.JobOper[0]["QtyCompleted"].ToString();
  				if (Convert.ToInt32(NumRunQty.Value) == Convert.ToInt32(NumQtyCmplt.Value) && Convert.ToInt32(NumQtyCmplt.Value) > 0)
  					MessageBox.Show("The estimated quantity for this operation has already been reported. Are you sure you want to continue?");
  			}
  		// Cleanup Adapter Reference
  		}
  	}
  	//adapterJobEntry.Dispose();
  } 
  	catch (System.Exception ex)
  {
  	ExceptionBox.Show(ex);
  }

}

The Errors are: Error: CS0246 - line 83 (327) - The type or namespace name ‘JobEntryAdapter’ could not be found (are you missing a using directive or an assembly reference?)
** Error: CS0246 - line 83 (327) - The type or namespace name ‘JobEntryAdapter’ could not be found (are you missing a using directive or an assembly reference?)**

Thank you all!

Jonathan Lang

Just what it says, you have to add a reference to Erp.Adapters.JobEntry.dll

Also add this using: using Erp.Adapters;

1 Like

I have that:
> using System;
> using System.ComponentModel;
> using System.Data;
> using System.Diagnostics;
> using System.Windows.Forms;
> using Erp.Adapters;
> using Erp.UI;
> using Erp.BO;
> 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;

Did you add a reference to that dll also?

The customization wizard will also handle this for you automatically.

I just did. I guess I missed that step. Thank you Mr. Koch.