private void DeclaredMassTextBox_Leave(object sender, EventArgs e) { ah.DeclaredMassTextBox_Leave(sender, e); ItemId iid = NC.App.DB.ItemIds.Get(d => String.Compare(d.item, ItemIdComboBox.Text, false) == 0); if (iid != null) { iid.declaredMass = Double.Parse(DeclaredMassTextBox.Text); iid.modified = true; NC.App.DB.ItemIds.Set(iid); ah.ap.ApplyItemId(iid); } }
private void DeclaredMassTextBox_Leave(object sender, EventArgs e) { ah.DeclaredMassTextBox_Leave(sender, e); // mass changed, update the current item id associated field, but save it off only when user presses OK ItemId Cur = NC.App.DB.ItemIds.Get(ah.ap.item_id); if (Cur == null) // blank or unspecified somehow { return; } if (Cur.declaredMass != ah.ap.mass) { Cur.declaredMass = ah.ap.mass; Cur.modified = true; } }
private void DeclaredMassTextBox_Leave(object sender, EventArgs e) { ah.DeclaredMassTextBox_Leave(sender, e); }