public void AddDestination(Destination destination) { Destinations.Add(destination); }
private void btnSave_Click(object sender, EventArgs e) { createDestination = new Destination(tbDestName.Text, (int)nupDistance.Value, (int)nupCost.Value); DialogResult = DialogResult.OK; }
private void btnAdd_Click(object sender, EventArgs e) { Destination = new Destination(tbName.Text.Trim(), (int)nudDistance.Value, (int)nudPrice.Value); DialogResult = System.Windows.Forms.DialogResult.OK; }
public void addDestination(Destination destination) { Destinations.Add(destination); }