private void buscarChequeres(List <ChequerasModel> objetos)
        {
            string[][] orden = new string[4][];

            orden[0] = new string[] { "Numero", "Numero de chequera", "100" };
            orden[1] = new string[] { "FechaRegistro", "Fecha Registro", "150" };
            orden[2] = new string[] { "Cantidad_cheques", "Cantidad de cheques", "150" };
            orden[3] = new string[] { "Estado", "Estado Chequera", "150" };

            if (objetos != null)
            {
                using (Ayuda.FormHelp2 formHelp1 = new Ayuda.FormHelp2())
                {
                    formHelp1.setList(objetos, orden);
                    formHelp1.ShowDialog();

                    if (formHelp1.EstaAceptado())
                    {
                        var dato = formHelp1.getObject <ChequerasModel>();
                        if (dato != null)
                        {
                            this.clearForm();
                            this.gChequera = this.BLChequeras.GetChequerasModel(dato.Numero);
                            this.chequera2gui(this.gChequera);
                            this.modoNuevo();
                            this.modoEdicion();
                        }
                    }
                }
            }
        }
Example #2
0
        private void buscarTarjetas(List <TarjetaModel> objetos)
        {
            string[][] orden = new string[3][];

            orden[0] = new string[] { "Numero", "Codigo", "100" };
            orden[1] = new string[] { "Fechavencimiento", "Fecha Vencimiento", "150" };
            orden[2] = new string[] { "Id_cuenta", "Cuenta Vinculada", "150" };

            if (objetos != null)
            {
                using (Ayuda.FormHelp2 formHelp1 = new Ayuda.FormHelp2())
                {
                    formHelp1.setList(objetos, orden);
                    formHelp1.ShowDialog();

                    if (formHelp1.EstaAceptado())
                    {
                        var dato = formHelp1.getObject <TarjetaModel>();
                        if (dato != null)
                        {
                            this.clearForm();
                            this.gtarjeta = this.BLTarjeta.Gettarjeta(dato.Numero);
                            this.tarjeta2gui(this.gtarjeta);
                            this.modoNuevo();
                            this.modoEdicion();
                        }
                    }
                }
            }
        }
        private void buscarCuenta(List <CuentasModel> objetos)
        {
            string[][] orden = new string[4][];

            orden[0] = new string[] { "NroCuenta", "Numero Cuenta", "150" };
            orden[1] = new string[] { "TipoCuenta", "Tipo Cuenta", "100" };
            orden[2] = new string[] { "SaldoContable", "Saldo Contable", "90" };
            orden[3] = new string[] { "SaldoDisponible", "Saldo Disponible", "90" };

            if (objetos != null)
            {
                using (Ayuda.FormHelp2 formHelp1 = new Ayuda.FormHelp2())
                {
                    formHelp1.setList(objetos, orden);
                    formHelp1.ShowDialog();

                    if (formHelp1.EstaAceptado())
                    {
                        var dato = formHelp1.getObject <CuentasModel>();
                        if (dato != null)
                        {
                            this.gCuenta = BLCuenta.Getcuenta(dato.Nrocuenta);

                            if (gCuenta == null)
                            {
                                return;
                            }
                            this.cuenta2gui(gCuenta);
                        }
                    }
                }
            }
        }
        private void buscarPrestamo(List <PrestamosModel> objetos)
        {
            string[][] orden = new string[6][];

            orden[0] = new string[] { "Id", "Codigo", "60" };
            orden[1] = new string[] { "Cuenta", "Cuenta", "180" };
            orden[2] = new string[] { "Fechaprestamo", "Fecha de Prestamo", "150" };
            orden[3] = new string[] { "Montoprestamo", "Monto", "100" };
            orden[4] = new string[] { "Plazomeses", "Meses", "80" };
            orden[5] = new string[] { "Usuario_creador", "Aprobado por", "100" };

            if (objetos != null)
            {
                using (Ayuda.FormHelp2 formHelp1 = new Ayuda.FormHelp2())
                {
                    formHelp1.setList(objetos, orden);
                    formHelp1.ShowDialog();

                    if (formHelp1.EstaAceptado())
                    {
                        var dato = formHelp1.getObject <PrestamosModel>();
                        if (dato != null)
                        {
                            this.clearForm();
                            this.gPrestamo = this.BLPrestamo.Prestamo_ObtenerUno(dato.Id);
                            this.gCuenta   = this.BLCuenta.Cuenta_ObtenerUno(dato.Cuenta);
                            this.prestamo2gui(this.gPrestamo);
                            this.modoNuevo();
                            this.modoEdicion();
                        }
                    }
                }
            }
        }
        private void buscarObjeto(List <PersonaModel> objetos)
        {
            string[][] orden = new string[3][];

            orden[0] = new string[] { "Id", "Codigo", "100" };
            orden[1] = new string[] { "Nombres", "Nombres", "200" };
            orden[2] = new string[] { "Apellidos", "Apellidos", "200" };

            if (objetos != null)
            {
                using (Ayuda.FormHelp2 formHelp1 = new Ayuda.FormHelp2())
                {
                    formHelp1.setList(objetos, orden);
                    formHelp1.ShowDialog();

                    if (formHelp1.EstaAceptado())
                    {
                        var dato = formHelp1.getObject <PersonaModel>();
                        if (dato != null)
                        {
                            this.persona2gui(dato);

                            var cuentas_anexadas = this.BLCuenta.cuentaSelectbyId_cliente(dato.Id).ToList();
                            this.buscarCuenta(cuentas_anexadas);
                        }
                    }
                }
            }
        }
