Hi!
Here is example of use:
public Dictionary<string, int> GetVideoCategoriesList(int moduleId)
{
return CBO.FillDictionary<string,int>("Definition",DataProvider.Instance().GetVideoCategoriesList(moduleId));
}
"Definition" - is database field used for the key. The value must be the ID associated.
Here is the SQL Query:
SELECT VideoCategoryID, Definition
FROM dbo.[COMS_CodexStar_VideoLinker_VideoCategory]
WHERE ModuleId = @ModuleId
ORDER BY Definition
The query is executing ok and here are the results:
VideoCategoryID | Definition
----------------------- | --------------
1 | supervideo
Question is: Why CBO.FillDictionary<string,int>("Definition",DataProvider.Instance().GetVideoCategoriesList(moduleId)) is returning 0 for value of the dictionary?
I'm filling dropdown list with this method, option test is ok, but option value is always 0.
Please help!