// |==============================METODOS Y FUNCIONES PRIVADOS==============================| private void ModificarCliente() { int colIdCliente = ManagerGrids.Instance.GetColumnIndexByName(gridClientes, "IDCLIENTE"); int idCliente = Convert.ToInt32(gridClientes.Rows[gridClientes.SelectedRows[0].Index].Cells[colIdCliente].Value); using (var form = new FormNuevoCliente(idCliente)) { var result = form.ShowDialog(); if (result == DialogResult.OK) { RefreshGrid(); } } }
private void btnNuevo_Click(object sender, EventArgs e) { if (!modoSeleccion) { using (var form = new FormNuevoCliente()) { var result = form.ShowDialog(); if (result == DialogResult.OK) { RefreshGrid(); } } } else { int colIdCliente = ManagerGrids.Instance.GetColumnIndexByName(gridClientes, "IDCLIENTE"); IdClienteSeleccionado = Convert.ToInt32(gridClientes.Rows[gridClientes.SelectedRows[0].Index].Cells[colIdCliente].Value); DialogResult = DialogResult.OK; Close(); } }