private void btnSend_Click(object sender, RoutedEventArgs e) { string message = txtReply.Text.Trim(); string title = txtSubject.Text.Trim(); if (!title.StartsWith("RE:")) { title = "RE: " + title; } NotifHelper client = new NotifHelper(); try { client.SendNotification(user.UserID, txtSenderID.Text, title, message); MessageBox.Show("Replied Sent", "Sent", MessageBoxButton.OK, MessageBoxImage.Information); btnClose_Click(sender, e); } catch (Exception ex) { MessageBox.Show("An error has occured with the error message: " + ex.Message, "Error Sending Reply", MessageBoxButton.OK, MessageBoxImage.Error); } finally { client.Close(); } }
private void Report_Click(object sender, RoutedEventArgs e) { try { NotifHelper client = new NotifHelper(); client.SendNotification(user.UserID, "citadmin", "Report Review Abuse", "Reviewer: " + review.UserID + ", by: " + review.UserName + " , on Service ID: " + review.ServiceID.ToString() + " was reported for abuse"); client.Close(); MessageBox.Show("Operation Success"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }