private void toolStripButton_Edit_Click(object sender, EventArgs e) { int contador = 0; string IdRegistro = "0"; dataGridView_Lista.EndEdit(); foreach (DataGridViewRow registro in dataGridView_Lista.Rows) { try { if ((Boolean)registro.Cells["Seleccionar"].Value == true) { IdRegistro = registro.Cells["iidSerie"].Value.ToString(); contador++; } } catch { } } if (contador != 1) { MessageBox.Show("Debe seleccionar solo un registro."); return; } Formularios.Facturacion.Form_Series from = new Formularios.Facturacion.Form_Series(IdRegistro); from.CargaLista += new Form1.MessageHandler(CargaLista); from.ShowDialog(); }
private void dataGridView_Lista_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { DataGridViewRow row = this.dataGridView_Lista.Rows[e.RowIndex]; string IdRegistro = row.Cells["iidSerie"].Value.ToString(); Formularios.Facturacion.Form_Series from = new Formularios.Facturacion.Form_Series(IdRegistro); from.CargaLista += new Form1.MessageHandler(CargaLista); from.ShowDialog(); } }
private void toolStripButton_Add_Click(object sender, EventArgs e) { Formularios.Facturacion.Form_Series from = new Formularios.Facturacion.Form_Series(""); from.CargaLista += new Form1.MessageHandler(CargaLista); from.ShowDialog(); }