private void comandasDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e) { if( e.RowIndex > listaComandasEnProceso.Count() -1) { return; } var senderGrid = (DataGridView)sender; EntComanda entComanda = null; Console.WriteLine(" Selected column " + e.ColumnIndex); //Si la columna seleccionada es diferente de 3 , se selecciono cualquier cosa menos el borrar if (e.ColumnIndex != 3) { return; } entComanda = listaComandasEnProceso.ElementAt(e.RowIndex); NuevaVentaForm nuevaVentaForm = new NuevaVentaForm(entComanda, this, entComanda.getNombreComanda()); nuevaVentaForm.Show(); this.Hide(); }
private void despliegaNuevaVenta(String nombreComanda) { NuevaVentaForm nuevaVentaForm = new NuevaVentaForm(null, this, nombreComanda); nuevaVentaForm.Show(); this.Hide(); }