Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Inicio ini = new Inicio();

            this.Hide();
            ini.Show();
        }
Пример #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            Inicio ss = new Inicio();

            ss.Show();
            this.Hide();
        }
Пример #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            {
                try
                {
                    objetoc.Insertar(textBox1.Text, textBox2.Text, textBox3.Text);
                    MessageBox.Show("Registro completado ");
                }

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

                Inicio ss = new Inicio();
                ss.Show();
                this.Hide();
            }
        }
Пример #4
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.Insertar(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");
            }
        }