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["Folio"].Value.ToString(); Formularios.Inventarios.Form_TraspasoMp frm = new Formularios.Inventarios.Form_TraspasoMp(IdRegistro); frm.CargaLista += new Form1.MessageHandler(CargaLista); frm.ShowDialog(); } }
private void toolStripButton_Edit_Click(object sender, EventArgs e) { string IdRegistro = ""; string Estatus = ""; int contador = 0; dataGridView_Lista.EndEdit(); foreach (DataGridViewRow registro in dataGridView_Lista.Rows) { try { if ((Boolean)registro.Cells["Seleccionar"].Value == true) { contador++; IdRegistro = registro.Cells["Folio"].Value.ToString(); Estatus = registro.Cells["Estatus"].Value.ToString(); } } catch { } } if (contador != 1) { MessageBox.Show("Debe seleccionar solo un registro."); return; } if (Estatus == "ENVIADO" || Estatus == "ENTREGADO") { MessageBox.Show("No puedes Editar un movimiento que ya esta en proceso."); return; } Formularios.Inventarios.Form_TraspasoMp Form = new Formularios.Inventarios.Form_TraspasoMp(IdRegistro); Form.CargaLista += new Form1.MessageHandler(CargaLista); Form.ShowDialog(); }
private void toolStripButton_Add_Click(object sender, EventArgs e) { Formularios.Inventarios.Form_TraspasoMp frm = new Formularios.Inventarios.Form_TraspasoMp(""); frm.CargaLista += new Form1.MessageHandler(CargaLista); frm.ShowDialog(); }