Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can not figure out the error in the code
Message
 
 
À
19/05/2009 12:47:26
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01400621
Message ID:
01400719
Vues:
25
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform