private void WeighACatWithBindings(Cat cat, Weight weight) { Scale dlg = new Scale(weight); if (DialogResult.OK == dlg.ShowDialog()) { _model.SaveObject<Weight>(weight); cat.CurrentWeight = weight; } }
private void WeighACatNoBindings(Cat cat, Weight weight) { Scale dlg = new Scale(weight.Pounds, weight.Date); if (DialogResult.OK == dlg.ShowDialog()) { weight.Pounds = dlg.Pounds; weight.Date = dlg.WeighDate; _model.SaveObject<Weight>(weight); cat.CurrentWeight = weight; } }