Sure, what I have so far is a Windows form that uses a test name and password to make my connection. It then has a drop down box that populates on form load to show the available file cabinet
==============================================================================
var conn = ServiceConnection.Create(uri, "BasicAdmin", "admin", "TestSrv");
Organization org = conn.Organizations[0];
var fileCabinet = org.GetFileCabinetsFromFilecabinetsRelation().FileCabinet;
foreach (var fc in fileCabinet)
fCabinet.Items.Add(fc.Name);
==============================================================================
I then have a button that processes a CSV file and hopefully will insert the data to create a data record
==============================================================================
//Path for the CSV file.
string csvPath = @"C:\Test.csv";
//Read the contents of CSV file.
string csvData = File.ReadAllText(csvPath);
//Execute a loop over the rows.
foreach (string row in csvData.Split('\n'))
{
//Creating array to read CSV into.
string[] cell = null;
if (!string.IsNullOrEmpty(row))
{
cell = row.Split(',');
int docID = Int32.Parse(cell[0]);
Document indexInfo = new Document();
indexInfo.Fields = new List<DocumentIndexField>();
indexInfo.Fields.Add(DocumentIndexField.Create("Contact", cell[1]));
indexInfo.Fields.Add(DocumentIndexField.Create("Subject", cell[2]));
Document uploadedDoc = fileCabinet.PostToDocumentsRelationForDocuments(indexInfo);
}
}
==============================================================================
I hope that makes sense.
Thanks