Example #6
0
        private void buscarPrestamo(List <PrestamosModel> objetos)
        {
            string[][] orden = new string[6][];

            orden[0] = new string[] { "Id", "Codigo", "60" };
            orden[1] = new string[] { "Cuenta", "Cuenta", "180" };
            orden[2] = new string[] { "Fechaprestamo", "Fecha de Prestamo", "150" };
            orden[3] = new string[] { "Montoprestamo", "Monto", "100" };
            orden[4] = new string[] { "Plazomeses", "Meses", "80" };
            orden[5] = new string[] { "Usuario_creador", "Aprobado por", "100" };


            if (objetos != null)
            {
                using (Ayuda.FormHelp2 formHelp1 = new Ayuda.FormHelp2())
                {
                    formHelp1.setList(objetos, orden);
                    formHelp1.ShowDialog();

                    if (formHelp1.EstaAceptado())
                    {
                        var dato = formHelp1.getObject <PrestamosModel>();
                        if (dato != null)
                        {
                            //var datos = this.BLPrestamo.CronogramaPagosModelSelectbyIdPrestamo(dato.Id);
                            //this.cronograma2gui(datos);
                            DataTable dt = this.BLPrestamo.CronogramaPagosDataTable(dato.Id);
                            this.cronograma2gui2(dt);
                        }
                    }
                }
            }
        }
