SVN-Revision: r851
This commit is contained in:
wyf
2025-07-10 02:41:50 +00:00
parent 280cc36dea
commit 388af6eb42
2 changed files with 19 additions and 9 deletions
+9 -2
View File
@@ -289,7 +289,7 @@ namespace Lskj.PubBomImport
this.Close();
}
}
else if (Model.ShowType.Equals("1"))//新增多个其它文件
else if (Model.ShowType.Equals("1") || Model.ShowType.Equals("11"))//新增多个其它文件
{
BomImpRtnModel bomImpRtnModel = new BomImpRtnModel()
{
@@ -332,7 +332,14 @@ namespace Lskj.PubBomImport
frmProgress.ImportTimer.Tick += (ts, te) =>
{
frmProgress.ImportTimer.Enabled = false;
frmProgress.StartImportInOtherFiles(selectRows);
if (Model.ShowType.Equals("1"))
{
frmProgress.StartImportInOtherFiles(selectRows);
}
else if (Model.ShowType.Equals("11"))
{
frmProgress.StartImportInOtherFiles(selectRows, false);
}
};
frmProgress.ImportTimer.Enabled = true;
DialogResult dialogResult = frmProgress.ShowDialog();
+10 -7
View File
@@ -284,7 +284,7 @@ namespace Lskj.PubBomImport
/// Bom结构补充,新增其它文件,无版本控制
/// </summary>
/// <param name="dirPaths"></param>
public void StartImportInOtherFiles(List<DataRow> selectRows)
public void StartImportInOtherFiles(List<DataRow> selectRows, bool CanNotAllowSA = true)
{
try
{
@@ -334,13 +334,16 @@ namespace Lskj.PubBomImport
}
else
{
if (!bb.Equals("SA"))
if (CanNotAllowSA)
{
throw new Exception($"{fileInfo.Name}\r\n版本不为SA不允许新增,请进行修改");
}
if (bc > 0)
{
throw new Exception($"{fileInfo.Name}\r\n不为0的版次不允许新增,请进行修改");
if (!bb.Equals("SA"))
{
throw new Exception($"{fileInfo.Name}\r\n版本不为SA不允许新增,请进行修改");
}
if (bc > 0)
{
throw new Exception($"{fileInfo.Name}\r\n不为0的版次不允许新增,请进行修改");
}
}
DataRow productRow = BaseImpl.GetDataRowResult($"select ProductId from p_productTab where ProductId = '{code}'");
if (productRow == null)