public void RecipientAdd(Recipient recipient) { RecipientGroup group = this.ReportItem as RecipientGroup; if (group.RecipientList.ContainsKey(recipient.Name)) { MessageBox.Show("The same name recipient exists, cannot add."); return; } group.RecipientList.Add(recipient.Name, recipient); }
public void RecipientDelete(Recipient recipient) { if (recipient == null) { MessageBox.Show("Please select a recipient."); return; } if (MessageBox.Show("Do you want to delete the recipient " + recipient.Name, "Delete", MessageBoxButton.YesNo) == MessageBoxResult.Yes) { RecipientGroup group = this.ReportItem as RecipientGroup; group.RecipientList.Remove(recipient.Name); } }
public void RecipientAdd(Recipient recipient) { ReportTask task = this.ReportItem as ReportTask; if (task.Recipients.ContainsKey(recipient.Name)) { MessageBox.Show("The same name recipient exists, cannot add."); return; } task.Recipients.Add(recipient.Name, recipient); }