private void cmdAgregar_Click(object sender, EventArgs e) { var frm = new frmAgregarTalonario(); if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { frmControlTalonarios_Load(sender, e); } }
private void cmdEditar_Click(object sender, EventArgs e) { if (dgRegistros.SelectedRows.Count != 1) { MessageBox.Show("Por favor, seleccione un registro.", "SysLab", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { var fila = (dsSysLab.TALONARIORow)((DataRowView)dgRegistros.CurrentRow.DataBoundItem).Row; var frm = new frmAgregarTalonario(fila.ID_TALONARIO); if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { frmControlTalonarios_Load(sender, e); } } }