private void btnIngresar_Click(object sender, EventArgs e)
        {
            if (this.txtUsuario.Text == "" && this.txtContraseña.Text == "")
            {
                MessageBox.Show("Por favor ingrese los valores");
            }
            else if (this.txtUsuario.Text == "")
            {
                MessageBox.Show("Por favor ingrese el usuario");
            }
            else if (this.txtContraseña.Text == "")
            {
                MessageBox.Show("Por favor ingrese la contraseña");
            }
            else
            {
                Bussines.Controlador control = new Bussines.Controlador();

                if (control.conectar(this.txtUsuario.Text, this.txtContraseña.Text) == true)
                {
                    PrincipalView pv = new PrincipalView();

                    pv.Visible = true;
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Usuario o Contraseña incorrectos");
                }
            }
        }
        public void regsitrar(String contraseñaSistema, String usuario, String password)
        {
            if (this.txtClaveSistema.Text == "" && this.txtUser.Text == "" && this.txtPass.Text == "")
            {
                MessageBox.Show("Por favor ingrese los valores correspondientes");
            }
            else if (this.txtClaveSistema.Text == "")
            {
                MessageBox.Show("Porfavor ingrese la clave del sistema");
            }
            else if (this.txtUser.Text == "")
            {
                MessageBox.Show("Por favor ingrese el usuario");
            }
            else if (this.txtPass.Text == "")
            {
                MessageBox.Show("Porfavor ingrese la contraseña");
            }
            else
            {
                if (contraseñaSistema == sysPassword)
                {
                    Bussines.Controlador con = new Bussines.Controlador();

                    if (con.registrarVendedor(usuario, password))
                    {
                        MessageBox.Show("Registrado correctamente");
                        limpiar();
                    }
                    else
                    {
                        MessageBox.Show("Error en el registro");
                    }
                }
                else
                {
                    MessageBox.Show("Clave del sistema incorrecta");
                }


                /*DataAccess.Conexion con = new DataAccess.Conexion();
                 * SqlConnection c = con.getConexion();
                 *
                 * //venUsuario venContraseña
                 *
                 * String sql = "INSERT INTO dbo.vendedores (venUsuario, venContraseña) VALUES (@user, @pass)";
                 *
                 * try
                 * {
                 *      SqlCommand comando = new SqlCommand(sql, c);
                 *      comando.Parameters.AddWithValue("@user", usuario);
                 *      comando.Parameters.AddWithValue("@pass", password);
                 *      comando.ExecuteNonQuery();
                 *      MessageBox.Show("Registrado Correctamente");
                 *      limpiar();
                 *      this.Close();
                 * }catch(Exception ex)
                 * {
                 *
                 * }
                 * finally
                 * {
                 *      c.Close();
                 * }
                 *
                 * }
                 * else
                 * {
                 * MessageBox.Show("!Clave del Sistema incorrecta!");*/
            }
        }