Another issue I faced while migrating from VS 2005 to VS 2012 was How to Include Prerequisites with a ClickOnce Application.
Click here for the solution
Click here for the solution
Domino.NotesSession s = new Domino.NotesSession();
Domino.NotesDatabase db;
Domino.NotesView vw;
Domino.NotesDocument doc;
try
{
//Leave blank Password, then It will prompt for Password, It basically authenticates with the *.id file
s.Initialize("mypassword");
//If Server is blank, which Local otherwise specify the Server
//Place the Mailbox path Next
db = s.GetDatabase("", @"C:\Documents and Settings\me\Local Settings\Application Data\Lotus\Notes\Data\mail\me\mymailbox.nsf", false);
if (db != null)
{
//Inbox is special/hidden folder
vw = db.GetView("($Inbox)");
doc = vw.GetFirstDocument();
while (doc != null)
{
String Subject = ((object[])doc.GetItemValue("Subject"))[0] as String;
String From = ((object[])doc.GetItemValue("From"))[0] as String;
textBox1.Text += Subject;
textBox1.Text += From;
doc = vw.GetNextDocument(doc);
}
}
}
catch (Exception er)
{
MessageBox.Show(er.Message);
}
private void branchBindingSource_AddingNew(object sender, AddingNewEventArgs e)
{
//// Get data table view
DataView dataTableView = branchBindingSource.List as DataView;
//// Create row from view
DataRowView rowView = dataTableView.AddNew();
rowView["BranchID"] = -1;
rowView["BranchCode"] = "001";
rowView["BranchDescription"] = "002";
//// Set New row
e.NewObject = rowView;
branchBindingSource.MoveLast();
}