public void MailSend(string croid, string OppId, string caseid, string uptime, string expTime, string status) { SqlProcsNew obj = new SqlProcsNew(); DataSet ds = new DataSet(); ds = obj.ExecuteSP("SP_LoadDetails", new SqlParameter() { ParameterName = "@Imode", SqlDbType = SqlDbType.Int, Value = 9 }, new SqlParameter() { ParameterName = "@CRO_Id", SqlDbType = SqlDbType.NVarChar, Value = croid }, new SqlParameter() { ParameterName = "@MAILGRP", SqlDbType = SqlDbType.Char, Value = "SC" }); if (ds != null && ds.Tables[0].Rows.Count > 0) { ANCRMMail mail = new ANCRMMail(); String[] toId = new String[] { ds.Tables[0].Rows[0]["EMAILID"].ToString() }; String[] ccId = new String[] { ds.Tables[0].Rows[0]["GRPMAILID"].ToString() }; String[] bccId = ds.Tables[0].Rows[0]["BCCID"].ToString().Split(';'); //String[] toId = new String[] { "*****@*****.**" }; //String[] ccId = new String[] { "*****@*****.**" }; //String[] bccId = new String[] { "*****@*****.**" }; String Body = "", sub = ""; if (status.Equals("BI")) { sub = "Better Image Required for Sectioning - Case Id : " + caseid; Body = "Dear " + ds.Tables[0].Rows[0]["NAME"].ToString() + ",<br/><br/>"; Body = Body + " The image that you had submitted for Opportunity Number :" + OppId + " and Case Id : " + caseid + " is not clear. Please send the proper image for Sectioning."; } else if (status.Equals("RJ")) { sub = "Case Id : " + caseid + " has been rejected"; Body = "Dear " + ds.Tables[0].Rows[0]["NAME"].ToString() + ",<br/><br/>"; Body = Body + " The image that you had submitted for Opportunity Number :" + OppId + " and Case Id : " + caseid + " has been rejected. Only residential buildings containing upto 1+4 floors can be sectioned. "; Body = Body + "Please check in SMARTLite system."; } Body = Body + "<br/><br/><b>This is an auto generated mail from AkzoNobel Support System.</b><br/>"; mail.SendMail(toId, ccId, Body, sub, bccId); } }
public void MailSend(string croid, string OppId, string caseid, string uptime, string expTime, string status) { //String tomail, string Caseid, String sitename, String croid, string croname, string cromail, string cromobile SqlProcsNew obj = new SqlProcsNew(); DataSet ds = new DataSet(); ds = obj.ExecuteSP("SP_LoadDetails", new SqlParameter() { ParameterName = "@Imode", SqlDbType = SqlDbType.Int, Value = 9 }, new SqlParameter() { ParameterName = "@CRO_Id", SqlDbType = SqlDbType.NVarChar, Value = croid }, new SqlParameter() { ParameterName = "@MAILGRP", SqlDbType = SqlDbType.Char, Value = "SC" }); if (ds != null && ds.Tables[0].Rows.Count > 0) { ANCRMMail mail = new ANCRMMail(); String[] toId = new String[] { ds.Tables[0].Rows[0]["EMAILID"].ToString() }; String[] ccId = new String[] { ds.Tables[0].Rows[0]["GRPMAILID"].ToString() }; String[] bccId = ds.Tables[0].Rows[0]["BCCID"].ToString().Split(';'); //String[] toId = new String[] { "*****@*****.**" }; //String[] ccId = new String[] { "*****@*****.**" }; //String[] bccId = new String[] { "*****@*****.**" }; //String[] bccId = ds.Tables[0].Rows[0]["BCCID"].ToString().Split(';'); String Body = "", sub = ""; if (status.Equals("10")) { sub = "Image taken up for Sectioning - Case Id : " + caseid; Body = "Dear " + ds.Tables[0].Rows[0]["NAME"].ToString() + ",<br/><br/>"; Body = Body + " The image that you had submitted for Opportunity Number :" + OppId + " and Case Id : " + caseid + " has been taken up by Innovatus Team for Sectioning. "; Body = Body + "You can expect to receive the sectioned image within " + expTime + " Minutes. (Working hours)"; } else if (status.Equals("BI")) { sub = "Better Image Required for Sectioning - Case Id : " + caseid; Body = "Dear " + ds.Tables[0].Rows[0]["NAME"].ToString() + ",<br/><br/>"; Body = Body + " The image that you had submitted for Opportunity Number :" + OppId + " and Case Id : " + caseid + " is not clear. Please send the proper image for Sectioning."; //if(!string.IsNullOrEmpty(TxtRemarks.Text)) // Body = Body + "<br/><b>Note: " + TxtRemarks.Text+"</b>"; //Body = Body + "You can expect to receive the sectioned image within " + expTime + " Minutes. (Working hours)"; } else if (status.Equals("DI")) { sub = "Duplicate Image Occurred - Case Id : " + caseid; Body = "Dear " + ds.Tables[0].Rows[0]["NAME"].ToString() + ",<br/><br/>"; Body = Body + " The image that you had submitted for Opportunity Number :" + OppId + " and Case Id : " + caseid + " has been already sectioned by Innovatus Team. "; Body = Body + "Please check in SMARTLite system."; } else if (status.Equals("SD")) { sub = "Ready for Preview - Case Id : " + caseid; Body = "Dear " + ds.Tables[0].Rows[0]["NAME"].ToString() + ",<br/><br/>"; Body = Body + " The image that you had submitted for Opportunity Number :" + OppId + " and Case Id : " + caseid + " is now ready for preview. "; Body = Body + "Please check in SMARTLite system."; } //if (!string.IsNullOrEmpty(TxtRemarks.Text)) // Body = Body + "<br/><b>Note: " + TxtRemarks.Text + "</b>"; Body = Body + "<br/><br/><b>This is an auto generated mail from AkzoNobel Support System.</b><br/>"; ////Body = Body + "<table style=margin-left:10px><tr><td>Case Id</td><td>:</td><td>" + caseid + "</td></tr>"; ////Body = Body + "<tr><td>Opp No </td><td>:</td><td>" + OppId + "</td></tr>"; ////Body = Body + "<tr><td>CRO Id</td><td>:</td><td>" + croid + "</td></tr>"; ////Body = Body + "<tr><td>CRO Name</td><td>:</td><td>" + ds.Tables[0].Rows[0]["NAME"].ToString() + "</td></tr>"; ////Body = Body + "<tr><td>CRO Email Id</td><td>:</td><td>" + ds.Tables[0].Rows[0]["EMAILID"].ToString() + "</td></tr>"; ////Body = Body + "<tr><td>CRO Mobile No</td><td>:</td><td>" + ds.Tables[0].Rows[0]["MOBILENO"].ToString() + "</td></tr>"; ////Body = Body + "<tr><td>Status Time </td><td>:</td><td>" + uptime + "</td></tr></table>"; mail.SendMail(toId, ccId, Body, sub, bccId); } }