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 April 2nd, 2009, 10:18 AM
Authorized User
 
Join Date: Mar 2009
Posts: 68
Thanks: 6
Thanked 0 Times in 0 Posts
Question On page 171 code needed

I've notice that code needs to be added to this section

publicint ENTRoleId { get; set; }
publicCapabilityAccessFlagEnum AccessFlag { get; set; }
publicENTCapabilityBO Capability { get; set; }

I added this

publicint ENTCapabilityId { get; set; }

Should this be done

 
Old April 2nd, 2009, 12:15 PM
Authorized User
 
Join Date: Dec 2008
Posts: 29
Thanks: 1
Thanked 5 Times in 5 Posts
Default

No. it is defined in the HRPaidTimeOff.designer.cs file.
The Following User Says Thank You to AspNew For This Useful Post:
tedr (April 2nd, 2009)
 
Old April 2nd, 2009, 12:44 PM
Authorized User
 
Join Date: Mar 2009
Posts: 68
Thanks: 6
Thanked 0 Times in 0 Posts
Question code on 171

if I comment that line out or remove it

then this won't work

if (ID <= 0)
{
//add Capability.ID
ID = newENTRoleCapabilityData().Insert(db, ENTRoleId, ENTCapabilityId, Convert.ToByte(AccessFlag), userAccountId);//2
}
else
{
//update Capability.ID
if (!newENTRoleCapabilityData().Update(db, ID, ENTRoleId, ENTCapabilityId, Convert.ToByte(AccessFlag), userAccountId, Version))//3
{
UpdateFailed(
ref validationErrors);
returnfalse;
}
}

and if I use Capability.ID, I will get 0 and that won't work.

This insert and update needs the a RoleCapability ID, ENTRoleId, and ENTCapabilityId ids to work.

By add this property the code worked as expected, are you sure I could remove it.
 
Old April 2nd, 2009, 01:13 PM
Authorized User
 
Join Date: Dec 2008
Posts: 29
Thanks: 1
Thanked 5 Times in 5 Posts
Default

Did you include these two lines

using V2.PaidTimeOffDAL.Framework;
using V2.PaidTimeOffDAL;

in your cs file?
 
Old April 2nd, 2009, 01:26 PM
Authorized User
 
Join Date: Dec 2008
Posts: 29
Thanks: 1
Thanked 5 Times in 5 Posts
Default

hi tedr,

I am sorry, I just downloaded the ch 6 code and realize that HRPaidTimeOff.designer.cs was not defined then. So you might be correct on doing what you are doing :).
The Following User Says Thank You to AspNew For This Useful Post:
tedr (April 2nd, 2009)
 
Old April 2nd, 2009, 02:02 PM
Authorized User
 
Join Date: Mar 2009
Posts: 68
Thanks: 6
Thanked 0 Times in 0 Posts
Red face pg 171

What chapter was it done in, because I was going to skip to the dashboard chapter next because that what I need to do in an Application now and wanted to try it, but if I need to make sur I do another chapter first, I should do that one.
 
Old April 2nd, 2009, 02:28 PM
Authorized User
 
Join Date: Dec 2008
Posts: 29
Thanks: 1
Thanked 5 Times in 5 Posts
Default

If you are going to skip code, ch 12 (audit) is probably the better choice as it is more complete, but the dashboard code is a good choice too.
The Following User Says Thank You to AspNew For This Useful Post:
tedr (April 2nd, 2009)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 14 Code page 620, help needed! Safi BOOK: Beginning ASP 3.0 3 December 8th, 2010 12:43 PM
Is coded needed on every page? rtr1900 SQL Language 1 March 1st, 2006 06:53 PM
C# Help needed in aspx page savoym ASP.NET 1.0 and 1.1 Basics 3 January 28th, 2005 02:34 PM
quick question about code on pg 171 phpnewbie BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 August 24th, 2004 11:51 AM
Chapter 6 p.171 Code Error bonehead BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 June 26th, 2004 05:28 PM





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