Got the grids to publish out using the following code:
private void GetUD05Data_2(string key1, string key2, string key3, string key4, string key5)
{
if ((this._Key1UD05_2 != key1) || (this._Key2UD05_2 != key2) || (this._Key3UD05_2 != key3) || (this._Key4UD05_2 != key4) || (this._Key5UD05_2 != key5))
{
// Build where clause for search.
//string whereClause = "Key1 = \'" + key1 + "\' And Key2 = \'" + key2 + "\' And Key3 = \'" + key3 + "\' And Key4 = \'" + key4 + "\'";
string whereClause = "Key1 = \'" + key1 + "\' And Key2 = \'" + key2 + "\'";
//MessageBox.Show("whereClause: " + whereClause);
System.Collections.Hashtable whereClauses = new System.Collections.Hashtable(1);
whereClauses.Add("UD05", whereClause);
// Call the adapter search.
SearchOptions searchOptions = SearchOptions.CreateRuntimeSearch(whereClauses, DataSetMode.RowsDataSet);
this._ud05Adapter_2.InvokeSearch(searchOptions);
if ((this._ud05Adapter_2.UD05Data.UD05.Rows.Count > 0))
{
this._edvUD05_2.Row = 0;
} else
{
this._edvUD05_2.Row = -1;
}
// Notify that data was updated.
this._edvUD05_2.Notify(new EpiNotifyArgs(this.oTrans, this._edvUD05_2.Row, this._edvUD05_2.Column));
// Set key fields to their new values.
this._Key1UD05_2 = key1;
this._Key2UD05_2 = key2;
this._Key3UD05_2 = key3;
this._Key4UD05_2 = key4;
this._Key5UD05_2 = key5;
}
}
private void GetUD05Data(string key1, string key2, string key3, string key4, string key5)
{
if ((this._Key1UD05 != key1))
{
// Build where clause for search.
//string whereClause = "Key1 = \'" + key1 + "\' And Key2 = \'" + key2 + "\' And Key3 = \'" + key3 + "\' And Key4 = \'" + key4 + "\'";
string whereClause = "Key1 = \'" + key1 + "\' And Key2 = \'" + key2 + "\'";
//MessageBox.Show("whereClause: " + whereClause);
System.Collections.Hashtable whereClauses = new System.Collections.Hashtable(1);
whereClauses.Add("UD05", whereClause);
// Call the adapter search.
SearchOptions searchOptions = SearchOptions.CreateRuntimeSearch(whereClauses, DataSetMode.RowsDataSet);
this._ud05Adapter.InvokeSearch(searchOptions);
if ((this._ud05Adapter.UD05Data.UD05.Rows.Count > 0))
{
this._edvUD05.Row = 0;
} else
{
this._edvUD05.Row = -1;
}
// Notify that data was updated.
this._edvUD05.Notify(new EpiNotifyArgs(this.oTrans, this._edvUD05.Row, this._edvUD05.Column));
// Set key fields to their new values.
this._Key1UD05 = key1;
this._Key2UD05 = key2;
this._Key3UD05 = key3;
this._Key4UD05 = key4;
this._Key5UD05 = key5;
}
}
Now I need to create a baq data view and use the results from it to select what is selected in ud05 instead of picking each record individually.