Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can not figure out the error in the code
Message
 
 
To
19/05/2009 12:47:26
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:
01400719
Views:
24
>If I'm not mistaken, I think you just need to remove the "string" from your call to GetItemsByCategor()......

I think the whole code was wrong, as I just found out. All I think I need was
/// <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>();            

            InventoryDS.ItemsDataTable dt = this.GetItemsByCategory(Category);                

                foreach (InventoryDS.ItemsRow dr in dt.Rows)
                {
                    list.Add(dr.itemdesc1, dr.pk.ToString());
                }                            

            return list;
        }
But let me re-test.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform