コード例 #1
0
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            EdicionRoles f = new EdicionRoles(EdicionRoles.Opcion.INSERTAR);

            f.ShowDialog();
            if (f._Confirmacion)
            {
                Cargar();
            }
        }
コード例 #2
0
 private void Actualizar()
 {
     if (MessageBox.Show("¿Desea actualizar el rol?", "Confirmacion", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         EdicionRoles f = new EdicionRoles(EdicionRoles.Opcion.ACTUALIZAR, dtgRoles.CurrentRow.Cells["IDRol"].Value.ToString());
         f.txbRol.Text     = dtgRoles.CurrentRow.Cells["Rol"].Value.ToString();
         f.txbFuncion.Text = dtgRoles.CurrentRow.Cells["Funcion"].Value.ToString();
         f.ShowDialog();
         if (f._Confirmacion)
         {
             Cargar(true);
         }
     }
 }