Problem with CustShip Adapter

I don´t know how I create the parameter “ds”
How i create the dataset with CustShipPickedOrdersDataSet

any ideas?
Thanks.

methodName>PrePickedOrders
returnType>System.Boolean
parameters>
parameter name=“ds” type=“Erp.BO.CustShipPickedOrdersDataSet”>
CustShipPickedOrdersDataSet xmlns=“http://www.epicor.com/Ice/300/BO/CustShip/CustShipPickedOrders” />
/parameter>
parameter name=“vMessage” type=“System.String”>
/parameters>

ds stands for the Data Set, usually you get that by instantiating the BO and running a GetById or something to populate your full data set.

Similar to this thread on getting the labor information.

in the method i need set a dataset but i don´t know how i create it, this is the example of the method

private void CallCustShipAdapterPrePickedOrdersMethod(Erp.BO.CustShipPickedOrdersDataSet ds, out string vMessage)
{
try
{
// Declare and Initialize EpiDataView Variables
// Declare and create an instance of the Adapter.
CustShipAdapter adapterCustShip = new CustShipAdapter(this.oTrans);
adapterCustShip.BOConnect();

		// Declare and Initialize Variables
		// TODO: You may need to replace the default initialization with valid values as required for the BL method call.

		// Call Adapter method
		bool result = adapterCustShip.PrePickedOrders(ds, out vMessage);

		// Cleanup Adapter Reference
		adapterCustShip.Dispose();

	} catch (System.Exception ex)
	{
		ExceptionBox.Show(ex);
	}
}

Thanks

hey, check this thread out for this site and formatting code blocks. It helps everyone see what you are trying to do.

But to the question at hand,
I’m looking through some BO’s to find that dataset, and I can’t find it. I can’t find the CustShipPickedOrdersDataSet, or the PrePickedOrders BO. Hmmmm…

1 Like

You need to declare the ds before you send it.

try something like
adapterCustShip = new CustShipAdapter(this.oTrans);
CustShipPickedOrdersDataSet ds = adapterCustShip.CustShipPickedOrdersDataSet();

1 Like
CustShipPickedOrdersDataSet cspDS = new CustShipPickedOrdersDataSet();

No need to create it on an adapter. It already exists.
adapterCustShip.CustShipData <----

1 Like

if I try this:
CustShipPickedOrdersDataSet cspDS = new CustShipPickedOrdersDataSet ();

this message error show:

----------errors and warnings------------

Error: CS0246 - line 425 (1260) - No se puede encontrar el tipo o el nombre de espacio de nombres ‘CustShipPickedOrdersDataSet’ (¿falta una directiva using o una referencia de ensamblado?)

Yes but when i set the parameter in the method, just it will be dataset

adapterCustShip.CustShipData How I create a type = “Erp.BO.CustShipPickedOrdersDataSet”

1 Like

si intento esto:
adapterCustShip = new CustShipAdapter (this.oTrans);
CustShipPickedOrdersDataSet ds = adapterCustShip.CustShipPickedOrdersDataSet ();

este mensaje de error muestra:

---------- errores y advertencias ------------

Error: CS0246 - línea 425 (1260) - No se puede encontrar el tipo o el nombre del espacio de nombres ‘CustShipPickedOrdersDataSet’ (¿No es una directiva usando una referencia de ensamblado?)

Did you bring in the assembly references for that adapter?

Yes the assembly references for CustShip

which line is 425?

This is the line
CustShipPickedOrdersDataSet ds = adapterCustShip.CustShipPickedOrdersDataSet ();

this is the code

string vMessage=string.Empty,pcWarningMsg=string.Empty,ipPCID=string.Empty,cWarning=string.Empty,shipToCustomerList=string.Empty,
shipToList=string.Empty;
bool pConsolidate=false;
int ipOrderNum=0,ipPackNum=0;
string ipPackMode=“PACK”;
int orderNum=0, iShipToCustNum=0;

orderNum=Convert.ToInt32(this.epiUltraComboNumeroOrden.Value.ToString());

						CustShipAdapter adapterCustShip = new CustShipAdapter(oTrans);
						adapterCustShip.BOConnect();
						
						
						CustShipPickedOrdersDataSet ds = adapterCustShip.CustShipPickedOrdersDataSet ();	
						adapterCustShip.PrePickedOrders(ds, out vMessage);
						adapterCustShip.ProcessPickedOrder(pConsolidate, out  vMessage, ds);
						adapterCustShip.GetByID(ipPackNum);

						adapterCustShip.Dispose();
						adapterCustShip.POGetNew(ipOrderNum, ipPackNum, out pcWarningMsg);
						adapterCustShip.POGetDtlList(ipPackNum, ipPCID, ipOrderNum, ipPackMode, out cWarning);
						adapterCustShip.BuildShipToCustomerList(orderNum, out shipToCustomerList);

						adapterCustShip.BuildShipToList(orderNum, iShipToCustNum, out shipToList);
						adapterCustShip.Dispose();

using Erp.BO;

2 Likes

I am letting @Chris_Conn take it from here. Don’t need both of us jumping on the same code!!! Chris is your guy.

@knash Nooooo dont leave!

Yes that is correct Thanks…

When i set to the method :
CustShipPickedOrdersDataSet cspDS = new CustShipPickedOrdersDataSet ();

in this method adapterCustShip.ProcessPickedOrder(pConsolidate, out vMessage, ds);
show a message: “No Orders were selected”

is because the dataset is new, but how i set the list of lines of the order I want to create a ship

Thanks

I try to generate a ship but the error is "No Orders were selected” when I set de ds to method --> PrePickedOrders

CustShipAdapter adapterCustShip = new CustShipAdapter(oTrans);
adapterCustShip.BOConnect();

						bool more;
						SearchOptions optsTrans = new SearchOptions(SearchMode.AutoSearch); 
						optsTrans.PageSize = 0; 
						string whereTrans = string.Format("OrderNum = " + orderNum.ToString()+ " and Company='"+ company +"' and PickingQty = 0 and PickedQty > 0 BY PartNum"); 
						optsTrans.NamedSearch.WhereClauses.Add("MtlQueue",whereTrans); 							
						CustShipPickedOrdersDataSet ds = adapterCustShip.GetRows(optsTrans,out more) as CustShipPickedOrdersDataSet;
						

						adapterCustShip.PrePickedOrders(ds, out vMessage);
						adapterCustShip.ProcessPickedOrder(pConsolidate, out  vMessage, ds);

You need to load up the dataset. Where does that information come from?