Hi all,
I want to send a confirmation email to user after checking if a container is one way or not (by comparing input text with a range of container numbers in an excel sheet). I basically want to show an alert in case a container # matches with excel sheet value.
Else, send confirmation msg. How do I achieve this? right now,the way I have coded, it sends out confirmation email regardless. Here is my code:
public void Btn_SubmitClick(Object sender, EventArgs E)
{
string path = @"C:\TEMP\OneWayContainers.xls";
string connStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=Excel 12.0;";
OleDbConnection objConn = new OleDbConnection(connStr);
objConn.Open();
OleDbCommand objCmdSelect = new OleDbCommand("SELECT * FROM MyRange", objConn);
OleDbDataAdapter objAdapter1 = new OleDbDataAdapter();
objAdapter1.SelectCommand = objCmdSelect;
DataSet o ...
Go to the complete details ...