//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(); } }
//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(); }
public AgregarTarjeta(int us, ConfirmarCompra cp) { userID = us; c = cp; InitializeComponent(); }