コード例 #1
0
 // CONEXIÓN Y RESERVACIÓN
 private void boton_reservar_Click(object sender, EventArgs e)
 {
     //RESERVACIÓN
     ConexionRecepcionista.reservar(txtBox_nombre.Text, txtBox_celular.Text, txtBox_ciudad.Text, txtBox_estado.Text,
                                    txtBox_email.Text, this.fechaIngreso.Text, this.fechaSalida.Text, adultos.ToString(), niños.ToString(),
                                    txtBox_habitacion.Text);
 }
コード例 #2
0
ファイル: CheckIn.cs プロジェクト: Wicho-SM/HotelBell
        private void boton_checkIn_Click(object sender, EventArgs e)
        {
            ConexionRecepcionista.checkIn(comboBxNombre, txtBox_celular, txtBox_email, txtBox_habitacion, 3, txtBoxF);
            DateTime hoy = DateTime.Now;

            hoy = hoy.Date;

            DateTime fechaR = DateTime.Parse(txtBoxF.Text);

            bool fechaCorrecta = System.DateTime.Equals(hoy, fechaR);


            if (comboBxNombre.Text == "")
            {
                //Condicion
                MessageBox.Show("Necesita seleccionar un nombre.");
            }
            else
            {
                if (fechaCorrecta)
                {
                    //MessageBox.Show("Fecha de Check-In correcta");
                    ConexionRecepcionista.checkIn(comboBxNombre, txtBox_celular, txtBox_email, txtBox_habitacion, 2, txtBoxF);
                    MessageBox.Show("Entrada de cliente confirmada.");
                }
                else
                {
                    MessageBox.Show("Fecha de Check-In incorrecta");
                }
            }
        }
コード例 #3
0
        // CONEXIÓN Y RESERVACIÓN
        private void boton_reservar_Click(object sender, EventArgs e)
        {
            //RESERVACIÓN
            ConexionRecepcionista.reservar(txtBox_nombre.Text, txtBox_celular.Text, txtBox_ciudad.Text, comboBox_estado.Text,
                                           txtBox_email.Text, this.fechaIngreso.Text, this.fechaSalida.Text, adultos.ToString(), niños.ToString(),
                                           comboBox_habitacion.Text);

            bool vacios = false, numeros = false;

            if (txtBox_nombre.Text == "" || txtBox_celular.Text == "" || txtBox_email.Text == "" ||
                txtBox_ciudad.Text == "")
            {
                MessageBox.Show("Hace falta llenar algún campo, favor de revisar.");
            }
            else
            {
                vacios = true;
            }



            if (txtBox_celular.TextLength < 9)
            {
                MessageBox.Show("Hace falta completar el campo de celular del cliente.");
            }
            else
            {
                numeros = true;
            }


            if (txtBox_email.Text == "" && vacios && numeros)
            {
                MessageBox.Show("Inserte correo, por favor");
            }
            else
            {
                if (validarEmail(txtBox_email.Text) == false)
                {
                    MessageBox.Show("El correo proporcionado no es correcto, favor de verificarlo.");
                }
                else
                {
                    MessageBox.Show("Reservación correcta.");
                    ocuparHab();

                    Reservar res = new Reservar();
                    Hide();
                    res.ShowDialog(this);
                    Show();
                    this.Close();
                }
            }
        }
コード例 #4
0
 private void cliente_eliminar_Click(object sender, EventArgs e)
 {
     if (comboBxNombre.Text == "")
     {
         MessageBox.Show("Por favor elija un nombre.");
     }
     else
     {
         ConexionRecepcionista.eliminarReservacion(comboBxNombre, true);
         MessageBox.Show("Reservacion eliminada.");
     }
 }
コード例 #5
0
ファイル: CheckIn.cs プロジェクト: Wicho-SM/HotelBell
 private void boton_datos_Click(object sender, EventArgs e)
 {
     if (comboBxNombre.Text == "")
     {
         //Condicion
         MessageBox.Show("Necesita seleccionar un nombre.");
     }
     else
     {
         //Traer Datos
         ConexionRecepcionista.checkIn(comboBxNombre, txtBox_celular, txtBox_email, txtBox_habitacion, 1, txtBoxF);
     }
 }
