/// <summary> /// 组装案卷信息,不保留[页数为空],[路径无法拼接],[某单元格无列名]情况的案卷 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void bgwPrepareAJ_DoWork(object sender, DoWorkEventArgs e) { int location = 0; prepareAJComplete = false; for (int i = ColumnNameRow + 1; i < AJCells.MaxDataRow + 1; i++) { try { location = i + 1; float a = (i - ColumnNameRow) / (float)(AJCells.MaxDataRow - ColumnNameRow) * 100; int percent = (int)a; bgwPrepareAJ.ReportProgress(percent); AJEntity aj = new AJEntity(); aj.Location = location; DataTable AJ = DataTableBuilder(i); if (AJ != null) { aj.Value = AJ; } else { continue; } string result; if (isOneToMany) { aj.IsOneToMany = isOneToMany; result = aj.LoadProperty(AJPageColumn, dirConstitute, JNCountColumn, AJ_JN); } else { result = aj.LoadProperty(AJPageColumn, dirConstitute); } if (!string.IsNullOrWhiteSpace(result)) { WriteErrorInfo(location.ToString(), "[LoadProperty]", result); continue; } InsertQueue(aj); UsefulAJ++; } catch (Exception ex) { WriteErrorInfo(location.ToString(), "[PrepareAJ]", ex.Message); continue; } } }