Click here to Skip to main content
Rate this: bad
good
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();
                output.GetStagAgtNmbyList.Add(r);
            }
            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 2:54am
pmcm850

1 solution

Rate this: bad
good
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);
            }
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 545
1 CPallini 490
2 George Jonsson 291
3 OriginalGriff 260
4 Suvabrata Roy 219
0 OriginalGriff 4,873
1 CPallini 3,900
2 Sergey Alexandrovich Kryukov 3,474
3 George Jonsson 2,646
4 Gihan Liyanage 2,236


Advertise | Privacy | Mobile
Web02 | 2.8.140905.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