Ejemplo n.º 1
0
        private void ReservacionesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PanelContenedor.Show();
            userControlInicio1.SendToBack();
            PanelContenedor.Controls.Clear();
            NuevaReservacion thisprobando = NuevaReservacion.Instance;

            PanelContenedor.Controls.Add(thisprobando);
            thisprobando.Show();
        }
Ejemplo n.º 2
0
        private void BtnAceptar_Click(object sender, EventArgs e)
        {
            string idHab, numHab, tipoHab, precioHab;

            if (dgv.SelectedRows.Count > 0)
            {
                //Si las filas son más de 0 se muestran los valores de la fila y se actualiza el booleano "editar"
                NuevaReservacion nr = NuevaReservacion.Instance;
                habitacion.IdHabitacion   = Convert.ToInt32(dgv.CurrentRow.Cells[0].Value);
                habitacion.NumHab         = Convert.ToInt32(dgv.CurrentRow.Cells[1].Value);
                habitacion.TipoHab        = dgv.CurrentRow.Cells[2].Value.ToString();
                habitacion.PrecioPorNoche = Convert.ToSingle(dgv.CurrentRow.Cells[9].Value);
                nr.FillHab(habitacion);
                nr.Revisar();
                nr.calcularPrecio();
                // nr.calcular();
                this.Close();
            }
            else
            {
                MessageBox.Show("Seleccione una fila.");
            }
        }