private void Clear()
 {
     dtpFechaLlegada.Value       = DateTime.Now;
     dtpFechaSalida.Value        = DateTime.Now;
     nupCantidadAdultos.Value    = 0;
     nupCantidadNinos.Value      = 0;
     dgvInfoHuesped.DataSource   = huesped.VistaTabla();
     dgvReservaciones.DataSource = reservacion.Select();
 }
Exemplo n.º 2
0
        public NuevaReservacion()
        {
            InitializeComponent();

            dgvHuesped.DataSource          = obj.VistaTabla();
            dgvHuesped.Columns[0].Visible  = false;
            dgvHuesped.Columns[16].Visible = false;
            dgvHuesped.Columns[17].Visible = false;

            dgvHabitaciones.DataSource          = habitacion.Select();
            dgvHabitaciones.Columns[0].Visible  = false;
            dgvHabitaciones.Columns[10].Visible = false;
            dgvHabitaciones.Columns[11].Visible = false;

            if (txtPrecioPorNoche.Text != "0" && txtTotalNoche.Text == "0")
            {
                MessageBox.Show("Por favor, seleccione las fechas de estadía.");
            }
        }
Exemplo n.º 3
0
        private void btnGuardar_Click_1(object sender, EventArgs e)
        {
            Huesped pHuesped = new Huesped();

            pHuesped.PrimerNombre    = txtPrimerNombre.Text.Trim();
            pHuesped.SegundoNombre   = txtSegundoNombre.Text.Trim();
            pHuesped.PrimerApellido  = txtPrimerApellido.Text.Trim();
            pHuesped.SegundoApellido = txtSegundoApellido.Text.Trim();
            pHuesped.Compania        = Compania.Trim();
            pHuesped.NombreCompania  = txtNombreCompania.Text.Trim();
            pHuesped.TipoDocumento   = cbxTipoIdentificacion.Text.Trim();
            pHuesped.NumDocumento    = txtIdentificacion.Text.Trim();
            pHuesped.Sexo            = Sexo.Trim();
            pHuesped.Telefono        = txtTelefono.Text.Trim();
            pHuesped.Direccion       = txtDireccion.Text.Trim();
            pHuesped.Ciudad          = txtCiudad.Text.Trim();
            pHuesped.Provincia       = txtProvincia.Text.Trim();
            pHuesped.Pais            = txtPaisNatal.Text.Trim();
            pHuesped.Correo          = txtCorreo.Text.Trim();

            int resultado = HuespedD.Agregar(pHuesped);

            if (resultado > 0)
            {
                MessageBox.Show("Huesped guardado con exito!!", "Guardado", MessageBoxButtons.OK, MessageBoxIcon.Information);
                dgvHuespedes.DataSource = null;
                dgvHuespedes.DataSource = obj.VistaTabla();
                Huesped limpiar = new Huesped();
                limpiar.BorrarCampos(this, groupBox1);
                //cbxTipoIdentificacion.Items.Clear();
                //cbxTipoIdentificacion.SelectedIndex = 0;
                rbtnSexoFemenino.Checked  = false;
                rbtnSexoMasculino.Checked = false;
                rbtnEsCompania.Checked    = false;
                rbtnNoCompania.Checked    = false;
            }
            else
            {
                MessageBox.Show("No se pudo guardar el huesped", "Fallo!!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Exemplo n.º 4
0
 private void Clear()
 {
     dgvInfoHuesped.DataSource   = huesped.VistaTabla();
     dgvReservaciones.DataSource = reservacion.Select();
 }
Exemplo n.º 5
0
 private void ListaClientes_Load(object sender, EventArgs e)
 {
     dgvHuespedess.DataSource = obj.VistaTabla();
 }
 public void RefreshGrid()
 {
     dgvClientes.DataSource = null;
     dgvClientes.DataSource = obj.VistaTabla();
 }
Exemplo n.º 7
0
 private void BuscarCliente_Load(object sender, EventArgs e)
 {
     dgvBuscarCliente.DataSource         = obj.VistaTabla();
     dgvBuscarCliente.Columns[0].Visible = false;
 }