diff --git a/插件库/Lskj.PubBill/BillModule.cs b/插件库/Lskj.PubBill/BillModule.cs index 772fa4f..b93064b 100644 --- a/插件库/Lskj.PubBill/BillModule.cs +++ b/插件库/Lskj.PubBill/BillModule.cs @@ -2747,6 +2747,13 @@ namespace Lskj.PubBill dataTable.Columns.Add("BomMxMainProduct"); dataTable.Columns.Add("BomMxAddState"); IEnumerable rowsIEnumerable = sourceTable.Rows.Cast().Where(n => n.RowState != DataRowState.Deleted); + var mxRows = rowsIEnumerable.Where(n => (n[afterBomFieldName] + "").Trim().StartsWith("MX")); + DataRow mxRow = mxRows.FirstOrDefault(); + if (mxRow != null) + { + mxRow["BomMxMainProduct"] = mxProductId; + mxRow["BomMxAddState"] = this.BillModel.SaveState ? "修改" : "新增"; + } foreach (string fileName in impRtnModel.FileNames) { string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileName).Trim(); @@ -8241,4 +8248,34 @@ namespace Lskj.PubBill /// /// The cond. /// The data row. - /// true if X \ No newline at end of file + /// true if XXXX, false otherwise. + private bool ValidateCond(string cond, DataRow dataRow) + { + bool result = false; + string condition = cond; + try + { + if (string.IsNullOrWhiteSpace(cond)) return true;//如果值是空格或者空行,默认正确 + cond = ReplaceHelper.ReplaceRowParam(dataRow, cond); + if (cond.StartsWith("@") || cond.StartsWith("!")) + { + result = "1".Equals(BaseImpl.GetDefaultValue(cond)); + } + else if (dataRow == null) + { + result = ReplaceHelper.EvalCond(cond); + } + else + { + result = ReplaceHelper.ReplaceRowParamCond(dataRow, cond); + } + return result; + } + catch (Exception ex) + { + + } + return result; + } + } +} \ No newline at end of file