mehar
(meharban)
1
{
SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
OrderAllocAdapter orderAllocAdapter = new OrderAllocAdapter(oTrans);
orderAllocAdapter.BOConnect();
orderAllocAdapter.DefaultSearchType = OrderAllocAdapter.SearchType.SO;
orderAllocAdapter.SearchForm = new Erp.UI.Searches.OrderSearchForm();
opts.SearchMethod = new AlternateSearchMethod(orderAllocAdapter.GetListOfOrders);
opts.SelectMode = SelectMode.MultiSelect;
opts.PreLoadSearchFilter = string.Format("OrderNum = {0}", orderNum);
orderAllocAdapter.SetCalcPref(true);//Calculate Fulfilment on Search
orderAllocAdapter.InvokeSearch(opts);
orderAllocAdapter.OrderAllocationGetRows();
string cWhseType = "primaryOnly";
string cIPWhseList = string.Empty;
string cMessageText=string.Empty;
string warehouseCode, zoneID, binType;
getAllocTemplateParams(sAllocTemplateID, out warehouseCode, out zoneID, out binType);
foreach (OrderAllocDataSet.PartAllocTranRow item in orderAllocAdapter.OrderAllocData.PartAllocTran)
{
item.WarehouseCode = warehouseCode;
item.ZoneID = zoneID;
item.BinType = binType;
item.AllocTemplateID = sAllocTemplateID;
}
orderAllocAdapter.CheckDates( out cMessageText);
Boolean autoCheck = orderAllocAdapter.AutoReserve(cIPWhseList, cWhseType,out cMessageText);
MessageBox.Show("Test"+autoCheck.ToString());
orderAllocAdapter.Update();
}```