Example #1
0
 private void btnSendRequest_Click(object sender, EventArgs e)
 {
     try {
         if (IsValidToSendMail(txtRequestRuleName.Text, txtRequestOldEvent.Text, txtRequestNewEvent.Text)) {
             System.Security.Principal.WindowsIdentity user =
             System.Security.Principal.WindowsIdentity.GetCurrent();
             EmailRequest emailRequest = new EmailRequest();
             string ruleMode = string.Empty;
             ruleMode = "\n\n~~~~~Modes~~~~~\nAction TB mode= " + chkRequestActionTB.Checked.ToString() +
             "\nFilter Event mode=" + chkRequestFilterEv.Checked.ToString() +
             "\nRegex mode=" + chkRequestRegexM.Checked.ToString() + "\n~~~~~~~~~~~~~~~";
             emailRequest.SendEmail("*****@*****.**", user.Name.Replace("LB-MUREX-COM\\", "") + "@murex.com", "Your request for a new rule has been sent", txtRequestRuleName.Text + ruleMode + "\n\nOld Event Text:\n" + txtRequestOldEvent.Text + "\n\nNew Event Text:\n" + txtRequestNewEvent.Text);
             emailRequest.SendEmailToMultiUsers("*****@*****.**", "[email protected];[email protected]", "New rule Request from " + user.Name.Replace("LB-MUREX-COM\\", ""), "Rule Name: " + txtRequestRuleName.Text + ruleMode + "\n\nOld Event Text:\n" + txtRequestOldEvent.Text + "\n\nNew Event Text:\n" + txtRequestNewEvent.Text);
             MessageBox.Show("A new rule request has been sent, \nyou will be notified with the addition shortly.", "Request Sent", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     } catch (Exception ex) {
         ShowCustomError(ex.Message, false);
     }
 }
Example #2
0
 private void btnAddIncident_Click_1(object sender, EventArgs e)
 {
     try {
         if (IsValidToAddIncident(txtIncidentName.Text, txtIncident.Text, txtIncidentSolution.Text, true)) {
             Incident incident = AddIncidentToDataGrid(txtIncidentName.Text, txtIncident.Text, txtIncidentSolution.Text, txtIncidentNotes.Text);
             CreateIncidentFile(incident);
             System.Security.Principal.WindowsIdentity user =
             System.Security.Principal.WindowsIdentity.GetCurrent();
             EmailRequest emailRequest = new EmailRequest();
             emailRequest.SendEmailToMultiUsers("*****@*****.**", "[email protected];[email protected]", "Incident has been added by " + user.Name.Replace("LB-MUREX-COM\\", ""), "\nIncident name: " + txtIncidentName.Text + "\n\nIncident text: " + txtIncident.Text + "\n\nIncident Solution:\n " + txtIncidentSolution.Text + "\n\nIncident Notes:\n " + txtIncidentNotes.Text);
         }
     } catch (Exception ex) {
         ShowCustomError(ex.Message, false);
     }
 }