protected void UncheckedLevel1Escalate(int Slaid) { objLevel1 = objLevel1.Get_By_Slaid(Slaid); if (objLevel1.Slaid != 0) { int varLevelid1; varLevelid1 = objLevel1.Level1id; objLevel1.Delete(varLevelid1); } }
public int GetLevel1EscalationTimeInMins(int slaid) { int varDays = 0; int varHours = 0; int VarMins = 0; int TotalMins = 0; objLevel1 = objLevel1.Get_By_Slaid(slaid); if (objLevel1.Slaid != 0) { varDays = objLevel1.Days; varHours = objLevel1.Hours; VarMins = objLevel1.Min; TotalMins = (varDays * 24 * 60) + (varHours * 60) + VarMins; } return(TotalMins); }
protected void UpdateLevel1Escalate(int Slaid) { EscalateLevel1 obj = new EscalateLevel1(); string varemail = ""; if (radio1Level1.Checked == true) { objLevel1.After = false; objLevel1.Before = true; } else { objLevel1.After = true; objLevel1.Before = false; } objLevel1.Slaid = Slaid; for (int i = listLevel1.Items.Count - 1; i >= 0; i--) { if (listLevel1.Items[i].Selected == true) { varemail = varemail + listLevel1.Items[i].Text + ","; } } objLevel1.Days = Convert.ToInt32(txtDaysLevel1.Text); objLevel1.Hours = Convert.ToInt32(drpHoursLevel1.SelectedValue); objLevel1.Min = Convert.ToInt32(drpMinlevel1.SelectedValue); obj = obj.Get_By_Slaid(Slaid); if (obj.Slaid != 0) { if (varemail == "") { varemail = obj.Emailid; } objLevel1.Emailid = varemail; objLevel1.Level1id = obj.Level1id; objLevel1.Update(); } else { objLevel1.Emailid = varemail; objLevel1.Insert(); } }
protected void Level1Escalate() { int Slaid = Convert.ToInt32(Request.QueryString[0]); objLevel1 = objLevel1.Get_By_Slaid(Slaid); if (objLevel1.Slaid != 0) { string varEmail = objLevel1.Emailid; string[] arrEmail = varEmail.Split(','); if (arrEmail.Length > 2) { selectLevale1.Text = objLevel1.Emailid; } else { selectLevale1.Text = arrEmail[0].ToString(); } chkLevel1.Checked = true; if (objLevel1.Before == true) { radio1Level1.Checked = true; } else { radio2Level1.Checked = true; } txtDaysLevel1.Text = Convert.ToString(objLevel1.Days); drpHoursLevel1.SelectedIndex = objLevel1.Hours; drpMinlevel1.SelectedIndex = objLevel1.Min; } else { selectLevale1.Visible = false; listLevel1.Visible = true; radio1Level1.Checked = true; } }
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 GetLevel1EscalationTimeInMins(int slaid) { int varDays = 0; int varHours = 0; int VarMins = 0; int TotalMins = 0; objLevel1 = objLevel1.Get_By_Slaid(slaid); if (objLevel1.Slaid!=0 ) { varDays = objLevel1.Days; varHours = objLevel1.Hours; VarMins = objLevel1.Min; TotalMins = (varDays * 24 * 60) + (varHours * 60) + VarMins; } return TotalMins; }
public int Update_EscalateLevel1_By_id(EscalateLevel1 objEscalateLevel1) { return (int)ExecuteNonQuery(sp_EscalateLevel1_mst_Update, new object[] { objEscalateLevel1.Slaid, objEscalateLevel1.Min, objEscalateLevel1.Level1id, objEscalateLevel1.Hours, objEscalateLevel1.Emailid, objEscalateLevel1.Days, objEscalateLevel1.Before, objEscalateLevel1.After }); }
public int Insert_EscalateLevel1(EscalateLevel1 objEscalateLevel1) { return (int)ExecuteNonQuery(sp_EscalateLevel1_mst_Insert, new object[] { objEscalateLevel1.Slaid, objEscalateLevel1.Min, objEscalateLevel1.Hours, objEscalateLevel1.Emailid, objEscalateLevel1.Days, objEscalateLevel1.Before, objEscalateLevel1.After }); }
public object GenerateEscalateLevel1Object(ref IDataReader returnData) { EscalateLevel1 obj = new EscalateLevel1(); while (returnData.Read()) { obj.Slaid = (int)returnData["Slaid"]; obj.Min = (int)returnData["Min"]; obj.Level1id = (int)returnData["Level1id"]; obj.Hours = (int)returnData["Hours"]; obj.Emailid = (string)returnData["Emailid"]; obj.Days = (int)returnData["Days"]; obj.Before = (bool)returnData["Before"]; obj.After = (bool)returnData["After"]; if (returnData["Sent"] != DBNull.Value) { obj.Sent = (bool)returnData["Sent"]; } } returnData.Close(); returnData.Dispose(); return obj; }
public CollectionBase GenerateEscalateLevel1Collection(ref IDataReader returnData) { BLLCollection<EscalateLevel1> col = new BLLCollection<EscalateLevel1>(); while (returnData.Read()) { EscalateLevel1 obj = new EscalateLevel1(); obj.Slaid = (int)returnData["Slaid"]; obj.Min = (int)returnData["Min"]; obj.Level1id = (int)returnData["Level1id"]; obj.Hours = (int)returnData["Hours"]; obj.Emailid = (string)returnData["Emailid"]; obj.Days = (int)returnData["Days"]; obj.Before = (bool)returnData["Before"]; obj.After = (bool)returnData["After"]; if (returnData["Sent"] != DBNull.Value) { obj.Sent = (bool)returnData["Sent"]; } col.Add(obj); } returnData.Close(); returnData.Dispose(); return col; }