Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static List<CRMContact> getContactList(List<string> crmIds, byte[] CrmLogin)
- {
- StringBuilder sb = new StringBuilder();
- //create an instance of the web service
- ASP_CRM_DAL.ASP_CRM_DAL ws = new ASP_CRM_DAL.ASP_CRM_DAL();
- //convert the list of strings into a semi-colon separated string
- for (int x = 0; x < crmIds.Count; x++)
- {
- if (x == crmIds.Count - 1)
- {
- sb.Append(crmIds[x]);
- }
- else
- {
- sb.Append(crmIds[x] + ";");
- }
- }
- List<CRMContact> crmContacts = new List<CRMContact>();
- DataTable dt = ws.returnCRMContactInfo(sb.ToString(), CrmLogin).Tables[0];
- foreach(DataRow dr in dt.Rows)
- {
- crmContacts.Add(new CRMContact(dr));
- }
- ws.Dispose();
- return crmContacts;
- }
Add Comment
Please, Sign In to add comment