private void btnBuscar_Click(object sender, EventArgs e)
        {
            AccionBotonAplastado = "B";
            clsMensajeCCobrar objMensaje = new clsMensajeCCobrar();

            clsDatosUnidadTiempo objDatosUnidadTiempo = new clsDatosUnidadTiempo();
            String[] NombresColumnas = new String[4];
            NombresColumnas[0] = "ID Empresa";
            NombresColumnas[1] = "Codigo";
            NombresColumnas[2] = "Descripcion";
            NombresColumnas[3] = "Estado";

            List<object> lista = new List<object>(objDatosUnidadTiempo.consultaUnidadTiempoGeneral()); ;
            if (lista.Count > 0)
            {
                frm_Busqueda FormularioBusqueda = new frm_Busqueda();
                FormularioBusqueda.CargarBanco(lista);
                FormularioBusqueda.EstablecerPropiedades("Busqueda de Unidad de Tiempo", NombresColumnas);
                FormularioBusqueda.OcultarColumna(0);
                FormularioBusqueda.ShowDialog();

                if (FormularioBusqueda.Seleccion)
                {
                    DataGridViewRow Fila = FormularioBusqueda.FilaSeleccionada;
                    objUnidadTiempo.idEmpresa = Convert.ToInt32(Fila.Cells[0].Value);
                    objUnidadTiempo.idUnidadTiempo = Convert.ToInt32(Fila.Cells[1].Value);
                    objUnidadTiempo.Descripcion = Convert.ToString(Fila.Cells[2].Value);
                    objUnidadTiempo.Estado = Convert.ToString(Fila.Cells[3].Value);
                    this.Set();
                }
            }
            else
            {
                MessageBox.Show(objMensaje.Vacio, objMensaje.Titulo, MessageBoxButtons.OK);
            }

            this.Inactivar();
        }
        private void btnNuevo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            AccionBotonAplastado = "N";
            this.txtNumeroInversion.Properties.ReadOnly = true;
            this.txtCodigoPersona.Properties.ReadOnly = true;
            this.txtNombrePersona.Properties.ReadOnly = true;
            this.gueTipoInversion.Enabled = true;
            this.txtTiempo.Properties.ReadOnly = false;
            this.gueUnidadTiempo.Enabled = true;
            this.gueBanco.Enabled = true;
            this.txtValor.Properties.ReadOnly = false;
            this.txtPorcentaje.Properties.ReadOnly = false;
            this.txtGanancia.Properties.ReadOnly = true;
            this.deFechaActual.Enabled = true;
            this.deFechaDesde.Enabled = true;
            this.deFechaHasta.Enabled = true;
            this.ckbActivo.Properties.ReadOnly = false;
            btnBuscaPersona.Enabled = true;

            clsDatosBanco banco = new clsDatosBanco();
            this.gueBanco.Properties.DataSource = banco.consultaBancoGeneral();

            clsDatosTipoInversion tipoInversion = new clsDatosTipoInversion();
            this.gueTipoInversion.Properties.DataSource = tipoInversion.consultaTipoInversionGeneral();

            clsDatosUnidadTiempo unidadTiempo = new clsDatosUnidadTiempo();
            this.gueUnidadTiempo.Properties.DataSource = unidadTiempo.consultaUnidadTiempoGeneral();

            this.Limpiar();
            clsDatosInversion objDatosInversion = new clsDatosInversion();
            this.txtNumeroInversion.Text = Convert.ToString(objDatosInversion.getIdSiguiente());
        }