Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Text;
  7. using System.Windows.Forms;
  8.  
  9. namespace TestingJojoWinForms
  10. {
  11. public partial class frmRedemption : Form
  12. {
  13. public frmRedemption()
  14. {
  15. InitializeComponent();
  16. }
  17.  
  18. private void frmRedemption_Load(object sender, EventArgs e)
  19. {
  20. DataTable dtResult = new DataTable("Result");
  21. dtResult.Columns.Add("EntryID");
  22. dtResult.Columns.Add("FirstName");
  23. dtResult.Columns.Add("LastName");
  24. dtResult.Columns.Add("Alias");
  25. dtResult.Columns.Add("SMTPAddress");
  26. dtResult.Columns.Add("JobTitle");
  27. dtResult.Columns.Add("Address");
  28. dtResult.Columns.Add("StreetAddress");
  29.  
  30. Redemption.RDOSessionClass session = new Redemption.RDOSessionClass();
  31. session.Logon(@"your_account_name", "your_password", false, false, 0, false);
  32. for(int index = 1; index <= session.AddressBook.GAL.AddressEntries.Count; index++)
  33. {
  34. Redemption.RDOAddressEntryClass entry = (Redemption.RDOAddressEntryClass)session.AddressBook.GAL.AddressEntries.Item(index);
  35. dtResult.Rows.Add(entry.EntryID, entry.FirstName, entry.LastName, entry.Alias, entry.SMTPAddress, entry.JobTitle, entry.Address, entry.StreetAddress);
  36. }
  37. session.Logoff();
  38.  
  39. this.dataGridView1.DataSource = dtResult;
  40. }
  41.  
  42.  
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement