Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can not figure out the error in the code
Message
From
19/05/2009 11:26:27
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01400621
Message ID:
01400664
Views:
34
What error are you getting?

>Hi everybody,
>
>I could not figure out where is the error in the following code - need another set of eyes to help.
>
>
>/// <summary>
>        /// returns list of items by Category
>        /// </summary>
>        /// <param name="Category">Category</param>
>        /// <returns></returns>
>        public InventoryDS.ItemsDataTable GetItemsByCategory(string Category)
>        {
>            
>            ItemsTableAdapter ta = new ItemsTableAdapter();
>            return ta.GetItemsByCategory(Category);
>        }
>
>        /// <summary>
>        /// Get Inventory Dictionary for passed category
>        /// </summary>
>        /// <param name="Category">Category</param>
>        /// <returns></returns>
>        public Dictionary<string, string> GetInventoryDictionaryByCategory(string Category)
>        {
>            Dictionary<string, string> list = new Dictionary<string, string>();
>
>            using (ItemsTableAdapter ta = new ItemsTableAdapter())
>            {
>
>                InventoryDS.ItemsDataTable dt =  this.GetItemsByCategory(string Category);
>                
>                    ta.Fill(dt);
>
>                foreach (InventoryDS.ItemsRow dr in dt.Rows)
>                {
>                    list.Add(dr.itemdesc1, dr.pk.ToString());
>                }                
>            }
>
>            return list;
>        }
Very fitting: http://xkcd.com/386/
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform