C# boreader - update

Never mind... got it... for anyone that needs a lookup using variables from an epidataview using the boreader...




private void edvPartPlant_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
{
// ** Argument Properties and Uses **
// view.dataView[args.Row]["FieldName"]
// args.Row, args.Column, args.Sender, args.NotifyType
// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
//MessageBox.Show(args.NotifyType.ToString());
if ((args.NotifyType == EpiTransaction.NotifyType.Initialize))
{
if ((args.Row > -1))
{
//String whereClause = String.Format("VendorNum={1} AND PartNum={2}",(int)edvPartPlant.dataView[edvPartPlant.Row]["VendorNum"],(int)edvPartPlant.dataView[edvPartPlant.Row]["PartNum"]);
DataSet dsp =_boReader.GetRows("VendPart","VendorNum = '" + edvPartPlant.dataView[edvPartPlant.Row]["VendorNum"].ToString() + "'" + " AND PartNum = '" + edvPartPlant.dataView[edvPartPlant.Row]["PartNum"].ToString() + "'", "LeadTime");
if (dsp.Tables[0].Rows.Count > 0)
//MessageBox.Show(dsp.Tables[0].Rows[0]["LeadTime"].ToString());
edvPartPlant.dataView[edvPartPlant.Row]["Number01"] = dsp.Tables[0].Rows[0]["LeadTime"];
}
}
}

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Rob Bucek
Sent: Monday, August 26, 2013 6:22 PM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: C# boreader



Ok, I resolved the errors, but nothing happens.. I inserted a message box, I'm pretty sure im up against finding an exposed event? The message box never pops up..

private void edvPartPlant_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
{
// ** Argument Properties and Uses **
// view.dataView[args.Row]["FieldName"]
// args.Row, args.Column, args.Sender, args.NotifyType
// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
//MessageBox.Show(args.NotifyType.ToString());
if ((args.NotifyType == EpiTransaction.NotifyType.Initialize))
{
if ((args.Row > -1))
{
String whereClause = String.Format("VendorNum={1} AND PartNum={2}",(int)edvPartPlant.dataView[edvPartPlant.Row]["VendorNum"],(int)edvPartPlant.dataView[edvPartPlant.Row]["PartNum"]);
DataSet dsp =_boReader.GetRows("VendPart",whereClause, "LeadTime");
MessageBox.Show(whereClause);
if (dsp.Tables[0].Rows.Count >0)
edvPartPlant.dataView[edvPartPlant.Row]["Number01"] = dsp.Tables[0].Rows[0]["LeadTime"];
}
}
}

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of Rob Bucek
Sent: Monday, August 26, 2013 3:32 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] C# boreader

All,

9.05.700c C# still baffles me, im still rooted in .net but am trying some new things. Im in time phase and want to query the supplier part list and bring back the lead time from there and populate the number01 field in the partplant view. I do not need to add this to the grid view. The snippet below still needs the part number in the whereclause but im not even close to getting working so far....

private void edvPartPlant_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
{
// ** Argument Properties and Uses **
// view.dataView[args.Row]["FieldName"]
// args.Row, args.Column, args.Sender, args.NotifyType
// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
if ((args.NotifyType == EpiTransaction.NotifyType.Initialize))
{
if ((args.Row > -1))
{
110 DataSet dsp =_boReader.GetRows("SupplierPart","VendorNum='" + args.Row.Cells["VendorNum"].Value.ToString() + "'", "LeadTime");
if (dsp.Tables[0].Rows.Count >0)
112 args.Row.Cells["Number01"].Value=dsp.Tables[0].Rows[0]["LeadTime"];

}
}
}

The error im getting at compile is

Error: CS0117 - line 110 (219) - 'int' does not contain a definition for 'Cells'
Error: CS0117 - line 112 (221) - 'int' does not contain a definition for 'Cells'

What am I missing?

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]



[Non-text portions of this message have been removed]