Пример #1
0
        private void AddNewTransport()
        {
            FmTransportEditor fmTransportEditor = new FmTransportEditor();

            if (fmTransportEditor.ShowDialog() == DialogResult.OK)
            {
                List <Transport> transports = new List <Transport>(GetTransports());
                FillCtlTransports(transports);
            }
        }
Пример #2
0
        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);
                }
            }
        }