Exemple #1
0
 private void downloadToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         FileMethod.DownloadFile(_userActive.userId, _fileStruct.fileId);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        private void buttonDownload_Click(object sender, EventArgs e)
        {
            EnabledForm(false);

            try
            {
                FileMethod.DownloadFile(_userActive.userId, _fileStruct.fileId);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            EnabledForm(true);
            FillForm();
        }
Exemple #3
0
 public async Task <ActionResult> Download(int id)
 {
     return(await FileMethod.DownloadFile(id));
 }
Exemple #4
0
 private void buttonDownload_Click(object sender, EventArgs e)
 {
     FileMethod.DownloadFile(_userActive.userId, _fileStruct.fileId);
 }
 public async Task <ActionResult> GetContent(int Id)
 {
     return(await FileMethod.DownloadFile(Id));
 }