Example #1
0
        public void mostrarET()
        {
            cmbTip.DataSource    = Funciones_primerUso.ObtenerTipoUsuario();
            cmbTip.DisplayMember = "tipo_usu";
            cmbTip.ValueMember   = "id_tipo_usu";

            cmbEst.DataSource    = Funciones_primerUso.ObtenerEstado();
            cmbEst.DisplayMember = "estado_usu";
            cmbEst.ValueMember   = "id_estado_usu";
        }
Example #2
0
 public void AgregarUsu()
 {
     agr.nombre    = txtNom.Text;
     agr.direccion = txtDir.Text;
     agr.apellido  = txtApe.Text;
     Constructor_primerUso.clave = txtCifrado.Text;
     agr.correo   = txtCor.Text;
     agr.dui      = txtDui.Text;
     agr.telefono = txtTel.Text;
     agr.usuario  = txtUsu.Text;
     agr.tipo     = Convert.ToInt16(cmbTip.SelectedValue);
     agr.estado   = Convert.ToInt16(cmbEst.SelectedValue);
     int datos = Funciones_primerUso.ingresarusuario(agr);
 }
Example #3
0
 public void AgregarUsu()
 {
     if (txtApe.Text.Trim() == "" || txtCla.Text.Trim() == "" || txtCor.Text.Trim() == "" ||
         txtDir.Text.Trim() == "" || txtDui.Text.Trim() == "" ||
         txtNom.Text.Trim() == "" || txtTel.Text.Trim() == "" || txtUsu.Text.Trim() == "")
     {
         MessageBox.Show("Complete todos los campos", "Campos vacĂ­os", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         agr.nombre    = txtNom.Text;
         agr.direccion = txtDir.Text;
         agr.apellido  = txtApe.Text;
         agr.clave     = txtCifrado.Text;
         agr.correo    = txtCor.Text;
         agr.dui       = txtDui.Text;
         agr.telefono  = txtTel.Text;
         agr.usuario   = txtUsu.Text;
         agr.tipo      = Convert.ToInt16(cmbTip.SelectedValue);
         agr.estado    = Convert.ToInt16(cmbEst.SelectedValue);
         int datos = Funciones_primerUso.ingresarusuario(agr);
     }
 }