Exemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            inicio ss = new  inicio();

            ss.Show();
            this.Hide();
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string nom   = txtNombre.Text;
            string ape   = txtApellido.Text;
            string user  = txtUsuario.Text;
            string pass  = txtContraseña.Text;
            string passc = txtCcontra.Text;

            if (nom != "" || ape != "" || user != "" || pass != "" || passc != "")
            {
                if (pass.Equals(passc))
                {
                    try
                    {
                        objetoc.insertarusuario(txtNombre.Text, txtApellido.Text, txtUsuario.Text, txtContraseña.Text, txtCcontra.Text);
                        MessageBox.Show("Registro completado ");
                    }

                    catch (Exception ex)
                    {
                        MessageBox.Show("No se pudo registrar " + ex);
                    }

                    inicio ss = new inicio();
                    ss.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Las contraseñas no coinciden");
                }
            }
            else
            {
                MessageBox.Show("Aun faltan campos por llenar");
            }
        }