Exemplo n.º 1
0
 //BOTON PARA REALIZAR LA COMPRA Y CONFIRMARLA
 private void button1_Click(object sender, EventArgs e)
 {
     if (elUserTieneTarjeta(usuarioID))
     {
         DBConsulta.conexionAbrir();
         cargarDatosDeCompra();
         DBConsulta.conexionCerrar();
     }
     else
     {
         MessageBox.Show("No tiene un nro de tarjeta asignada.\nPor favor, ingrese una a continuación");
         ConfirmarCompra b  = this;
         AgregarTarjeta  ag = new AgregarTarjeta(usuarioID, b);
         ag.Show();
     }
 }
Exemplo n.º 2
0
        //BOTON PARA CONFIRMAR LA COMPRA O SEA PAGAR
        private void button2_Click(object sender, EventArgs e)
        {
            if (Usuario.esAdmin == 1)
            {
                MessageBox.Show("Un administrador no puede comprar", "Error");
                return;
            }

            ComprarPrincipal thi = this;

            if (!IDCargados.Any())
            {
                MessageBox.Show("No has seleccionado nada para comprar");
                return;
            }
            ConfirmarCompra a = new ConfirmarCompra(this, IDCargados, userID);

            a.Show();
            this.Hide();
        }
Exemplo n.º 3
0
 public AgregarTarjeta(int us, ConfirmarCompra cp)
 {
     userID = us;
     c      = cp;
     InitializeComponent();
 }