Chapter 7 WorkflowTransition.aspx
Chapter 7 WorkflowTransition.aspx page has the following method:
private void LoadMethodDropDownList(int entWorkflowId)
{
ENTWorkflowEO workflow = new ENTWorkflowEO();
if (workflow.Load(entWorkflowId))
{
//Create an instance of the type.
MethodInfo[] methods = Type.GetType(workflow.ENTWorkflowObjectName).GetMe thods(
BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public );
//Load the methods for this workflow that return a boolean value into the
//conditions drop down list.
foreach (MethodInfo mi in methods)
{
//Only methods that take a parameter of a data context can be used.
ParameterInfo[] parameters = mi.GetParameters();
if (parameters.Length == 1)
{
if (parameters[0].ParameterType ==
typeof(V2.PaidTimeOffDAL.HRPaidTimeOffDataContext) )
{
ddlPostTransitionMethodName.Items.Add(mi.Name);
}
}
}
ddlPostTransitionMethodName.Items.Insert(0, ââ);
}
else
{
throw new Exception(âThe workflow can not be found in the database.â);
}
}
Unless I reference this UI project to the DAL project, this code , typeof(V2.PaidTimeOffDAL.HRPaidTimeOffDataContext) , will not work.
I am surprised that no one has this issue yet. Is there a fix beside reference the UI project to the DAL project?
|