SVN-Revision: r369
This commit is contained in:
wyf
2025-03-21 07:41:53 +00:00
parent ef024fe8fd
commit e8d7c12efb
+34 -1
View File
@@ -182,6 +182,10 @@ namespace Lskj.PubBomImport
frmBillInfo.InitializeHeader(Model.MaintabFocusedRow, controlSql);
frmBillInfo.BillSave();
frmBillInfo.OnBillAdd();
string productId = Model.MaintabFocusedRow["材料代码"] + "";
string billdocumentId = Model.MaintabFocusedRow["单据编号"] + "";
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);
FirstRowIndex = index;
foreach (DataRow dataRow in parentTable.Rows)
@@ -202,6 +206,8 @@ namespace Lskj.PubBomImport
frmBillInfo.InitializeHeader(dataRow, Model.BillMasterSql);
frmBillInfo.BillSave();
frmBillInfo.OnBillAdd();
string updateChildVerSql = @"update bom_BillListTab set Ver = (select top 1 billdocument_id from bom_billListTab where ParentProduct = '{0}') where Billdocument_Id = (select top 1 billdocument_id from bom_billListTab where ParentProduct = '{1}') and ProductId='{0}'";
SqlHelper.ExecuteNonQuery(string.Format(updateChildVerSql, code, productId));
}
}
}
@@ -1731,4 +1737,31 @@ 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
}
}