BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
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?
I think you are right. I checked one of my projects real quick and my UI does have a reference to the DAL. However, I noticed that the UI has a reference to all classes.
I see where you are coming from though, this is a 3 tier and the UI should communicate only with the BLL and BLL communicates with the DAL and UI. I worked the book backwards so I never really caught it, good find.