Exemplo n.º 1
0
        /// <summary>
        /// Mark Selected Recipient as Disposed
        /// </summary>
        private void postDisposed()
        {
            if (gvDispositions.CurrentRow.Cells[3].Value == null)
            {
                MessageBox.Show("Please select a Disposition Type.", "Required");
                return;
            }

            Cursor = Cursors.WaitCursor;
            try
            {
                //Get Selected Recipient of Disposition
                var recipient = gvDispositions.CurrentRow.Cells[0].Value.ToString();
                //Create Address Type using Recipient
                var address = new disposedAddress {
                    Value = recipient, Type = addresstype.Direct
                };
                //Parse Disposition from Selected Disposition in DropDownList
                var disposition = (dispositionType)Enum.Parse(typeof(dispositionType), gvDispositions.CurrentRow.Cells[3].Value.ToString());

                //Call Post Service Method
                var success = MessageDisposedHelper.Post(_selectedMessage.Id, address, disposition, getCertificate());

                //Update UI with Results
                _dispositionRows.Single(d => d.Recipient == recipient).Disposed = success.ToString();
                gvDispositions.DataSource = _dispositionRows;
                gvDispositions.Refresh();
            }
            catch (Exception exception)
            {
                displayError(exception);
            }
            finally
            {
                Cursor = Cursors.Default;
            }
        }
        /// <summary>
        /// Mark Selected Recipient as Disposed
        /// </summary>
        private void postDisposed()
        {
            if (gvDispositions.CurrentRow.Cells[3].Value == null)
            {
                MessageBox.Show("Please select a Disposition Type.", "Required");
                return;
            }

            Cursor = Cursors.WaitCursor;
            try
            {
                //Get Selected Recipient of Disposition
                var recipient = gvDispositions.CurrentRow.Cells[0].Value.ToString();
                //Create Address Type using Recipient
                var address = new disposedAddress { Value = recipient, Type = addresstype.Direct };
                //Parse Disposition from Selected Disposition in DropDownList
                var disposition = (dispositionType)Enum.Parse(typeof(dispositionType), gvDispositions.CurrentRow.Cells[3].Value.ToString());

                //Call Post Service Method
                var success = MessageDisposedHelper.Post(_selectedMessage.Id, address, disposition, getCertificate());

                //Update UI with Results
                _dispositionRows.Single(d => d.Recipient == recipient).Disposed = success.ToString();
                gvDispositions.DataSource = _dispositionRows;
                gvDispositions.Refresh();
            }
            catch (Exception exception)
            {
                displayError(exception);
            }
            finally
            {
                Cursor = Cursors.Default;
            }
        }
Exemplo n.º 3
0
 public bool post(System.Guid messageId, SecureMessagingApiClient.MessageDisposedServiceReference.address recipient, SecureMessagingApiClient.MessageDisposedServiceReference.dispositionType dispositionType)
 {
     return(base.Channel.post(messageId, recipient, dispositionType));
 }