Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET
Hi I've a SP that is populating the below list item 'GetStagAgtNmbyList', I am trying to populate output with the AgentNames returned in the SP
private nsDataTypes.GetStgAgtNameOutput marshallToGetStagAgtNmbyList(RecordCollection rcResults,RecordCollection recResults)
            nsDataTypes.GetStgAgtNameOutput output = new nsDataTypes.GetStgAgtNameOutput();
            foreach (Record rec in rcResults)
                nsDataTypes.GetStgAgtNmByAppRecord r = new nsDataTypes.GetStgAgtNmByAppRecord();
                r.AgtName = rec.get_Item(nsWebResources.SprocConstants.AGT_AGENT_NM).ToString();
            return output;
The below variable is not being assigned the AgentName:
tempStagerAgentName = Output.Staging_AgtNm.ToString();
How do i get the AgentName values contained in Output.GetStagAgtNmbyList to be in tempStagerAgentName?
Posted 8-Jan-13 3:54am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

A hashtable was being populated with all records I've updated this to just be the Agent Name:
//Creating New Hashtable and adding key and values for staging agents name through List Collection
            System.Collections.Hashtable StagingAgtTaskCntbyht = new System.Collections.Hashtable();
            for (var i = 0; i < output.GetStagAgtNmbyList.Count; i++)
                StagingAgtTaskCntbyht.Add(output.GetStagAgtNmbyList[i].AgtName, 0);

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 365
1 Sergey Alexandrovich Kryukov 329
2 CPallini 270
3 Afzaal Ahmad Zeeshan 204
4 DamithSL 194
0 OriginalGriff 5,515
1 DamithSL 4,451
2 Maciej Los 3,902
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,175

Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 8 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100