public Reserva(vFuncion obj, int total_asi, Asientos_Elegir frm_asiento_elegir) { InitializeComponent(); btnImprimir.Visible = false; fun = obj; idfun = fun.ID_funcion; total_asientos = total_asi;//indica cauntos boletos se compraron asientos = frm_asiento_elegir; TOT = asientos.Total_FIN; lblTotal.Text = Convert.ToString(TOT); }
private void btnValidar_Click(object sender, EventArgs e) { int total = Convert.ToInt32(nupAbuelo.Value + nupAdulto.Value + nupNinio.Value); int cant_ninio = Convert.ToInt32(nupNinio.Value); int cant_adulto = Convert.ToInt32(nupAdulto.Value); int cant_abuelo = Convert.ToInt32(nupAbuelo.Value); if (total > 8) { MessageBox.Show("La cantidad de boletos máximos son 8", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else if (total > 0 && total <= 8) { Asientos_Elegir asiento = new Asientos_Elegir(fun, total, cant_abuelo, cant_adulto, cant_ninio, acumulador_tot, precio_sala); asiento.ShowDialog(); } }