示例#1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (!txtIdentificacion.Text.Equals("") && !txtPassword.Text.Equals(""))
     {
         LogicaGo logica = new LogicaGo();
         int      res    = logica.insertarUsuario(txtIdentificacion.Text, txtNombres.Text, txtApellidos.Text, txtCelular.Text, txtDireccion.Text, txtPassword.Text, "3", cbActivo.Checked);
         if (res != 1)
         {
             MessageBox.Show("No se pudo ingresar el registro");
         }
         else
         {
             MessageBox.Show("Usuario Creado Correctamente");
             cargarlistaUsuarios();
         }
     }
     else
     {
         MessageBox.Show("Debe ingresar su identificacion");
     }
 }