Пример #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (textUsuario.Text.Length == 0)
            {
                MessageBox.Show("El usuario no puede estar vacio", "PASSWORD INCORRECTA", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (textPass1.Text != textPass2.Text)
            {
                MessageBox.Show("La password no coincide", "PASSWORD INCORRECTA", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            Usuario usuarioNuevo = new Usuario();

            usuarioNuevo.username = textUsuario.Text;
            usuarioNuevo.password = textPass1.Text;

            if (comboTipo.Text == "Cliente")
            {
                Form alta = new AbmCliente.AltaCliente(usuarioNuevo);
                alta.Show();
            }

            if (comboTipo.Text == "Proveedor")
            {
                Form alta = new AbmProveedor.AltaProveedor(usuarioNuevo);
                alta.Show();
            }
        }
        private void AltaCliente_Click(object sender, EventArgs e)
        {
            Form formularioSiguiente = new AbmCliente.AltaCliente();

            this.Hide();
            formularioSiguiente.ShowDialog();
            this.Show();
        }
Пример #3
0
        private void altaClienteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form alta = new AbmCliente.AltaCliente();

            alta.Show();
        }
Пример #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            Form alta = new AbmCliente.AltaCliente();

            alta.Show();
        }