diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMetageFormula/FrmMetageFormula.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMetageFormula/FrmMetageFormula.cs index c57b432..eab7417 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMetageFormula/FrmMetageFormula.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMetageFormula/FrmMetageFormula.cs @@ -119,12 +119,14 @@ namespace Mesnac.Action.ChemicalWeighing.LjMetageFormula } var difference = txtDifference.Text.Trim(); - if (!float.TryParse(weight, out var deff)) + if (!float.TryParse(difference, out var deff)) { txtDifference.Focus(); MessageBox.Show("请输入正确的比重"); return; } + + if (view.MtypeId == 0) { @@ -199,6 +201,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjMetageFormula } StockMaterialDb.AddOrUpdate(view); + + this.DialogResult = System.Windows.Forms.DialogResult.OK; } } } \ No newline at end of file