Wrox Programmer Forums
|
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
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 5th, 2009, 12:20 PM
Registered User
 
Join Date: Nov 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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?
 
Old November 6th, 2009, 12:49 PM
Authorized User
 
Join Date: Mar 2009
Posts: 79
Thanks: 4
Thanked 4 Times in 4 Posts
Default

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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is the default.aspx in chapter 1? jkacher BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 February 29th, 2008 02:30 PM
Problems in Chapter 2 - Default.aspx nduckste BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 7 October 30th, 2006 11:50 PM
Chapter 2 datacontrol.aspx frogfur BOOK: Beginning ASP.NET 1.0 1 March 19th, 2005 12:59 PM
Chapter 1. Punctual.aspx dad62896 BOOK: Beginning ASP.NET 1.0 9 January 27th, 2004 01:11 PM
Chapter 3, listpage2.aspx jhock7 BOOK: Beginning ASP.NET 1.0 3 December 9th, 2003 04:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.