Hi,
I have created a button on the POHeader to pull in a user who is to receive the Purchased items when they are delivered.
I have the button working fine on its own with no filters but when I try to add a filter to pull active users only I receive an error, I have tried various iterarations with various errors but to no avail.
I have changed to following:
FROM:
string whereClause = string.Empty;
TO:
string whereClause = string.Format("EmpBasic.EmpStatus = '{A}'");
Code below:
private void btnContact_Click(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **
SearchOnEmpBasicAdapterShowDialog();
}
private void SearchOnEmpBasicAdapterShowDialog()
{
// Wizard Generated Search Method
// You will need to call this method from another method in custom code
// For example, [Form]_Load or [Button]_Click
bool recSelected;
string whereClause = string.Format("EmpBasic.EmpStatus = '{A}'");
System.Data.DataSet dsEmpBasicAdapter = Ice.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "EmpBasicAdapter", out recSelected, true, whereClause);
if (recSelected)
{
System.Data.DataRow adapterRow = dsEmpBasicAdapter.Tables[0].Rows[0];
// Map Search Fields to Application Fields
EpiDataView edvPOHeader = ((EpiDataView)(this.oTrans.EpiDataViews["POHeader"]));
System.Data.DataRow edvPOHeaderRow = edvPOHeader.CurrentDataRow;
if ((edvPOHeaderRow != null))
{
edvPOHeaderRow.BeginEdit();
edvPOHeaderRow["ShipToConName"] = adapterRow["Name"];
edvPOHeaderRow.EndEdit();
}
}
}
}