コード例 #6
0
ファイル: CheckOut.cs プロジェクト: Wicho-SM/HotelBell
 private void boton_checkOut_Click(object sender, EventArgs e)
 {
     if (comboBxNombre.Text == "")
     {
         //Condicion
         MessageBox.Show("Necesita seleccionar un nombre.");
     }
     else
     {
         //Hacer CheckOut - Salida
         ConexionRecepcionista.checkOut(comboBxNombre, txtBox_celular, txtBox_email, txtBox_habitacion, txtBox_entrada, txtBox_salida, 2);
     }
 }
コード例 #7
0
 private void boton_checkIn_Click(object sender, EventArgs e)
 {
     if (comboBxNombre.Text == "")
     {
         //Condicion
         MessageBox.Show("Necesita seleccionar un nombre.");
     }
     else
     {
         //Realizar CheckIn
         ConexionRecepcionista.checkIn(comboBxNombre, txtBox_celular, txtBox_email, txtBox_habitacion, 2);
         MessageBox.Show("Entrada de cliente confirmada.");
     }
 }
コード例 #8
0
        private void boton_eliminar_Click(object sender, EventArgs e)
        {
            picReservacion.Hide();
            picC_In.Hide();
            pic_CheckOut.Hide();
            lblCheckIn.Hide();
            lblCheckOut.Hide();
            lblReservar.Hide();
            boton_desconexion.Hide();
            boton_eliminar.Hide();

            picReturn.Show();
            pic_eliminar.Show();
            nombre_cliente.Show();
            comboBxNombre.Show();
            cliente_eliminar.Show();

            ConexionRecepcionista.eliminarReservacion(comboBxNombre, false);
        }
コード例 #9
0
ファイル: CheckOt.cs プロジェクト: Wicho-SM/HotelBell
        private void btn_confirmar_Click(object sender, EventArgs e)
        {
            //Fecha Hoy
            DateTime fecha = DateTime.Now;

            fecha = fecha.Date;

            DateTime fechaR = DateTime.Parse(txtBox_entrada.Text);

            bool fechaCorrecta = System.DateTime.Equals(fecha, fechaR);


            if (comboBxNombre.Text == "")
            {
                //Condicion
                MessageBox.Show("Necesita seleccionar un nombre.");
            }
            else
            {
                if (fechaCorrecta && txtBox_habitacion.Text != "")
                {
                    ConexionRecepcionista.checkOut(comboBxNombre, txtBox_celular, txtBox_email, txtBox_habitacion, txtBox_entrada, txtBox_salida, 2);
                    ConexionRecepcionista.checkOut(comboBxNombre, txtBox_celular, txtBox_email, txtBox_habitacion, txtBox_entrada, txtBox_salida, 3);
                    MessageBox.Show("Salida de cliente confirmada, habitación liberada.");
                }
                else
                {
                    if (txtBox_habitacion.Text == "")
                    {
                        MessageBox.Show("Debe seleccionar un cliente y dar clic en Revisar Información.");
                    }

                    else
                    {
                        MessageBox.Show("Fecha de Check-Out incorrecta");
                    }
                }
            }
        }
コード例 #10
0
ファイル: CheckOt.cs プロジェクト: Wicho-SM/HotelBell
 private void btn_revisar_Click(object sender, EventArgs e)
 {
     ConexionRecepcionista.checkOut(comboBxNombre, txtBox_celular, txtBox_email, txtBox_habitacion, txtBox_entrada, txtBox_salida, 1);
 }
コード例 #11
0
ファイル: CheckOt.cs プロジェクト: Wicho-SM/HotelBell
 private void CheckOt_Load(object sender, EventArgs e)
 {
     ConexionRecepcionista.checkOut(comboBxNombre, txtBox_celular, txtBox_email, txtBox_habitacion, txtBox_entrada, txtBox_salida, 0);
 }
コード例 #12
0
ファイル: CheckIn.cs プロジェクト: Wicho-SM/HotelBell
 private void CheckIn_Load(object sender, EventArgs e)
 {
     //Traer nombre
     ConexionRecepcionista.checkIn(comboBxNombre, txtBox_celular, txtBox_email, txtBox_habitacion, 0, txtBoxF);
 }