Пример #1
0
        private void btExel_Click(object sender, EventArgs e)
        {
            var fd = new SaveFileDialog {
                Filter = @"Файлы Excel|*.xls"
            };

            fd.ShowDialog();
            if (fd.FileName.Trim().Length == 0)
            {
                return;
            }

            /*if (!File.Exists(Application.StartupPath + "\\Templates\\Sections.xls"))
             * {
             *  MessageBox.Show(@"Не обнаружен файл шаблона " + "\\Templates\\Sections.xls", @"Внимание", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             *  return;
             * }*/

            _fileName = fd.FileName.Trim();
            if (!_fileName.EndsWith(".xls", StringComparison.CurrentCultureIgnoreCase))
            {
                _fileName += ".xls";
            }

            this.Enabled = false;

            frmWait          = new frmLoad();
            frmWait.TextWait = "ЖДИТЕ. ИДЁТ ВЫГРУЗКА";
            frmWait.Show();

            backgroundWorker1.RunWorkerAsync(new object[] { "\\Templates\\Sections.xls" });
        }
Пример #2
0
        private void btExel_Click(object sender, EventArgs e)
        {
            Logging.StartFirstLevel(763);
            Logging.Comment("Выгрузка отчета о занятости секций");

            Logging.Comment($"Объект ID:{cmbObject.SelectedValue}; Наименование:{cmbObject.Text}");
            Logging.Comment($"Здание ID:{cbZdan.SelectedValue}; Наименование:{cbZdan.Text}");
            Logging.Comment($"Этаж ID:{cbZloor.SelectedValue}; Наименование:{cbZloor.Text}");
            Logging.Comment($"Поиск по секции:{textBox1.Text}");

            Logging.Comment($"{checSec.Text}:{(checSec.Checked ? "Да" : "Нет")}");

            Logging.StopFirstLevel();

            this.Enabled     = false;
            frmWait          = new frmLoad();
            frmWait.TextWait = "ЖДИТЕ. ИДЁТ ВЫГРУЗКА";
            frmWait.Show();

            backgroundWorker1.RunWorkerAsync(new object[] { "\\Templates\\Sections.xls" });
        }
Пример #3
0
        private void btExel_Click(object sender, EventArgs e)
        {
            var fd = new SaveFileDialog {
                Filter = @"Файлы Excel|*.xls"
            };

            fd.ShowDialog();
            if (fd.FileName.Trim().Length == 0)
            {
                return;
            }

            _fileName = fd.FileName.Trim();
            if (!_fileName.EndsWith(".xls", StringComparison.CurrentCultureIgnoreCase))
            {
                _fileName += ".xls";
            }

            Logging.StartFirstLevel(154);

            Logging.Comment($"БИК:{tbBIC.Text}");
            Logging.Comment($"Корр. счёт:{tbCA.Text}");
            Logging.Comment($"Наименование:{tbName.Text}");

            Logging.Comment($"Недействующие: {(cbIsActive.Checked ? "Да" : "Нет")}");

            Logging.StopFirstLevel();

            this.Enabled = false;

            frmWait          = new frmLoad();
            frmWait.TextWait = "ЖДИТЕ. ИДЁТ ВЫГРУЗКА";
            frmWait.Show();

            backgroundWorker1.RunWorkerAsync(new object[] { "\\Templates\\Sections.xls" });
        }