コード例 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrWhiteSpace(txtNomUsuario.Text) || string.IsNullOrWhiteSpace(txtContraseña.Text) || string.IsNullOrWhiteSpace(cbxCargo.Text) || string.IsNullOrWhiteSpace(cbxCveAsesor.Text))
     {
         MessageBox.Show("Campos Vacios", "Sistema", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         //MessageBox.Show(cbxCveAsesor.SelectedValue.ToString());
         if (MessageBox.Show("¿Desea relizar el registro?", "Confirmacion", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             AU.insertarUsuario(txtNomUsuario.Text, Seguridad.encriptar(txtContraseña.Text), cbxCargo.Text, cbxCveAsesor.SelectedValue.ToString());
         }
     }
 }