コード例 #1
0
        private void cmdAgregar_Click(object sender, EventArgs e)
        {
            var frm = new frmAgregarCategoria();

            if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                frmClasificacion_Load(sender, e);
            }
        }
コード例 #2
0
        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.CATEGORIARow)((DataRowView)dgRegistros.CurrentRow.DataBoundItem).Row;

                var frm = new frmAgregarCategoria(fila.ID_CATEGORIA);

                if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    frmClasificacion_Load(sender, e);
                }
            }
        }