Example #7
0
        private void buscarObjeto(List <TipoMonedaModel> objetos)
        {
            string[][] orden = new string[2][];

            orden[0] = new string[] { "ID", "Codigo", "100" };
            orden[1] = new string[] { "Nombre", "Descripcion", "400" };

            if (objetos != null)
            {
                using (Ayuda.FormHelp2 formHelp1 = new Ayuda.FormHelp2())
                {
                    formHelp1.setList(objetos, orden);
                    formHelp1.ShowDialog();

                    if (formHelp1.EstaAceptado())
                    {
                        var dato = formHelp1.getObject <TipoMonedaModel>();
                        if (dato != null)
                        {
                            this.clearForm();
                            this.gMoneda = this.BLMoneda.GetTipoMonedaModel(dato.Id);
                            this.moneda2gui(this.gMoneda);
                            this.modoNuevo();
                            this.modoEdicion();
                        }
                    }
                }
            }
        }
        private void buscarCuenta(List <CuentasModel> objetos)
        {
            string[][] orden = new string[7][];

            orden[0] = new string[] { "NroCuenta", "Numero Cuenta", "130" };
            orden[1] = new string[] { "TipoCuenta", "Tipo Cuenta", "100" };
            orden[2] = new string[] { "SaldoContable", "Saldo Contable", "100" };
            orden[3] = new string[] { "SaldoDisponible", "Saldo Disponible", "80" };
            orden[4] = new string[] { "FECHA_CREACION", "Creado", "120" };
            orden[5] = new string[] { "FECHA_MODIFICACION", "Modificado", "120" };
            orden[6] = new string[] { "Estado", "Activo", "60" };

            if (objetos != null)
            {
                using (Ayuda.FormHelp2 formHelp1 = new Ayuda.FormHelp2())
                {
                    formHelp1.setList(objetos, orden);
                    formHelp1.ShowDialog();

                    if (formHelp1.EstaAceptado())
                    {
                        var dato = formHelp1.getObject <CuentasModel>();
                        if (dato != null)
                        {
                            this.clearForm();
                            this.gCuenta = this.BLCuenta.Cuenta_ObtenerUno(dato.Nrocuenta);
                            this.cuenta2gui(this.gCuenta);
                            this.modoNuevo();
                            this.modoEdicion();
                        }
                    }
                }
            }
        }
        private void buscarPersona(List <PersonaModel> objetos)
        {
            string[][] orden = new string[4][];

            orden[0] = new string[] { "Id", "Codigo", "70" };
            orden[1] = new string[] { "NroDocumento", "Documento", "150" };
            orden[2] = new string[] { "Nombres", "Nombres", "200" };
            orden[3] = new string[] { "Apellidos", "Apellidos", "250" };

            if (objetos != null)
            {
                using (Ayuda.FormHelp2 formHelp1 = new Ayuda.FormHelp2())
                {
                    formHelp1.setList(objetos, orden);
                    formHelp1.ShowDialog();

                    if (formHelp1.EstaAceptado())
                    {
                        var dato = formHelp1.getObject <PersonaModel>();
                        if (dato != null)
                        {
                            RowId = dato.Id;
                            modelToData();
                        }
                    }
                }
            }
        }
        private void buscarObjeto(List <PersonaModel> objetos)
        {
            string[][] orden = new string[4][];

            orden[0] = new string[] { "Id", "Codigo", "70" };
            orden[1] = new string[] { "NroDocumento", "Documento", "150" };
            orden[2] = new string[] { "Nombres", "Nombres", "200" };
            orden[3] = new string[] { "Apellidos", "Apellidos", "250" };

            if (objetos != null)
            {
                using (Ayuda.FormHelp2 formHelp1 = new Ayuda.FormHelp2())
                {
                    formHelp1.setList(objetos, orden);
                    formHelp1.ShowDialog();

                    if (formHelp1.EstaAceptado())
                    {
                        var dato = formHelp1.getObject <PersonaModel>();
                        if (dato != null)
                        {
                            this.clearForm();
                            this.gPerona = this.BLPersona.Persona_ObtenerUno(dato.Id);
                            this.persona2gui(this.gPerona);
                            this.modoNuevo();
                            this.modoEdicion();
                        }
                    }
                }
            }
        }
        private void buscarCuenta(List <CuentasModel> objetos)
        {
            string[][] orden = new string[7][];

            orden[0] = new string[] { "NroCuenta", "Numero Cuenta", "130" };
            orden[1] = new string[] { "TipoCuenta", "Tipo Cuenta", "100" };
            orden[2] = new string[] { "SaldoContable", "Saldo Contable", "100" };
            orden[3] = new string[] { "SaldoDisponible", "Saldo Disponible", "80" };
            orden[4] = new string[] { "FECHA_CREACION", "Creado", "120" };
            orden[5] = new string[] { "FECHA_MODIFICACION", "Modificado", "120" };
            orden[6] = new string[] { "Estado", "Activo", "60" };

            if (objetos != null)
            {
                using (Ayuda.FormHelp2 formHelp1 = new Ayuda.FormHelp2())
                {
                    formHelp1.setList(objetos, orden);
                    formHelp1.ShowDialog();

                    if (formHelp1.EstaAceptado())
                    {
                        CuentasModel dato = formHelp1.getObject <CuentasModel>();
                        if (dato != null)
                        {
                            this.clearForm();
                            this.gCuenta = this.BLCuenta.Cuenta_ObtenerUno(dato.Nrocuenta);

                            if (this.modo == "modoInicial")
                            {
                                if (this.gCuenta == null)
                                {
                                    return;
                                }

                                List <PrestamosModel> Prestamos = this.BLPrestamo.Prestamo_SelecionarPorCuenta(this.gCuenta.Nrocuenta).ToList();
                                if (Prestamos == null || Prestamos.Count == 0)
                                {
                                    MessageBox.Show("No tiene prestamos asociados a esta cuenta");
                                    return;
                                }
                                this.buscarPrestamo(Prestamos);
                            }
                            else
                            {
                                if (gCuenta.Estado == true)
                                {
                                    this.clearForm();
                                    this.cuenta2gui(this.gCuenta);
                                }
                                else
                                {
                                    MessageBox.Show("No puede usar una cuenta inactiva para esta transacción");
                                }
                            }
                        }
                    }
                }
            }
        }
        private void buscarPersona(List <PersonaModel> objetos)
        {
            string[][] orden = new string[4][];

            orden[0] = new string[] { "Id", "Codigo", "70" };
            orden[1] = new string[] { "NroDocumento", "Documento", "150" };
            orden[2] = new string[] { "Nombres", "Nombres", "200" };
            orden[3] = new string[] { "Apellidos", "Apellidos", "250" };

            if (objetos != null)
            {
                using (Ayuda.FormHelp2 formHelp1 = new Ayuda.FormHelp2())
                {
                    formHelp1.setList(objetos, orden);
                    formHelp1.ShowDialog();

                    if (formHelp1.EstaAceptado())
                    {
                        PersonaModel dato = formHelp1.getObject <PersonaModel>();
                        if (dato != null)
                        {
                            this.gPersona = this.BLPersona.Persona_ObtenerUno(dato.Id);

                            if (this.modo == "modoInicial")
                            {
                                if (gPersona == null)
                                {
                                    return;
                                }

                                List <CuentasModel> Cuentas = this.BLCuenta.Cuenta_ObtenerTodos(this.gPersona.Id).ToList();
                                if (Cuentas == null || Cuentas.Count == 0)
                                {
                                    MessageBox.Show("La persona no tiene cuentas");
                                    return;
                                }
                                this.buscarCuenta(Cuentas);
                            }
                            else
                            {
                                this.clearForm();
                                this.persona2gui(this.gPersona);
                            }
                        }
                    }
                }
            }
        }