protected void SendEmail(int incidentid, int level, int slaid) { SentEmail objEmail = new SentEmail(); #region Sent Mail for Level 1 Escalation if (level == 1) { objLevel1 = objLevel1.Get_By_Slaid(slaid); if (objLevel1 != null) { string varemail = objLevel1.Emailid; string[] arrEmail = varemail.Split(','); int lengthCount = Convert.ToInt32(arrEmail.Length.ToString()); for (int i = 0; i < lengthCount - 1; i++) { string emailId = arrEmail[i].ToString(); if (emailId != "," && emailId != "") { objIncident = objIncident.Get_By_id(incidentid); if (objIncident != null) { objCheckLevel1 = objCheckLevel1.Get_By_id(incidentid); if (objCheckLevel1.Incidentid == 0) { CheckLevel1Escalate obj = new CheckLevel1Escalate(); obj.Incidentid = incidentid; obj.Level1escalate = true; obj.Insert(); objEmail.To = emailId; objEmail.From = Resources.MessageResource.strEmailFromLevel1Escalate.ToString(); objEmail.Subject = "Problem Not Resolve for Call -" + objIncident.Title; objEmail.Body = "Dear Sir, The Current Request is not Solved whose Incident Id is " + objIncident.Incidentid + " and Title of Call is " + objIncident.Title + " Thanks & Regards Admin"; objEmail.SmtpServer = Resources.MessageResource.strMailServer.ToString(); objEmail.SentMail(); } } } } } } #endregion #region Sent Mail for Level 2 Escalation if (level == 2) { objLevel2 = objLevel2.Get_By_Slaid(slaid); if (objLevel2.Slaid != 0) { string varemail = objLevel2.Emailid; string[] arrEmail = varemail.Split(','); int lengthCount = Convert.ToInt32(arrEmail.Length.ToString()); for (int i = 0; i < lengthCount - 1; i++) { string emailId = arrEmail[i].ToString(); if (emailId != "," && emailId != "") { objIncident = objIncident.Get_By_id(incidentid); if (objIncident != null) { objCheckLevel2 = objCheckLevel2.Get_By_id(incidentid); if (objCheckLevel2.Incidentid == 0) { CheckLevel2Escalate obj = new CheckLevel2Escalate(); obj.Incidentid = incidentid; obj.Level2escalate = true; obj.Insert(); objEmail.To = emailId; objEmail.From = Resources.MessageResource.strEmailFromLevel2Escalate.ToString(); objEmail.Subject = "Problem Not Resolve for Call -" + objIncident.Title; objEmail.Body = "Dear Sir, The Current Request is not Solved whose Incident Id is " + objIncident.Incidentid + " and Title of Call is " + objIncident.Title + " Thanks & Regards <br/> Admin"; objEmail.SmtpServer = Resources.MessageResource.strMailServer.ToString(); objEmail.SentMail(); } } } } } } #endregion #region Sent Mail for Level 3 Escalation if (level == 3) { objLevel3 = objLevel3.Get_By_Slaid(slaid); if (objLevel3.Slaid != 0) { string varemail = objLevel3.Emailid; string[] arrEmail = varemail.Split(','); int lengthCount = Convert.ToInt32(arrEmail.Length.ToString()); for (int i = 0; i < lengthCount - 1; i++) { string emailId = arrEmail[i].ToString(); if (emailId != "," && emailId != "") { objIncident = objIncident.Get_By_id(incidentid); if (objIncident != null) { objCheckLevel3 = objCheckLevel3.Get_By_id(incidentid); if (objCheckLevel3.Incidentid == 0) { CheckLevel3Escalate obj = new CheckLevel3Escalate(); obj.Incidentid = incidentid; obj.Level3escalate = true; obj.Insert(); objEmail.To = emailId; objEmail.From = Resources.MessageResource.strEmailFromLevel3Escalate.ToString(); objEmail.Subject = "Problem Not Resolve for Call -" + objIncident.Title; objEmail.Body = "Dear Sir, The Current Request is not Solved whose Incident Id is " + objIncident.Incidentid + " and Title of Call is " + objIncident.Title + " Thanks & Regards Admin"; objEmail.SmtpServer = Resources.MessageResource.strMailServer.ToString(); objEmail.SentMail(); } } } } } } #endregion }
protected void SendEmail(int incidentid, int level,int slaid) { SentEmail objEmail = new SentEmail(); #region Sent Mail for Level 1 Escalation if (level==1) { objLevel1 = objLevel1.Get_By_Slaid(slaid); if (objLevel1!=null ) { string varemail = objLevel1.Emailid; string[] arrEmail = varemail.Split(','); int lengthCount = Convert.ToInt16(arrEmail.Length.ToString()); for (int i = 0; i < lengthCount - 1; i++) { string emailId = arrEmail[i].ToString(); if (emailId != "," && emailId!="") { objIncident = objIncident.Get_By_id(incidentid); if (objIncident!=null) { objCheckLevel1 = objCheckLevel1.Get_By_id(incidentid); if (objCheckLevel1.Incidentid ==0) { CheckLevel1Escalate obj = new CheckLevel1Escalate(); obj.Incidentid = incidentid; obj.Level1escalate = true; obj.Insert(); objEmail.To = emailId; objEmail.From = Resources.MessageResource.strEmailFromLevel1Escalate.ToString(); objEmail.Subject = "Problem Not Resolve for Call -" + objIncident.Title; objEmail.Body = "Dear Sir, The Current Request is not Solved whose Incident Id is " + objIncident.Incidentid + " and Title of Call is " + objIncident.Title + " Thanks & Regards Admin"; objEmail.SmtpServer = Resources.MessageResource.strMailServer.ToString(); objEmail.SentMail(); } } } } } } #endregion #region Sent Mail for Level 2 Escalation if (level == 2) { objLevel2 = objLevel2.Get_By_Slaid(slaid); if (objLevel2.Slaid != 0) { string varemail = objLevel2.Emailid; string[] arrEmail = varemail.Split(','); int lengthCount = Convert.ToInt16(arrEmail.Length.ToString()); for (int i = 0; i < lengthCount - 1; i++) { string emailId = arrEmail[i].ToString(); if (emailId != "," && emailId != "") { objIncident = objIncident.Get_By_id(incidentid); if (objIncident != null) { objCheckLevel2 = objCheckLevel2.Get_By_id(incidentid); if (objCheckLevel2.Incidentid == 0) { CheckLevel2Escalate obj = new CheckLevel2Escalate(); obj.Incidentid = incidentid; obj.Level2escalate = true; obj.Insert(); objEmail.To = emailId; objEmail.From = Resources.MessageResource.strEmailFromLevel2Escalate.ToString(); objEmail.Subject = "Problem Not Resolve for Call -" + objIncident.Title; objEmail.Body = "Dear Sir, The Current Request is not Solved whose Incident Id is " + objIncident.Incidentid + " and Title of Call is " + objIncident.Title + " Thanks & Regards <br/> Admin"; objEmail.SmtpServer = Resources.MessageResource.strMailServer.ToString(); objEmail.SentMail(); } } } } } } #endregion #region Sent Mail for Level 3 Escalation if (level == 3) { objLevel3 = objLevel3.Get_By_Slaid(slaid); if (objLevel3.Slaid != 0) { string varemail = objLevel3.Emailid; string[] arrEmail = varemail.Split(','); int lengthCount = Convert.ToInt16(arrEmail.Length.ToString()); for (int i = 0; i < lengthCount - 1; i++) { string emailId = arrEmail[i].ToString(); if (emailId != "," && emailId != "") { objIncident = objIncident.Get_By_id(incidentid); if (objIncident != null) { objCheckLevel3 = objCheckLevel3.Get_By_id(incidentid); if (objCheckLevel3.Incidentid == 0) { CheckLevel3Escalate obj = new CheckLevel3Escalate(); obj.Incidentid = incidentid; obj.Level3escalate = true; obj.Insert(); objEmail.To = emailId; objEmail.From = Resources.MessageResource.strEmailFromLevel3Escalate.ToString(); objEmail.Subject = "Problem Not Resolve for Call -" + objIncident.Title; objEmail.Body = "Dear Sir, The Current Request is not Solved whose Incident Id is " + objIncident.Incidentid + " and Title of Call is " + objIncident.Title + " Thanks & Regards Admin"; objEmail.SmtpServer = Resources.MessageResource.strMailServer.ToString(); objEmail.SentMail(); } } } } } } #endregion }
public int Update_CheckLevel2Escalate_By_id(CheckLevel2Escalate objCheckLevel2Escalate) { return (int)ExecuteNonQuery(sp_CheckLevel2Escalate_Update, new object[] { objCheckLevel2Escalate.Level2escalate, objCheckLevel2Escalate.Incidentid }); }
public int Insert_CheckLevel2Escalate(CheckLevel2Escalate objCheckLevel2Escalate) { return (int)ExecuteNonQuery(sp_CheckLevel2Escalate_Insert, new object[] { objCheckLevel2Escalate.Level2escalate, objCheckLevel2Escalate.Incidentid }); }
public object GenerateCheckLevel2EscalateObject(ref IDataReader returnData) { CheckLevel2Escalate obj = new CheckLevel2Escalate(); while (returnData.Read()) { obj.Incidentid = (int)returnData["Incidentid"]; obj.Level2escalate = (bool)returnData["Level2escalate"]; } returnData.Close(); returnData.Dispose(); return obj; }
public CollectionBase GenerateCheckLevel2EscalateCollection(ref IDataReader returnData) { BLLCollection<CheckLevel2Escalate> col = new BLLCollection<CheckLevel2Escalate>(); while (returnData.Read()) { CheckLevel2Escalate obj = new CheckLevel2Escalate(); obj.Incidentid = (int)returnData["Incidentid"]; obj.Level2escalate = (bool)returnData["Level2escalate"]; col.Add(obj); } returnData.Close(); returnData.Dispose(); return col; }