Example #1
0
        private void ButtonGetExcel_Click(object sender, EventArgs e)
        {
            MainForm.ProcessFlag.SetFlag(true, "Obtener Archivo Excel");

            ProcessImportRelation = new BusinessLogic.ProcessImportRelation(BusinessLogic);
            ProcessImportRelation.UpdateProgress += UpdateProgress1;

            for (int i = 0; i < CheckedListProgress.Items.Count; i++)
            {
                CheckedListProgress.SetItemChecked(i, false);
            }

            bool ExcelObtained = ProcessImportRelation.GetExcel();

            if (ExcelObtained)
            {
                CheckedListProgress.SetItemChecked(0, true);
                TextboxPath.Text = ProcessImportRelation.ExcelRoot;
                ProcessImportRelation.CreateFolders();
                CheckedListProgress.SetItemChecked(1, true);
                CheckedListProgress.SetItemChecked(2, true);
                CheckedListProgress.SetItemChecked(3, true);
                CheckedListProgress.SetItemChecked(4, true);

                ButtonLoadExcel.Enabled = true;
            }

            MainForm.ProcessFlag.DropFlag();
        }