Exemple #1
0
        private void btnNuevo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            AccionBotonAplastado = "N";
            this.txtCodigo.Properties.ReadOnly      = true;
            this.txtDescripcion.Properties.ReadOnly = false;
            this.ckbActivo.Properties.ReadOnly      = false;

            this.Limpiar();

            clsDatosUnidadTiempo objDatosUnidadTiempo = new clsDatosUnidadTiempo();

            this.txtCodigo.Text = Convert.ToString(objDatosUnidadTiempo.getIdSiguiente());
        }
Exemple #2
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            AccionBotonAplastado = "B";
            clsMensaje objMensaje = new clsMensaje();

            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();
        }
Exemple #3
0
        private void btnGrabar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            clsDatosUnidadTiempo objDatosUnidadTiempo = new clsDatosUnidadTiempo();
            clsMensaje           objMensaje           = new clsMensaje();

            if (this.Get())
            {
                if (AccionBotonAplastado == "N")
                {
                    this.Get();
                    if (objDatosUnidadTiempo.guardar(objUnidadTiempo))
                    {
                        string variable = objMensaje.Titulo;
                        MessageBox.Show(objMensaje.Guardar_ok, objMensaje.Titulo, MessageBoxButtons.OK);
                    }
                    else
                    {
                        MessageBox.Show(objMensaje.Guardar_error, objMensaje.Titulo, MessageBoxButtons.OK);
                    }
                }
                else if (AccionBotonAplastado == "M")
                {
                    this.Get();
                    if (objDatosUnidadTiempo.modificar(objUnidadTiempo))
                    {
                        string variable = objMensaje.Titulo;
                        MessageBox.Show(objMensaje.Modificar_ok, objMensaje.Titulo, MessageBoxButtons.OK);
                    }
                    else
                    {
                        MessageBox.Show(objMensaje.Modificar_error, objMensaje.Titulo, MessageBoxButtons.OK);
                    }
                }
            }

            this.Limpiar();
            this.Inactivar();
            AccionBotonAplastado = "G";
        }
Exemple #4
0
        private void btnEliminar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            clsDatosUnidadTiempo objDatosUnidadTiempo = new clsDatosUnidadTiempo();
            clsMensajeCCobrar    objMensaje           = new clsMensajeCCobrar();

            this.Get();

            if (AccionBotonAplastado == "B")
            {
                if (objDatosUnidadTiempo.eliminar(objUnidadTiempo))
                {
                    string variable = objMensaje.Titulo;
                    MessageBox.Show(objMensaje.Eliminar_ok, objMensaje.Titulo, MessageBoxButtons.OK);
                }
                else
                {
                    MessageBox.Show(objMensaje.Eliminar_error, objMensaje.Titulo, MessageBoxButtons.OK);
                }
            }
            this.Limpiar();
            this.Inactivar();
            AccionBotonAplastado = "E";
        }
Exemple #5
0
        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());
        }
Exemple #6
0
        private void btnBuscarInversion_Click(object sender, EventArgs e)
        {
            AccionBotonAplastado = "B";
            clsMensaje            objMensaje            = new clsMensaje();
            clsDatosTipoInversion objDatosTipoInversion = new clsDatosTipoInversion();
            clsDatosUnidadTiempo  objUnidadTiempo       = new clsDatosUnidadTiempo();
            clsDatosBanco         objDatosBanco         = new clsDatosBanco();
            clsDatosPersonaCXC    objDatosPersona       = new clsDatosPersonaCXC();
            clsDatosInversion     objDatosInversion     = new clsDatosInversion();

            String[] NombresColumnas = new String[16];
            NombresColumnas[0]  = "ID Empresa";
            NombresColumnas[1]  = "ID Usuario";
            NombresColumnas[2]  = "ID Inversion";
            NombresColumnas[3]  = "ID Entidad";
            NombresColumnas[4]  = "ID Tipo Inversion";
            NombresColumnas[5]  = "Tiempo";
            NombresColumnas[6]  = "ID Unidad Tiempo";
            NombresColumnas[7]  = "ID Banco";
            NombresColumnas[8]  = "Valor";
            NombresColumnas[9]  = "Porcentaje";
            NombresColumnas[10] = "Ganancia";
            NombresColumnas[11] = "Fecha Inversion";
            NombresColumnas[12] = "Fecha Modificacion";
            NombresColumnas[13] = "Fecha Inicio";
            NombresColumnas[14] = "Fecha Fin";
            NombresColumnas[15] = "Estado";

            List <object> lista = new List <object>(objDatosInversion.consultaInversionGeneral());;

            if (lista.Count > 0)
            {
                frm_Busqueda FormularioBusqueda = new frm_Busqueda();
                FormularioBusqueda.CargarBanco(lista);
                FormularioBusqueda.EstablecerPropiedades("Total Inversiones", NombresColumnas);
                FormularioBusqueda.OcultarColumna(12);
                FormularioBusqueda.ShowDialog();

                if (FormularioBusqueda.Seleccion)
                {
                    DataGridViewRow Fila = FormularioBusqueda.FilaSeleccionada;
                    objInversion.idInversion = Convert.ToInt32(Fila.Cells[2].Value);
                    objDatosInversion.ConsultaInversionEspecifica(objInversion);
                    MessageBox.Show(Convert.ToString(objInversion.idTipoInversion));
                    objTipoInversion.idTipoInversion = objInversion.idTipoInversion;

                    MessageBox.Show(Convert.ToString(objTipoInversion.idTipoInversion));
                    objDatosTipoInversion.consultaTipoInversionEspecifica(objTipoInversion);
                    MessageBox.Show(Convert.ToString(objTipoInversion.Descripcion));
                    this.Set();

                    /*
                     *
                     * objPersona.IdPersona = objCuentaBancaria.idTitular;
                     * objDatosPersona.ConsultaEspecificaPersona(objPersona);
                     * this.Set();*/
                }
            }
            else
            {
                MessageBox.Show(objMensaje.Vacio, objMensaje.Titulo, MessageBoxButtons.OK);
            }
            this.Inactivar();
        }