Click here to Skip to main content
15,894,720 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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

1 solution

A hashtable was being populated with all records I've updated this to just be the Agent Name:
C#
//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);
            }
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900