SVN r409
SVN-Revision: r409
This commit is contained in:
@@ -169,11 +169,15 @@ namespace Lskj.PubBomImport
|
||||
{
|
||||
saveResult = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception($"保存Bom失败\r\n{tipMsg}");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageUtil.Show(ex.Message);
|
||||
throw new Exception($"保存Bom失败\r\n{ex.Message}");
|
||||
}
|
||||
}
|
||||
return saveResult;
|
||||
|
||||
@@ -707,7 +707,7 @@ namespace Lskj.PubBomImport
|
||||
for (int j = firstRow.FirstCellNum; j < cellCount; j++)
|
||||
{
|
||||
ICell cell = row.GetCell(j);
|
||||
if (cell.IsMergedCell)
|
||||
if (cell != null && cell.IsMergedCell)
|
||||
{
|
||||
CellRangeAddress mergrRange = FindMergedRegion(sheet, i, j);
|
||||
if (j == mergrRange.FirstColumn)
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace Lskj.PubBomImport
|
||||
if (code.StartsWith("QD") || code.StartsWith("ZZQD"))
|
||||
{
|
||||
stringBuilder.AppendLine($"if not exists (select productid from p_ProductTab where productid = '{dataRow["图号"] + ""}')");
|
||||
stringBuilder.AppendLine($"begin insert into p_ProductTab (productid,appellation,bak) values ('{(dataRow["图号"] + "").Replace("'", "''")}','{(dataRow["名称"] + "").Replace("'", "''")}','{(dataRow["备注"] + "").Replace("'", "''")}') end;");
|
||||
stringBuilder.AppendLine($"begin insert into p_ProductTab (productid,appellation,bak,SpeciesNo) values ('{(dataRow["图号"] + "").Replace("'", "''")}','{(dataRow["名称"] + "").Replace("'", "''")}','{(dataRow["备注"] + "").Replace("'", "''")}','0199') end;");
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(stringBuilder.ToString()))
|
||||
@@ -142,7 +142,9 @@ namespace Lskj.PubBomImport
|
||||
int.TryParse(dataRow["套数"] + "", out int tamount);
|
||||
string code = (dataRow["图号"] + "").Trim();
|
||||
FileInfo childInfo = fileInfos.Where(n => n.Name.StartsWith(code)).FirstOrDefault();
|
||||
if (childInfo != null && (code.StartsWith("QD") || code.StartsWith("ZZQD")))
|
||||
if (childInfo != null)
|
||||
{
|
||||
if ((code.StartsWith("QD") || code.StartsWith("ZZQD")))
|
||||
{
|
||||
SetProcessBar(0, allCount);
|
||||
SetProcessMsg($"正在导入:{Path.GetFileName(childInfo.FullName)}");
|
||||
@@ -179,9 +181,10 @@ namespace Lskj.PubBomImport
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
MessageUtil.Show(ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -268,7 +271,7 @@ namespace Lskj.PubBomImport
|
||||
if (code.StartsWith("QD") || code.StartsWith("ZZQD"))
|
||||
{
|
||||
stringBuilder.AppendLine($"if not exists (select productid from p_ProductTab where productid = '{dataRow["图号"] + ""}')");
|
||||
stringBuilder.AppendLine($"begin insert into p_ProductTab (productid,appellation,bak) values ('{(dataRow["图号"] + "").Replace("'", "''")}','{(dataRow["名称"] + "").Replace("'", "''")}','{(dataRow["备注"] + "").Replace("'", "''")}') end;");
|
||||
stringBuilder.AppendLine($"begin insert into p_ProductTab (productid,appellation,bak,SpeciesNo) values ('{(dataRow["图号"] + "").Replace("'", "''")}','{(dataRow["名称"] + "").Replace("'", "''")}','{(dataRow["备注"] + "").Replace("'", "''")}','0199') end;");
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(stringBuilder.ToString()))
|
||||
|
||||
Reference in New Issue
Block a user