Exemple #1
0
        private void SalvarPDF(Prova provaSelecionada)
        {
            try
            {
                SaveFileDialog saveFileDialog = new SaveFileDialog();
                saveFileDialog.Filter           = " PDF file |*.pdf";
                saveFileDialog.RestoreDirectory = true;

                if (saveFileDialog.ShowDialog() == DialogResult.OK)
                {
                    _servicePDF.CriarProva(provaSelecionada, Path.GetFullPath(saveFileDialog.FileName));
                }
            }
            catch (NullReferenceException)
            {
                throw new Exception("Selecione uma Prova!");
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }