I am trying to set up a lookup to display some useful information on the order entry screen, specifically on the lines tab. I want to show a check box to show whether a part number is qty bearing or not. I have the PartAdapter working, except I am not using the data set correctly. I currently am trying to hang the lookup on on an dataview notification, but this fires multiple times when loading, I’m sure because the data view has more than one row, but I have only one checkbox to assign it to.
Is anyone willing to give me some pointers for how I can know which row is selected?
Thanks.
if (args.NotifyType == EpiTransaction.NotifyType.Initialize)
{
try
{
var PartNum = edvOrderDtl.dataView[edvOrderDtl.Row]["PartNum"].ToString();
PartAdapter pa = new PartAdapter(oTrans);
pa.BOConnect();
pa.GetByID(PartNum);
if (pa.PartData.Part[0].QtyBearing = true)
{
QtyBearing.Checked = true;
MessageBox.Show("this is a qty bearing part");
}
{
QtyBearing.Checked = false;
MessageBox.Show("This is NOT a qty bearing part");
}
//QtyBearing = pa.PartData.Part[0].QtyBearing.Value;
pa.Dispose();
}
catch
{
}
}