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