コード例 #1
0
ファイル: GroupViewModel.cs プロジェクト: TonyWu/QvSubscriber
        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);
        }
コード例 #2
0
ファイル: GroupViewModel.cs プロジェクト: TonyWu/QvSubscriber
        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);
            }
        }
コード例 #3
0
ファイル: TaskViewModel.cs プロジェクト: TonyWu/QvSubscriber
        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);
        }