I have created a custom form based on a UD table. Within the grid on the form I have attached a BAQ to retrieve data based on the current user ID. It works fine on the client, but when I export it to EWA the BAQ does not appear to run, or the user id isn’t being passed. Here is the form load event code:
string currentUser = ((Ice.Core.Session)(((Ice.Lib.Framework.EpiTransaction)oTrans).Session)).EmployeeID;
string currentUserName = ((Ice.Core.Session)(((Ice.Lib.Framework.EpiTransaction)oTrans).Session)).UserName;
MessageBox.Show(currentUser);
DynamicQueryAdapter baqAdapter = new DynamicQueryAdapter(this.oTrans);
DataTable results;
baqAdapter.BOConnect();
//string baqname = "OvertimeListUpdateQuery";
string baqname = "OTRequestQuery";
Ice.BO.QueryExecutionDataSet dsBAQ = baqAdapter.GetQueryExecutionParametersByID(baqname);
dsBAQ.ExecutionParameter[0].ParameterID = "EmpID";
dsBAQ.ExecutionParameter[0].IsEmpty = false;
dsBAQ.ExecutionParameter[0].ParameterValue = currentUser;
dsBAQ.AcceptChanges();
baqAdapter.ExecuteByID(baqname, dsBAQ);
if (baqAdapter.QueryResults != null && baqAdapter.QueryResults.Tables.Count > 0)
{
if ( baqAdapter.QueryResults.Tables["Results"].Rows.Count > 0)
{
}
results = baqAdapter.QueryResults.Tables["Results"];
}
else
{
results = new DataTable();
}
EpiDataView edv = (EpiDataView)oTrans.EpiDataViews[baqname];
if (!(edv != null))
{
edv = new EpiDataView();
oTrans.Add(baqname, edv);
}
edv.dataView = results.DefaultView;
OTList.DataSource = results.DefaultView;
txtEmp.Text = currentUser;
txtSubmitDate.Text = DateTime.Now.ToString("MM/dd/yyyy");
((EpiDataView)oTrans.EpiDataViews["CallContextBpmData"]).dataView.Table.Rows[0]["Character01"] = ((Ice.Core.Session)(((Ice.Lib.Framework.EpiTransaction)oTrans).Session)).EmployeeID;
((EpiDataView)oTrans.EpiDataViews["CallContextBpmData"]).dataView.Table.Rows[0]["Character02"] = DateTime.Now.ToString("MM/dd/yyyy");
How do I get the data either to or from the BAQ to have it work properly in EWA?