SVN r374
SVN-Revision: r374
This commit is contained in:
@@ -142,8 +142,8 @@ namespace Lskj.PubBomImport
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
foreach (DataRow dataRow in parentTable.Rows)
|
||||
{
|
||||
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($"if not exists (select productid from p_ProductTab where productid = '{(dataRow["图号"] + "").Trim()}')");
|
||||
stringBuilder.AppendLine($"begin insert into p_ProductTab (productid,appellation,bak) values ('{(dataRow["图号"] + "").Trim().Replace("'", "''")}','{(dataRow["名称"] + "").Trim().Replace("'", "''")}','{(dataRow["备注"] + "").Replace("'", "''")}') end;");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(stringBuilder.ToString()))
|
||||
{
|
||||
@@ -170,9 +170,9 @@ namespace Lskj.PubBomImport
|
||||
foreach (DataRow parentRow in parentTable.Rows)
|
||||
{
|
||||
DataRow childRow = childTable.NewRow();
|
||||
childRow["ProductId"] = parentRow["图号"] + "";
|
||||
childRow["appellation"] = parentRow["名称"] + "";
|
||||
childRow["bak"] = parentRow["备注"] + "";
|
||||
childRow["ProductId"] = (parentRow["图号"] + "").Trim();
|
||||
childRow["appellation"] = (parentRow["名称"] + "").Trim();
|
||||
childRow["bak"] = (parentRow["备注"] + "").Trim();
|
||||
childRow["tamount"] = parentRow["套数"] + "";
|
||||
childRow["amount"] = parentRow["套数"] + "";
|
||||
childTable.Rows.Add(childRow);
|
||||
@@ -182,8 +182,8 @@ namespace Lskj.PubBomImport
|
||||
frmBillInfo.InitializeHeader(Model.MaintabFocusedRow, controlSql);
|
||||
frmBillInfo.BillSave();
|
||||
frmBillInfo.OnBillAdd();
|
||||
string productId = Model.MaintabFocusedRow["材料代码"] + "";
|
||||
string billdocumentId = Model.MaintabFocusedRow["单据编号"] + "";
|
||||
string productId = (Model.MaintabFocusedRow["材料代码"] + "").Trim();
|
||||
string billdocumentId = (Model.MaintabFocusedRow["单据编号"] + "").Trim();
|
||||
string updateParentVerSql = @"update bom_BillListTab set Ver = (select top 1 billdocument_id from bom_billListTab where ParentProduct = '{0}') where Billdocument_Id='{1}' and ProductId='{0}'";
|
||||
SqlHelper.ExecuteNonQuery(string.Format(updateParentVerSql, productId, billdocumentId));
|
||||
int.TryParse(Model.FirstRowIndex, out int index);
|
||||
@@ -191,7 +191,7 @@ namespace Lskj.PubBomImport
|
||||
foreach (DataRow dataRow in parentTable.Rows)
|
||||
{
|
||||
int.TryParse(dataRow["套数"] + "", out int tamount);
|
||||
string code = dataRow["图号"] + "";
|
||||
string code = (dataRow["图号"] + "").Trim();
|
||||
FileInfo childInfo = fileInfos.Where(n => n.Name.Contains(code) && n.Extension.Equals(".xlsx", StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
|
||||
if (childInfo != null)
|
||||
{
|
||||
@@ -1737,31 +1737,4 @@ namespace Lskj.PubBomImport
|
||||
{
|
||||
case CellType.String:
|
||||
cellValue = cell.StringCellValue;
|
||||
break;
|
||||
case CellType.Numeric:
|
||||
cellValue = cell.NumericCellValue.ToString();
|
||||
break;
|
||||
case CellType.Boolean:
|
||||
cellValue = cell.BooleanCellValue.ToString();
|
||||
break;
|
||||
case CellType.Blank:
|
||||
break;
|
||||
default:
|
||||
cellValue.ToString();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
cellValue = cell.ToString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
return cellValue;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<Reference Include="DevExpress.XtraTreeList.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.1.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\工作\lserp_cs_6.0\引用DLL\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath>..\..\引用DLL\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI">
|
||||
<HintPath>..\..\..\引用DLL\NPOI.dll</HintPath>
|
||||
@@ -86,7 +86,6 @@
|
||||
<EmbeddedResource Include="FrmMain.resx">
|
||||
<DependentUpon>FrmMain.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Lskj.Business\Lskj.Business.csproj">
|
||||
|
||||
Reference in New Issue
Block a user