Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (this.butaca_cli_id.Count > 0)
            {
                foreach (Int32 butacas in this.butaca_cli_id)
                {
                    if (butacas == Convert.ToInt32(comboBox1.SelectedValue))
                    {
                        MessageBox.Show("Ya has elegido esta butaca", "Error");
                        return;
                    }
                }
                this.butaca_cli_id.Add(Convert.ToInt32(comboBox1.SelectedValue));
                this.cantidad_act = this.cantidad_act + 1;
                MessageBox.Show("Felicitaciones, elegiste la " + comboBox1.Text, "Seleccion de butaca");
            }
            else
            {
                this.butaca_cli_id.Add(Convert.ToInt32(comboBox1.SelectedValue));
                this.cantidad_act = this.cantidad_act + 1;
                //cant_butaca prueba = new cant_butaca();
                //if (prueba.kg == "")
                //{
                MessageBox.Show("Felicitaciones, elegiste la " + comboBox1.Text, "Seleccion de butaca");

                //}
            }
            if (this.cantidad_act == this.cantidad)
            {
                selectMedioP medioDePago = new selectMedioP();
                medioDePago.viaje_id          = this.viaje_id;
                medioDePago.pasaje_cli_id     = this.pasaje_cli_id;
                medioDePago.butaca_cli_id     = this.butaca_cli_id;
                medioDePago.kg                = this.kg;
                medioDePago.admin             = this.admin;
                medioDePago.discapacitado     = this.discapacitado;
                medioDePago.pasaje_65         = this.pasaje_65;
                medioDePago.has_discapacitado = this.has_discapacitado;
                medioDePago.cant_psj          = this.cantidad;
                medioDePago.Show();
                this.Close();
            }
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (this.butaca_cli_id.Count > 0)
            {
                foreach (Int32 butacas in this.butaca_cli_id)
                {
                    if (butacas == Convert.ToInt32(comboBox1.SelectedValue))
                    {
                        MessageBox.Show("Ya has elegido esta butaca", "Error");
                        return;
                    }
                }
                this.butaca_cli_id.Add(Convert.ToInt32(comboBox1.SelectedValue));
                this.cantidad_act = this.cantidad_act + 1;
                MessageBox.Show("Felicitaciones, elegiste la " + comboBox1.Text, "Seleccion de butaca");
            }
            else
            {
                this.butaca_cli_id.Add(Convert.ToInt32(comboBox1.SelectedValue));
                this.cantidad_act = this.cantidad_act + 1;
                //cant_butaca prueba = new cant_butaca();
                //if (prueba.kg == "")
                //{
                MessageBox.Show("Felicitaciones, elegiste la " + comboBox1.Text, "Seleccion de butaca");

                //}
            }
                if (this.cantidad_act == this.cantidad)
                {
                    selectMedioP medioDePago = new selectMedioP();
                    medioDePago.viaje_id = this.viaje_id;
                    medioDePago.pasaje_cli_id = this.pasaje_cli_id;
                    medioDePago.butaca_cli_id = this.butaca_cli_id;
                    medioDePago.kg = this.kg;
                    medioDePago.admin = this.admin;
                    medioDePago.discapacitado = this.discapacitado;
                    medioDePago.pasaje_65 = this.pasaje_65;
                    medioDePago.has_discapacitado = this.has_discapacitado;
                    medioDePago.cant_psj = this.cantidad;
                    medioDePago.Show();
                    this.Close();

                }
        }