Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can not figure out the error in the code
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Can not figure out the error in the code
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01400621
Message ID:
01400621
Views:
90
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;
        }
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform