private void AddNewTransport() { FmTransportEditor fmTransportEditor = new FmTransportEditor(); if (fmTransportEditor.ShowDialog() == DialogResult.OK) { List <Transport> transports = new List <Transport>(GetTransports()); FillCtlTransports(transports); } }
private void EditSelectedTransport() { if (ctlTransports.SelectedCells.Count > 0) { Transport transport = (Transport)ctlTransports.SelectedCells[0].OwningRow.DataBoundItem; FmTransportEditor fmTransportEditor = new FmTransportEditor(transport); if (fmTransportEditor.ShowDialog() == DialogResult.OK) { List <Transport> transports = new List <Transport>(GetTransports()); FillCtlTransports(transports); } } }