Beispiel #1
0
        /// <summary>
        /// Download Attachment
        /// </summary>
        private void getAttachment()
        {
            Cursor = Cursors.WaitCursor;
            try
            {
                //Get Inputs From User Selections
                var id = _selectedMessage.Attachments.Single(a => a.FileName == gvAttachments.CurrentRow.Cells[0].Value.ToString()).Id;

                //Call Get Service Method
                var attachment = AttachmentHelper.Get(_selectedMessage.Id, id, getCertificate());

                //Save Attachment to Disk
                saveAttachment(attachment);
            }
            catch (Exception exception)
            {
                displayError(exception);
            }
            finally
            {
                Cursor = Cursors.Default;
            }
        }