SVN-Revision: r666
This commit is contained in:
wyf
2025-06-04 11:21:46 +00:00
parent c7818396a7
commit 4b646f6492
2 changed files with 266 additions and 26 deletions
+61 -1
View File
@@ -259,7 +259,7 @@ namespace Lskj.PubBomImport
this.Close();
}
}
else if (Model.ShowType.Equals("1"))//新增多个其它文件,无版次版本验证,关联到物料编码下
else if (Model.ShowType.Equals("1"))//新增多个其它文件
{
BomImpRtnModel bomImpRtnModel = new BomImpRtnModel()
{
@@ -563,6 +563,66 @@ namespace Lskj.PubBomImport
frmProgress.ShowDialog();
frmProgress.Dispose();
}
else if (Model.ShowType.Equals("6"))//修改多个其它文件
{
BomImpRtnModel bomImpRtnModel = new BomImpRtnModel()
{
ShowType = Model.ShowType,
AfterBomFieldName = Model.AfterBomFieldName,
CanSave = true
};
FormDialogModel dialogModel = new FormDialogModel()
{
DialogDllName = "Lskj.PubBomImport.dll",
PubDialogType = DialogType.PubAddRecord,
ReturnTag = bomImpRtnModel
};
this.Tag = dialogModel;
DataTable sourceTable = StaticControl.RightMenuGridView.GridControl.DataSourceTable();
if (sourceTable.Columns.Contains("BomFieldNameDir"))
{
List<DataRow> selectRows = new List<DataRow>();
foreach (DataRow sourceRow in sourceTable.Rows)
{
if (sourceRow.RowState == DataRowState.Deleted)
{
continue;
}
string fileName = sourceRow[Model.AfterBomFieldName] + "";
string dirPath = sourceRow["BomFieldNameDir"] + "";
FileInfo parentInfo = null;
if (string.IsNullOrEmpty(dirPath))
{
continue;
}
parentInfo = new FileInfo(dirPath);
selectRows.Add(sourceRow);
}
if (selectRows.Count > 0)
{
FrmProgress frmProgress = new FrmProgress();
frmProgress.frmMain = this;
frmProgress.Model = Model;
frmProgress.ImportTimer.Tick += (ts, te) =>
{
frmProgress.ImportTimer.Enabled = false;
frmProgress.StartUpdateInOtherFiles(selectRows);
};
frmProgress.ImportTimer.Enabled = true;
DialogResult dialogResult = frmProgress.ShowDialog();
bomImpRtnModel.CanSave = dialogResult == DialogResult.OK;
frmProgress.Dispose();
}
else
{
this.Close();
}
}
else
{
this.Close();
}
}
}
catch (Exception ex)
{