SVN-Revision: r548
This commit is contained in:
wyf
2025-05-07 11:41:29 +00:00
parent 8e12ca1150
commit 82459d0891
+12 -19
View File
@@ -797,14 +797,7 @@ namespace Lskj.PubBomImport
frmBillInfo.OnBillAdd();
SetProcessBar(0, 0);
SetProcessMsg($"正在导入:{Path.GetFileName(parentInfo.FullName)}");
DataTable childTable = new DataTable();
foreach (GridColumn gridColumn in frmBillInfo.GcMainView.Columns)
{
if (!childTable.Columns.Contains(gridColumn.FieldName))
{
childTable.Columns.Add(gridColumn.FieldName, gridColumn.ColumnType);
}
}
DataTable childTable = frmBillInfo.GcMainView.GridControl.DataSourceTable().Clone();
foreach (DataRow parentRow in parentTable.Rows)
{
string childCode = parentRow["图号"] + "";
@@ -828,7 +821,7 @@ namespace Lskj.PubBomImport
{
int.TryParse(parentRow["套数"] + "", out int tamount);
string childCode = parentRow["图号"] + "";
if (code.StartsWith("QD") || code.StartsWith("ZZQD"))
if (childCode.StartsWith("QD") || childCode.StartsWith("ZZQD"))
{
string tempFileName = childFileDic[childCode];
FileInfo childInfo = new FileInfo(tempFileName);
@@ -838,7 +831,7 @@ namespace Lskj.PubBomImport
}
if (childInfo != null)
{
if (code.StartsWith("ZZQD"))
if (childCode.StartsWith("ZZQD"))
{
DataTable zzqdTable = ExcelToDatatable(childInfo.FullName, Model, "", index);
//frmMain.Invoke(new Action(() =>
@@ -862,7 +855,7 @@ namespace Lskj.PubBomImport
DataRow childRow = childTable.NewRow();
childRow["ProductId"] = zzqdItem["物料编码"] + "";
childRow["appellation"] = zzqdItem["名称"] + "";
childRow["bak"] = code;
childRow["bak"] = childCode;
childRow["tamount"] = parentRow["套数"] + "";
int.TryParse(zzqdItem["数量"] + "", out int amount);
childRow["amount"] = amount * tamount;
@@ -1191,14 +1184,14 @@ namespace Lskj.PubBomImport
frmBillInfo.OnBillAdd();
SetProcessBar(0, 0);
SetProcessMsg($"正在导入:{Path.GetFileName(mxInfo.FullName)}");
DataTable childTable = new DataTable();
foreach (GridColumn gridColumn in frmBillInfo.GcMainView.Columns)
{
if (!childTable.Columns.Contains(gridColumn.FieldName))
{
childTable.Columns.Add(gridColumn.FieldName, gridColumn.ColumnType);
}
}
DataTable childTable = frmBillInfo.GcMainView.GridControl.DataSourceTable().Clone();
//foreach (GridColumn gridColumn in frmBillInfo.GcMainView.Columns)
//{
// if (!childTable.Columns.Contains(gridColumn.FieldName))
// {
// childTable.Columns.Add(gridColumn.FieldName, gridColumn.ColumnType);
// }
//}
foreach (DataRow parentRow in parentTable.Rows)
{
int.TryParse(parentRow["套数"] + "", out int tamount);