コード例 #1
0
ファイル: GestionRoles.cs プロジェクト: Ede4g/em
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            EdicionRol frm = new EdicionRol();

            frm.ShowDialog();
            CargarDatos();
        }
コード例 #2
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            EdicionRol frm = new EdicionRol();

            frm.txtIDRol.Text = dtgRegistros.CurrentRow.Cells["IDRol"].Value.ToString();
            frm.txtRol.Text   = dtgRegistros.CurrentRow.Cells["Rol"].Value.ToString();
            frm.ShowDialog();
            CargarDatos();
        }
コード例 #3
0
ファイル: GestionRoles.cs プロジェクト: Ede4g/em
 private void btnEditar_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Desea editar el registro seleccionado?", "Pregunta", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         EdicionRol frm = new EdicionRol();
         frm.txtIDRol.Text = dtgRegistros.CurrentRow.Cells["IDRol"].Value.ToString();
         frm.txtRol.Text   = dtgRegistros.CurrentRow.Cells["Rol"].Value.ToString();
         frm.ShowDialog();
         CargarDatos();
     }
 }
コード例 #4
0
 private void btnEditar_Click(object sender, EventArgs e)
 {
     try
     {
         if (CLS.MyMessageBox.ShowMessage("Desea editar el registro seleccionado?", "Pregunta", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             EdicionRol frm = new EdicionRol();
             frm.txbIDRol.Text = dtgRegistros.CurrentRow.Cells[0].Value.ToString();
             frm.txbRol.Text   = dtgRegistros.CurrentRow.Cells[1].Value.ToString();
             frm.ShowDialog();
             CargarDatos();
         }
     }
     catch
     {
         CLS.MyMessageBox.ShowMessage("Ocurrió un Error a la hora de EDITAR", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }