public void OnCompleteReport(object sender, RunWorkerCompletedEventArgs e)
        {
            progressForm.Close();
            conn.Dispose();

            var       result       = (Tuple <string, IWorkbook>)e.Result;
            string    errorMessage = result.Item1;
            IWorkbook workBook     = result.Item2;

            mainForm.Enable();

            if (!string.IsNullOrEmpty(errorMessage))
            {
                var errorMessageForm = new QueryForm(errorMessage);
                errorMessageForm.Text = "Ошибки при выполнении запроса";
                errorMessageForm.ShowDialog();
            }
            else if (workBook != null)
            {
                openSaveFileForm = new OpenSaveFileForm(workBook);
                openSaveFileForm.ShowDialog((Form)mainForm);
            }

            loader.Dispose();
        }
Пример #2
0
        private void OnCompleteReport(object sender, RunWorkerCompletedEventArgs e)
        {
            progressForm.Close();
            conn.Dispose();
            var       result   = (Tuple <string, IWorkbook>)e.Result;
            IWorkbook workBook = result.Item2;

            mainForm.Enable();

            openSaveFileForm = new OpenSaveFileForm(workBook);
            openSaveFileForm.ShowDialog((Form)mainForm);

            reportLoader.Dispose();
        }