Exemple #1
0
        private void CargarDatos()
        {
            IBLLHabitacion _IBLLHabitacion = new BLLHabitacion();

            //IBLLBodega _BLLBodega = new BLLBodega();
            //List<Bodega> lista = null;

            // Cambiar el estado
            this.CambiarEstado(EstadoMantenimiento.Ninguno);

            // Configuracion del DataGridView para que se vea bien la imagen.
            dgvDatos.AutoGenerateColumns = false;
            dgvDatos.RowTemplate.Height  = 100;
            dgvDatos.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;


            this.pbImagen.Enabled = false;

            // Cargar el DataGridView
            this.dgvDatos.DataSource = _IBLLHabitacion.GetAllHabitacion();


            // Colocar el primero como default



            this.pbImagen.SizeMode = PictureBoxSizeMode.CenterImage;
        }
Exemple #2
0
        private void toolStripBtnBuscar_Click(object sender, EventArgs e)
        {
            IBLLHabitacion _BLLHabitacion = new BLLHabitacion();
            double         filtro         = 0;

            try
            {
                //filtro = Double.Parse(this.txtFiltro.Text);

                this.dgvDatos.AutoGenerateColumns = false;
                this.dgvDatos.DataSource          = _BLLHabitacion.GetAllHabitacion();
            }
            catch (Exception er)
            {
                StringBuilder msg = new StringBuilder();
                msg.AppendFormat("Message        {0}\n", er.Message);
                msg.AppendFormat("Source         {0}\n", er.Source);
                msg.AppendFormat("InnerException {0}\n", er.InnerException);
                msg.AppendFormat("StackTrace     {0}\n", er.StackTrace);
                msg.AppendFormat("TargetSite     {0}\n", er.TargetSite);
                _MyLogControlEventos.ErrorFormat("Error {0}", msg.ToString());
                MessageBox.Show(msg.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }