Exemplo n.º 1
0
        private void botonModificacion_Click_1(object sender, EventArgs e)
        {
            if (!seleccionDeChofer)
            {
                if (tablaListado.SelectedRows.Count == 1 && tablaListado.RowCount != 0)
                {
                    DataGridViewRow row = this.tablaListado.SelectedRows[0];

                    int id = Convert.ToInt32(row.Cells["id"].Value);

                    AltaChofer altaChofer = new AltaChofer(id, this);
                    altaChofer.ShowDialog();
                }
                else
                {
                    MessageBox.Show("Debe seleccionar el chofer a modificar");
                }
            }
            else
            {
                if (tablaListado.RowCount > 0)
                {
                    int index = tablaListado.SelectedRows[0].Index;
                    listener.onOperationFinishChofer(choferes.ElementAt(index));
                    this.Close();
                }
                else
                {
                    MessageBox.Show("Debe seleccionar una fila");
                }
            }
        }
Exemplo n.º 2
0
        private void botonAlta_Click_1(object sender, EventArgs e)
        {
            AltaChofer altaChoferForm = new AltaChofer(this);

            altaChoferForm.ShowDialog();
        }