//this method inserts the data into the alert table
        private void InsertIntoAlertTable(ReportDetail r)
        {
            string sql = "insert into ekAlerts_RTIHS ";

            sql += @"values('_Employee','_ReportDate','_ReportName','_WBS1','_WBS2','_WBS3','_SubmittedBy','_ProjMgr','_ProjLead');";
            sql  = sql.Replace("_Employee", r.Employee);
            sql  = sql.Replace("_ReportDate", r.ReportDate.ToString("yyyy-MM-dd"));
            sql  = sql.Replace("_ReportName", r.ReportName);
            sql  = sql.Replace("_WBS1", r.wbs1);
            sql  = sql.Replace("_WBS2", r.wbs2);
            sql  = sql.Replace("_WBS3", r.wbs3);
            sql  = sql.Replace("_SubmittedBy", r.SubmittedBy);
            sql  = sql.Replace("_ProjMgr", r.ProjMgr);
            sql  = sql.Replace("_ProjLead", r.ProjLead);
            try
            {
                this.ExecuteSQL(sql);
            }
            catch (Exception e)
            {
                this.AddFatal(e.ToString() + "\r\n" + sql);
            }

            /*finally
             * {
             *  this.AddInformation(r.wbs1 + ":" + r.wbs2 + ":" + r.wbs3);
             * }*/
        }
 public void SendEmailAlertOnSubmit(
     string Employee,
     DateTime ReportDate,
     string ReportName,
     string WBS1,
     string WBS2,
     string WBS3,
     string SubmittedBy,
     string ProjMgr,
     string ProjLead)
 {
     _currentLine = new ReportDetail(
         Employee,
         ReportDate,
         ReportName,
         WBS1,
         WBS2,
         WBS3,
         SubmittedBy,
         ProjMgr,
         ProjLead
         );
     InsertIntoAlertTable(_currentLine);
     //this.AddInformation("Before Last Line Item: " + ReportDate);
     if (IsLastLineItem())
     {
         //this.AddInformation("Last line submitted");
         //this.AddInformation("New Alerts Sent");
         getAlertList(); //1
         try
         {
             emailAlertOnSubmit(); //2
         }
         catch (Exception e)
         {
             this.AddFatal(e.ToString() + _CONTACTSYSADMIN);
         }
         CleanAlertTable(); //3
     }
 }