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(); }
public ExcelReader(string excelFile, BusinessLogic.ProcessImportRelation processImportRelation) { ExcelFile = excelFile; TableFilled = false; Exception = null; ProcessImportRelation = processImportRelation; Table = new DataTable(); }
private void Reset() { //Setea todo a su estado predeterminado ProgressBarLoadExcel.Value = 0; ProgressBarUpdate.Value = 0; TextboxPath.Text = ""; for (int i = 0; i < CheckedListProgress.Items.Count; i++) { CheckedListProgress.SetItemChecked(i, false); } ButtonLoadExcel.Enabled = false; ButtonUpdateConfig.Enabled = false; ProcessImportRelation.Dispose(); ProcessImportRelation = null; MainForm.ProcessFlag.DropFlag(); }