Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #71 (permalink)  
Old November 19th, 2007, 05:09 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

forumuser - i've uploaded another version of the tbh_posts thing that i did the other day with a minor addition. there is code in the default.aspx.cs page_init that sets up a few filters. this uses some custom sql objects but if you read the comments, you'll see how you could use it with your own 'where' clause. these objects are already embeded in that new template stuff that i uploaded the other day, so you should 'see' them in your own code if you used the new template/dll.

http://www.originaltalent.com/downlo...sts_filter.zip

[edit] just saw your previous question re providers etc. no, just include it the once and then reference it in the form 'JB.OriginalTalent.BLL.Posts.Forum' (in this case, Posts is my provider). as long as the data can be accessed via a provider (of your discression), then a single point of 'contact' is fine.

jimi

http://www.originaltalent.com
  #72 (permalink)  
Old November 19th, 2007, 05:21 AM
Authorized User
 
Join Date: Nov 2007
Location: , , .
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks jimi, i'll have a look at that. progress is slow but it's still progress. to effect paging & sorting in sql server 2000 i had to resort to temp tables in the stored procs. i'll revisit that later but in the meantime i'm working on the finer details such as filtering lists etc.
many thanks again...

  #73 (permalink)  
Old November 19th, 2007, 06:24 AM
Authorized User
 
Join Date: Nov 2007
Location: , , .
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi jimi, using flixon-generated code and this time, putting Employees and Departments into their own providers, i get an error in the Employees.cs class:

        private Department.Department _department = null;
        public Department.Department Department
        {
            get {
                if (_department == null)
                    _department = Department.**Department**.GetDepartmentByID(this.D epartmentID);
                return _department;
            }
        }

---- cannot resolve symbol Department-------

against the **Department**

any ideas?

  #74 (permalink)  
Old November 19th, 2007, 07:37 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

forumuser - yes, i'm presuming you've used the **Department** just to highlight which department was throwing the error?? or are you using the '*' character in your code??

if it's just to highlight the error, make sure that you don't have another instance of department declared under employee as this could cause this kind of error (i.e. duplicate definitions)


jimi

http://www.originaltalent.com
  #75 (permalink)  
Old November 19th, 2007, 07:51 AM
Authorized User
 
Join Date: Nov 2007
Location: , , .
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

" i'm presuming you've used the **Department** just to highlight which department was throwing the error?? "

correct.

if i remove the generated code:
==============================================
        //private Department.Department _department = null;

        //public Department.Department Department
        //{
        // get
        // {
        // if (_department == null)
        // _department = Department.Department.GetDepartmentByID(Department ID);
        // return _department;
        // }
        //}
================================================

from the Employees class, it compiles and runs. should that code be in there at all?


EDIT: i got it to compile by prefixing the BLL namespace. sorry for all these questions. i realise you will have things of your own to get on with. briefly, in the filtering code you posted this morning, there were methods with the filterexpression parameter. did you hand code these or were they produced by templates?
  #76 (permalink)  
Old November 19th, 2007, 08:10 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

do you have the definiton:

Department.Department.GetDepartmentByID ??

jimi

http://www.originaltalent.com
  #77 (permalink)  
Old November 19th, 2007, 09:30 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

Quote:
quote:Originally posted by forumuser
EDIT: i got it to compile by prefixing the BLL namespace. sorry for all these questions. i realise you will have things of your own to get on with. briefly, in the filtering code you posted this morning, there were methods with the filterexpression parameter. did you hand code these or were they produced by templates?
these were in the download of the amended dll and templates that i gave a link to last week. so if you have those, then you'll have the ability to inlcude those in your filter expressions. i think the link was:

http://www.originaltalent.com/downlo...atesAndDLL.zip

[edit] got to travel down to london for my once a month visit there, so will be out of circulation for a good bit of the week. i will look in from time to time tho and answer any questions where possible.

jimi

http://www.originaltalent.com
  #78 (permalink)  
Old November 19th, 2007, 09:56 AM
Authorized User
 
Join Date: Nov 2007
Location: , , .
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks jimi. your help has been [is] invaluable.

  #79 (permalink)  
Old November 19th, 2007, 10:07 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

no worries- chat at some point later in the week. i'm off now.

jimi

http://www.originaltalent.com
  #80 (permalink)  
Old November 19th, 2007, 11:53 AM
Authorized User
 
Join Date: Nov 2007
Location: , , .
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i think perhaps we are at cross-purposes here. when i talk about 'filtered' Employees, i'm really talking about a subset of Employees from the Employees table who are, for example, teamleaders, or perhaps first-aiders [these are indicated by flags in the table] etc.
when i get these filtered lists, i want to populate a dropdown list with the list, using only 3 fields: firstname and lastname concatenated, and id. it seems crazy [to my untutored mind] to create an 'Employees' object containing all users [maybe 10000] from the table with all fields [15] when all i want is a subset, sometimes only perhaps 10 of them, and only 2 fields, with no sorting or paging required. would it not make more sense to create a 'TeamLeader' object or a 'FirstAider' object, [with 2 properties/fields] and populate that? i always know in advance when i need these objects [for use in certain of the forms] and so there is no need to parameterise anything here.

there are other powerful search screens [up to 10 optional fields] which search various tables but that is another issue.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
THB old Template... it´s time for a new look kherrerab BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 October 5th, 2007 05:42 PM



All times are GMT -4. The time now is 03:52 PM.


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