Esempio n. 1
0
        private void btnReservar_Click(object sender, EventArgs e)
        {
            if (cboRegimen.Text == "Seleccionar")
            {
                MessageBox.Show("Debe seleccionar el regimen", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return;
            }
            float precio;

            precio = getPrecio();

            List <TipoCant> tcs = new List <TipoCant>();

            if (Int32.Parse(txtC1.Text) > 0)
            {
                TipoCant tc = new TipoCant();
                tc.cant = Int32.Parse(txtC1.Text);
                tc.desc = "BASE SIMPLE";
                tcs.Add(tc);
            }
            if (Int32.Parse(txtC2.Text) > 0)
            {
                TipoCant tc = new TipoCant();
                tc.cant = Int32.Parse(txtC2.Text);
                tc.desc = "BASE DOBLE";
                tcs.Add(tc);
            }
            if (Int32.Parse(txtC3.Text) > 0)
            {
                TipoCant tc = new TipoCant();
                tc.cant = Int32.Parse(txtC3.Text);
                tc.desc = "BASE TRIPLE";
                tcs.Add(tc);
            }
            if (Int32.Parse(txtC4.Text) > 0)
            {
                TipoCant tc = new TipoCant();
                tc.cant = Int32.Parse(txtC4.Text);
                tc.desc = "BASE CUADRUPLE";
                tcs.Add(tc);
            }
            if (Int32.Parse(txtC5.Text) > 0)
            {
                TipoCant tc = new TipoCant();
                tc.cant = Int32.Parse(txtC4.Text);
                tc.desc = "KING";
                tcs.Add(tc);
            }



            ConfirmarReserva cr = new ConfirmarReserva(idHotel, dtDesde.Value, dtHasta.Value, cboHotel.Text, cboRegimen.Text, precio, tcs);

            cr.Show();
            this.Hide();
        }
Esempio n. 2
0
        private void btnModificar_Click(object sender, EventArgs e)
        {
            if (cboRegimen.Text == "Seleccionar")
            {
                MessageBox.Show("Debe seleccionar el regimen", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return;
            }
            float precio;

            precio = getPrecio();



            if (Int32.Parse(txtC1.Text) > 0)
            {
                TipoCant tc = new TipoCant();
                tc.cant = Int32.Parse(txtC1.Text);
                tc.desc = "BASE SIMPLE";
                tcs.Add(tc);
            }
            if (Int32.Parse(txtC2.Text) > 0)
            {
                TipoCant tc = new TipoCant();
                tc.cant = Int32.Parse(txtC2.Text);
                tc.desc = "BASE DOBLE";
                tcs.Add(tc);
            }
            if (Int32.Parse(txtC3.Text) > 0)
            {
                TipoCant tc = new TipoCant();
                tc.cant = Int32.Parse(txtC3.Text);
                tc.desc = "BASE TRIPLE";
                tcs.Add(tc);
            }
            if (Int32.Parse(txtC4.Text) > 0)
            {
                TipoCant tc = new TipoCant();
                tc.cant = Int32.Parse(txtC4.Text);
                tc.desc = "BASE CUADRUPLE";
                tcs.Add(tc);
            }
            if (Int32.Parse(txtC5.Text) > 0)
            {
                TipoCant tc = new TipoCant();
                tc.cant = Int32.Parse(txtC5.Text);
                tc.desc = "KING";
                tcs.Add(tc);
            }



            modificarReserva();
        }