Click here to Skip to main content
12,403,978 members (71,656 online)
Rate this:
 
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
pmcm904

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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160721.1 | Last Updated 8 Jan 2013
Copyright © CodeProject, 1999-2016
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