I am hitting a wall here. Thought maybe someone might be able to guide me.
I am creating a custom form to help folks in the manufacturing with serial matching. The new form have a grid and button. The grid returns a BAQ from the parent serialnumber to show all available items that could be matched. The user then selects the row and clicks a button to match the selected row to the parent serialnumber.
The code I have stops working when I am trying to call SMsvc.UpdateSMMtl(“J”);
The following error occurs:
Error: CS1501 - line 2502 (4297) - No overload for method ‘UpdateSMMtl’ takes 1 arguments
Anyone familiar with this BO? Any ideas to try? Please excuse the code it is still a bit rough around the edges.
private void msProcessMatch()
{
using ( SerialMatchingImpl SMsvc = WCFServiceSupport.CreateImpl<Erp.Proxy.BO.SerialMatchingImpl>(FormFunctions.getILaunchSession(oTrans), Erp.Proxy.BO.SerialMatchingImpl.UriPath))
{
Erp.BO.SerialMatchingDataSet SMds = new Erp.BO.SerialMatchingDataSet();
System.String arg01 = (system.SerialNumber);
System.String arg02 = (arg01.Substring(0, 7));
System.String arg03 = ("");
System.String arg04 = (system.JobNumber);
System.Int32 arg05 = (0);
System.String strOut1 = default(System.String);
System.String strOut2 = default(System.String);
SMds = SMsvc.ChangeSerialNum(arg01, arg02, arg03, arg04, arg05, out strOut1, out strOut2);
strOut1 = "";
if (SMds != null)
{
SMds.SerialMatchHdr[0].RowMod = "U";
SMds.SerialMatchAsmbl[0].RowMod = "U";
SMsvc.GetAvailableToMatch(("mtl"), SMds);
Erp.BO.SerialMatchingDataSet.AvailToMatchDataTable smavailable = SMds.AvailToMatch;
Erp.BO.SerialMatchingDataSet.SerialMatchMtlDataTable smMtl = SMds.SerialMatchMtl;
//test message to show count of items available to be matched
//MessageBox.Show(smavailable.Count.ToString());
// loop through each selected item in the grid
foreach (UltraGridRow grdRow in grdAvailableToMatch.Rows)
{
if (grdRow.Selected == true)
{
string strGrdSerialNumber = grdRow.Cells["snParts_SerialNumber"].Value.ToString();
string strGridPart = grdRow.Cells["JobMtl1_PartNum"].Value.ToString();
//MessageBox.Show(strGrdSerialNumber);
//MessageBox.Show(strGridPart);
// loop through each item available to be selected
foreach (Erp.BO.SerialMatchingDataSet.AvailToMatchRow arow in smavailable.Rows)
{
if (arow.SerialNumber == strGrdSerialNumber && arow.PartNum == strGridPart)
{
MessageBox.Show("This Record Item should be Matched!!");
arow.Matched = true;
arow.Selected = true;
foreach (Erp.BO.SerialMatchingDataSet.SerialMatchMtlRow rowMtl in smMtl.Rows)
{
if (rowMtl.MtlPartNum == arow.PartNum && (!string.IsNullOrEmpty(rowMtl.MtlSerialNo.ToString())) )
{
rowMtl.MtlSerialNo = arow.SerialNumber;
break;
}
}
break;
}
}
}
}
SMsvc.UpdateSMMtl("J");
strOut1 = "";
}
}
}