Monday, January 3, 2011

Unlimited class with a line drop-down list of trees - a complete sample article - passing through the fall

 Introduction:
someone in the group today, I asked about a more ancient problem: the unlimited class with a line drop-down list of trees that he will not run.
The most critical and to link the CYQ.Data framework for the moment I feel more hanging, because the article was written in 2008 when, while the framework of the most perfect hair force until this year,
so nothing should be connected between the two, but this Q Ye Hao, gave me a written opportunities for this article.
ps: he is an example of the other code as framework code CYQ.Data.
before this will simplify the code a little, and the establishment of a complete application example The following applications for official steps:
one: New Project
1: the IDropDownTree and DropDownTree into the class, as shown below:
simplified code is as follows:
IDropDownTree:
IDropDownTree < br> DropDownTree:
DropDownTree
II: database data preparation
1: To facilitate the example, here in the Access database, create a new Product table, and added a few lines worth of data, as shown:
c: Reference CYQ.Data framework to achieve
1: add items CYQ.Data reference
2: New ProductTree class that implements the interface IDropDownTree
A: To increase the enumeration form, as follows:
namespace Entity
public enum TableNames
Product
public enum Product
ID,
ParentID,
Name
B: Implement Interface
using Tree;
using CYQ. Data;
using Entity;
using CYQ.Data.Table;
using System.Collections.Generic;
namespace Tree
/ / /
/ / / of : passing through the fall
/ / / blog:
/ / / Autumn Garden:
/ / /
public class ProductTree: IDropDownTree
int count = 0;
private MAction action;
public ProductTree ()
action = new MAction (TableNames.Product);
# region IDropDownTree members
public Dictionary GetChildList (string parentID)
MDataTable table = action.Select (0, 0,
dic = new Dictionary ();
foreach (MDataRow row in table.Rows)
dic.Add (row.Get (Product.ID), row.Get (Product.Name));
return dic;
public DropDownTree DropDownTree
get
return new DropDownTree (this);
# endregion
# region IDisposable Members
public void Dispose ()
action.Close ();
# endregion
project solutions as shown below:
four: show application results
1: New Test Site WebDemo project, and the database into the App_Data directory, as shown in Figure:
2: Web.config configured database link as follows:

pull-box put: new Tree.ProductTree (). DropDownTree.Bind (ddlProduct, null, : Example source code available to download: - Download [Recent rarely write the text, click on download to recommend you do not forget to point oh ^-^]]< br> 2: Autumn Park V2.5 released in the near future, welcome in advance Browse
PS: tap legend would recommend 10 Park beans, like trouble spots about this paragraph by the statement of consent must be retained, and the location was given in the original article page link or as a tort.
(Please make your evaluation of the article) to read (2434)
ForFreeDom Android hand to enforce the inspection system OTA update the way to the edge of the ten most 3G mobile Internet application technology giant in 2011 outlook: Google to explore the way social networks in 2010 was underestimated five largest technology event: Twitter mainstream RIM denied PlayBook unpaired short life, said regular expression performance automated testing engine and its classification - the cornerstone of agile testing https  ssl  digital certificate Twitter in the power of access to information in the PHP + MySQL + jQuery microblogging program to achieve release - PHP article China-pub monopoly computer books online Shop! 65,000 varieties of 2-8 off! China-Pub computer print books on demand printing services with the unlimited-class drop-down tree line list - complete with sample articles Ajax Atlas (2) asp.net 2.0 (17) C # / Winform ( 5) CYQ.Data framework of the series (49) Http proxy tools to achieve (5) MapXtreme 2005 (15) net of alternative programming (3) openSUSE11.2 (7) Solaris10 (6) complete set CQSPACE bit (5) Autumn Park-QBlog Series (7) online play chess series (54) Web site to install package (10) December 2010 (7) November 2010 (10) October 2010 (15) September 2010 (28) August 2010 (25 ) July 2010 (35) June 2010 (9) May 2010 (12) April 2010 (21) March 2010 (4) February 2010 (2) January 2010 (13) December 2009 (2) November 2009 (18) September 2009 (1) July 2009 (1) June 2009 (2) March 2009 (2) October 2008 (1) 2008 In April (2) February 2008 (1) November 2007 (2) September 2007 (1) August 2007 (6) July 2007 (2) May 2007 (1) 2007 April (1) November 2006 (8) August 2006 (1) www.norkoo.com 1. with the unlimited-class drop-down tree line list - a complete sample chapter 2. Silverlight + WCF real - Internet chess final chapter The non-threaded block countdown window - Application (Part VII) 3. actual articles - Sixty-six lines to complete simple Rss output class 4. Autumn Garden-CYQBlog blog series index [support multi-language, multi-user, multi-database (access / mssql / oracle), directory-level URL] 5. passing through the autumn blog-V2.0 official release management system to increase the background [to support multi-language, multi-user, multi-database, directory-level URL] 6. Silverlight + WCF real - Internet chess final chapter The Battle Video - next [the client and the server sends transit] (f) 7. Silverlight + WCF actual combat - the final chapter of the Internet Chess Battle Video - Part I [turned the video client / registration number / receive video] (e) 8. Request to receive garbled principle of analytical parameters 9. passing through the autumn blog-V2.0 beta test version released one week [to support multi-language, multi-user, multi-database, directory-level URL] 10. CYQ.Data lightweight road data layer V3. 5 release - [Open with the statement to run multiple database support] 11. passing through the fall edition blog - the skin making guide [Colombian invasion of offensive and defensive points with sharp subject] 12. support multi-language, multi-user, multi-database, passing the autumn edition of the perfect URL blog V1.0 official release [with detailed installation instructions for the deployment] 1. Re: Silverlight + WCF instance novice chess board (b) 2. Re: Silverlight + WCF instance novice chess board (b) 3. Re: Silverlight + WCF newbie Example chess board (b) 4. Re: unlimited class with a line drop-down list of trees - a complete sample chapter 5. Re: Line of the unlimited class with the drop-down list of trees - a complete sample chapter 6. Re: Silverlight + WCF instance chess novice board (b) 7. Re: Line of the unlimited class with the drop-down list of trees - a complete sample chapter 8. Re: Line of the unlimited class with the drop-down list of trees - a complete sample chapter 9. Re: the unlimited class with a line down the tree list - a complete sample chapter 10. Re: Line of the unlimited class with the drop-down list of trees - a complete sample chapter 1. Xml maddening SelectNodes method (6054) 2. Silverlight + WCF instance novice chess topics Index [forty chapters follow has a] (4612) 3. CYQ.Data lightweight road frame data layer source series index (4385) 4. foundation that is easily overlooked something - web intrusion methods and precautions Summary (4273) 5. Http Proxy Tools combat support agency website and QQ (4200) 6. with a line-level drop-down list of trees of infinite (4041) 7. AOP services you want to do what you IOC (3988) 8. support multi-language, multi-user, multi-database , URL of passing the fall version of the perfect blog post [absolutely lethal blog] (3551) 9. refactoring - make the code more simple and beautiful: the actual voice of experience (for a skill, so you save more than N code) (3448 ) 10. CYQ.Data the road data layer lightweight bug feedback, optimization tips, to download the latest framework (3206) 1. CYQ.Data Lightweight road data layer framework of gorgeous open-source version V1.3 (111) 2. support multi- language, multi-user, multi-database, URL of passing the fall version of the perfect blog post [absolutely lethal blog] (84) 3. refactoring - make the code more simple and elegant: the actual voice of experience (for a skill, save you out of N multiple code) (81) 4. CYQ.Data lightweight road data layer SQLHelper back hard (h) (79) 5. AOP services you want to do what you IOC (72) 1. basic but easily overlooked That something - web intrusion methods and precautions Summary (4273) 2. support multi-language, multi-user, multi-database, URL of passing the fall version of the perfect blog post [absolutely lethal blog] (3551) 3. Silverlight + WCF actual combat - the final chapter of the Internet Chess Battle Video - Part I [turned the video client / registration number / receive video] (e) (3096) 4. passing through the fall edition blog - the skin making guide [Defense station with sharp Brother intrusion topic] (2698) 5. with a line-level drop-down list of trees of infinite - a complete sample chapter (2434) 6. passing autumn blog-V2.0 beta test version released a week [to support multi-language, multi-user, multi-database, directory-level URL] (2323) 7. support multi-language, multi-user, multi-database, a perfect pass by the fall edition of the blog URL official version V1.0 released [with detailed installation instructions for the deployment] (2181) 8. passing autumn blog-official release V2.0 increase the background management system [support multi-language, multi-user, multi-database, directory-level URL] (1993) 9. Request to receive garbled principle parameter resolution (1826) 10. actual articles - Sixty-six lines to complete simple Rss output class (1533 )

No comments:

Post a Comment