private void calTables(int number, Document regDoc, WaitingForm wf, string tName) { string errormsg = ""; for (int i = 0; i < number; i++) { string title = tableName[i]; if (number == 1) { title = tName; } CalculateTable calTable = new CalculateTable(); Table normalTable = calTable.getTableByName(regDoc, title, testWord); Table comTable = calTable.getTableByName(testDoc, title, testWord); if (normalTable == null) { errormsg += regDoc.Name + "文档不存在该表格:\r" + title + "\r\r"; MessageBox.Show(regDoc.Name + "文档不存在该表格:\r\r" + title); continue; } if (!calTable.isNormalTable(normalTable)) { errormsg += regDoc.Name + "中:\r" + title + "不符合标准格式,无法计算\r\r"; MessageBox.Show(regDoc.Name + "中:\r\r" + title + "不符合标准格式,无法计算"); continue; } if (comTable == null) { errormsg += testDoc.Name + "文档不存在该表格:\r" + title + "\r\r"; MessageBox.Show(testDoc.Name + "文档不存在该表格:\r\r" + title); continue; } if (!calTable.isNormalTable(comTable)) { errormsg += testDoc.Name + "中:\r" + title + "不符合标准格式,无法计算\r\r"; MessageBox.Show(testDoc.Name + "中:\r\r" + title + "不符合标准格式,无法计算"); continue; } List <string> keyList = calTable.calTableShowMssing(comTable, normalTable, dataView, showItemInfo, title, flagList); generateKeyItemList(keyList); } errormsg += showItemInfo.Text; if (!tableMSG.Contains(errormsg)) { tableMSG += errormsg; } }
private void calTables(int number, Document regDoc, WaitingForm wf, string tName) { string errormsg = ""; for (int i = 0; i < number; i++) { string title = tableName[i]; if (number == 1) { title = tName; } CalculateTable calTable = new CalculateTable(); Table normalTable = calTable.getTableByName(regDoc, title, testWord); Table comTable = calTable.getTableByName(testDoc, title, testWord); if (normalTable == null) { errormsg += regDoc.Name + "文档不存在该表格:\r" + title+"\r\r"; MessageBox.Show(regDoc.Name + "文档不存在该表格:\r\r" + title); continue; } if (!calTable.isNormalTable(normalTable)) { errormsg += regDoc.Name + "中:\r" + title + "不符合标准格式,无法计算\r\r"; MessageBox.Show(regDoc.Name + "中:\r\r" + title + "不符合标准格式,无法计算"); continue; } if (comTable == null) { errormsg += testDoc.Name + "文档不存在该表格:\r" + title + "\r\r"; MessageBox.Show(testDoc.Name + "文档不存在该表格:\r\r" + title); continue; } if (!calTable.isNormalTable(comTable)) { errormsg += testDoc.Name + "中:\r" + title + "不符合标准格式,无法计算\r\r"; MessageBox.Show(testDoc.Name + "中:\r\r" + title + "不符合标准格式,无法计算"); continue; } List<string> keyList=calTable.calTableShowMssing(comTable, normalTable, dataView, showItemInfo, title,flagList); generateKeyItemList(keyList); } errormsg += showItemInfo.Text; if (!tableMSG.Contains(errormsg)) tableMSG += errormsg; }