Beispiel #1
0
        public UI_Estado_Cuenta(DevExpress.XtraBars.BarButtonItem opcionMenu, DevExpress.XtraBars.BarHeaderItem headerMenu, object objetoExtra)
        {
            WaitForm1 WaitForm1 = new WaitForm1();

            DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(WaitForm1, typeof(WaitForm1), false, false, false);
            DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption("Estado de Cuentas...");
            DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormDescription("Espere un momento por favor... Cargando y Validando Datos...   .");
            //
            InitializeComponent();
            this.SetStyle(ControlStyles.ResizeRedraw, true);
            //
            OpcionMenu  = opcionMenu;
            HeaderMenu  = headerMenu;
            ObjetoExtra = objetoExtra;
            lHeader_ant = HeaderMenu.Caption;
            //
            CriteriaOperator filtro_status = (new OperandProperty("status") == new OperandValue(1));

            DevExpress.Xpo.SortingCollection orden_formas_pagos = new DevExpress.Xpo.SortingCollection(new DevExpress.Xpo.SortProperty("tpago", DevExpress.Xpo.DB.SortingDirection.Ascending));
            orden_formas_pagos.Add(new DevExpress.Xpo.SortProperty("codigo", DevExpress.Xpo.DB.SortingDirection.Ascending));
            DevExpress.Xpo.SortingCollection orden_saldos_recauda_dep = new DevExpress.Xpo.SortingCollection(new DevExpress.Xpo.SortProperty("recaudador.usuario", DevExpress.Xpo.DB.SortingDirection.Ascending));
            orden_saldos_recauda_dep.Add(new DevExpress.Xpo.SortProperty("fecha_string", DevExpress.Xpo.DB.SortingDirection.Ascending));
            orden_saldos_recauda_dep.Add(new DevExpress.Xpo.SortProperty("forma_pago.tpago", DevExpress.Xpo.DB.SortingDirection.Ascending));
            orden_saldos_recauda_dep.Add(new DevExpress.Xpo.SortProperty("forma_pago.codigo", DevExpress.Xpo.DB.SortingDirection.Ascending));
            //
            saldos_recauda_dep = new DevExpress.Xpo.XPCollection <Fundraising_PTDM.FUNDRAISING_PT.Saldos_Recauda_dep>(DevExpress.Xpo.XpoDefault.Session);
            formas_pagos       = new DevExpress.Xpo.XPCollection <Fundraising_PTDM.FUNDRAISING_PT.Formas_Pagos>(DevExpress.Xpo.XpoDefault.Session, filtro_status, new DevExpress.Xpo.SortProperty("tpago", DevExpress.Xpo.DB.SortingDirection.Ascending));
            usuarios           = new DevExpress.Xpo.XPCollection <Fundraising_PTDM.FUNDRAISING_PT.Usuarios>(DevExpress.Xpo.XpoDefault.Session, filtro_status, new DevExpress.Xpo.SortProperty("usuario", DevExpress.Xpo.DB.SortingDirection.Ascending));
            //
            bindingSource_formas_pagos.DataSource = formas_pagos;
            bindingSource_usuarios.DataSource     = usuarios;
            formas_pagos.Sorting       = orden_formas_pagos;
            saldos_recauda_dep.Sorting = orden_saldos_recauda_dep;
        }
        public UI_Denominacion_Monedas(DevExpress.XtraBars.BarButtonItem opcionMenu, ref DevExpress.XtraBars.BarHeaderItem headerMenu, object objetoExtra, object objetoExtra1, object objetoExtra2, object objetoExtra3, object objetoExtra4)
            : base(opcionMenu, ref headerMenu, objetoExtra, objetoExtra1, objetoExtra2, objetoExtra3, objetoExtra4)
        {
            WaitForm1 WaitForm1 = new WaitForm1();

            DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(WaitForm1, typeof(WaitForm1), false, false, false);
            DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption("Denominación de Monedas...");
            DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormDescription("Espere un momento por favor... Cargando y Validando Datos...   .");
            //
            this.lookUpEdit_sucursales.Properties.DataSource = Fundraising_PT.Clases.Setting_Sucursales.data_sucursales();
            InitializeComponent();
            //
            Denominacion_Monedas = new DevExpress.Xpo.XPCollection <Fundraising_PTDM.FUNDRAISING_PT.Denominacion_Monedas>(DevExpress.Xpo.XpoDefault.Session, true);
            //
            DevExpress.Xpo.SortingCollection orden_denominacion_monedas = new DevExpress.Xpo.SortingCollection(new DevExpress.Xpo.SortProperty("tipo", DevExpress.Xpo.DB.SortingDirection.Ascending));
            orden_denominacion_monedas.Add(new DevExpress.Xpo.SortProperty("valor", DevExpress.Xpo.DB.SortingDirection.Descending));
            Denominacion_Monedas.Sorting = orden_denominacion_monedas;
            //
            bindingSource1.DataSource = Denominacion_Monedas;
            //
        }
        public UI_Report_Estado_Cuenta(DevExpress.XtraBars.BarButtonItem opcionMenu, DevExpress.XtraBars.BarHeaderItem headerMenu, object objetoExtra)
        {
            WaitForm1 WaitForm1 = new WaitForm1();

            DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(WaitForm1, typeof(WaitForm1), false, false, false);
            DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption("Reporte del Estado de Cuenta (Recaudado-Dépositado)...");
            //
            InitializeComponent();
            this.SetStyle(ControlStyles.ResizeRedraw, true);
            //
            OpcionMenu  = opcionMenu;
            HeaderMenu  = headerMenu;
            ObjetoExtra = objetoExtra;
            lHeader_ant = HeaderMenu.Caption;
            //
            CriteriaOperator filtro_status             = (new OperandProperty("status") == new OperandValue(1));
            CriteriaOperator filtro_saldos_recauda_dep = CriteriaOperator.Parse("1 = 2");

            DevExpress.Xpo.SortingCollection orden_formas_pagos = new DevExpress.Xpo.SortingCollection(new DevExpress.Xpo.SortProperty("tpago", DevExpress.Xpo.DB.SortingDirection.Ascending));
            orden_formas_pagos.Add(new DevExpress.Xpo.SortProperty("codigo", DevExpress.Xpo.DB.SortingDirection.Ascending));
            DevExpress.Xpo.SortingCollection orden_saldos_recauda_dep = new DevExpress.Xpo.SortingCollection(new DevExpress.Xpo.SortProperty("forma_pago.tpago", DevExpress.Xpo.DB.SortingDirection.Ascending));
            orden_saldos_recauda_dep.Add(new DevExpress.Xpo.SortProperty("recaudador.usuario", DevExpress.Xpo.DB.SortingDirection.Ascending));
            orden_saldos_recauda_dep.Add(new DevExpress.Xpo.SortProperty("forma_pago.codigo", DevExpress.Xpo.DB.SortingDirection.Ascending));
            orden_saldos_recauda_dep.Add(new DevExpress.Xpo.SortProperty("Substring(fecha_string,6,4)+Substring(fecha_string,3,2)+Substring(fecha_string,0,2)", DevExpress.Xpo.DB.SortingDirection.Ascending));
            //orden_saldos_recauda_dep.Add(new DevExpress.Xpo.SortProperty("fecha_string", DevExpress.Xpo.DB.SortingDirection.Ascending));
            //
            sucursales                 = new DevExpress.Xpo.XPCollection <Fundraising_PTDM.FUNDRAISING_PT.Sucursales>(DevExpress.Xpo.XpoDefault.Session, filtro_status, new DevExpress.Xpo.SortProperty("codigo", DevExpress.Xpo.DB.SortingDirection.Ascending));
            saldos_recauda_dep         = new DevExpress.Xpo.XPCollection <Fundraising_PTDM.FUNDRAISING_PT.Saldos_Recauda_dep>(DevExpress.Xpo.XpoDefault.Session, filtro_saldos_recauda_dep, new DevExpress.Xpo.SortProperty("forma_pago.tpago", DevExpress.Xpo.DB.SortingDirection.Ascending));
            saldos_recauda_dep.Sorting = orden_saldos_recauda_dep;
            formas_pagos               = new DevExpress.Xpo.XPCollection <Fundraising_PTDM.FUNDRAISING_PT.Formas_Pagos>(DevExpress.Xpo.XpoDefault.Session, filtro_status, new DevExpress.Xpo.SortProperty("tpago", DevExpress.Xpo.DB.SortingDirection.Ascending));
            formas_pagos.Sorting       = orden_formas_pagos;
            usuarios = new DevExpress.Xpo.XPCollection <Fundraising_PTDM.FUNDRAISING_PT.Usuarios>(DevExpress.Xpo.XpoDefault.Session, filtro_status, new DevExpress.Xpo.SortProperty("usuario", DevExpress.Xpo.DB.SortingDirection.Ascending));
            //
            bindingSource_sucursales.DataSource   = sucursales;
            bindingSource_recaudadores.DataSource = usuarios;
            bindingSource_formas_pagos.DataSource = formas_pagos;
        }
        public UI_Report_Recauda(DevExpress.XtraBars.BarButtonItem opcionMenu, DevExpress.XtraBars.BarHeaderItem headerMenu, object objetoExtra)
        {
            WaitForm1 WaitForm1 = new WaitForm1();

            DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(WaitForm1, typeof(WaitForm1), false, false, false);

            switch ((int)objetoExtra)
            {
            case 1:
                DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption("Reporte de Recaudaciones...");
                break;

            case 2:
                DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption("Reporte de Totales de Ventas...");
                break;

            case 3:
                DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption("Reporte de Diferencias (Ventas-Recaudaciones)...");
                break;

            default:
                DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption("Reporte de Recaudaciones...");
                break;
            }
            //
            InitializeComponent();
            this.SetStyle(ControlStyles.ResizeRedraw, true);
            //
            OpcionMenu  = opcionMenu;
            HeaderMenu  = headerMenu;
            ObjetoExtra = objetoExtra;
            lHeader_ant = HeaderMenu.Caption;
            if (objetoExtra != null)
            {
                lntipo_reporte = (int)objetoExtra;
            }
            //
            orden_fecha_ascendente_recaudaciones.Add(new DevExpress.Xpo.SortProperty("sucursal", DevExpress.Xpo.DB.SortingDirection.Ascending));
            orden_fecha_descendente_recaudaciones.Add(new DevExpress.Xpo.SortProperty("sucursal", DevExpress.Xpo.DB.SortingDirection.Ascending));
            //
            CriteriaOperator filtro_status        = (new OperandProperty("status") == new OperandValue(1));
            CriteriaOperator filtro_recaudaciones = CriteriaOperator.Parse("1 = 2");

            DevExpress.Xpo.SortingCollection orden_formas_pagos = new DevExpress.Xpo.SortingCollection(new DevExpress.Xpo.SortProperty("tpago", DevExpress.Xpo.DB.SortingDirection.Ascending));
            orden_formas_pagos.Add(new DevExpress.Xpo.SortProperty("codigo", DevExpress.Xpo.DB.SortingDirection.Ascending));
            DevExpress.Xpo.SortProperty orden_recaudaciones = (new DevExpress.Xpo.SortProperty("fecha_hora", DevExpress.Xpo.DB.SortingDirection.Ascending));
            //
            sucursales           = new DevExpress.Xpo.XPCollection <Fundraising_PTDM.FUNDRAISING_PT.Sucursales>(DevExpress.Xpo.XpoDefault.Session, filtro_status, new DevExpress.Xpo.SortProperty("codigo", DevExpress.Xpo.DB.SortingDirection.Ascending));
            recaudaciones        = new DevExpress.Xpo.XPCollection <Fundraising_PTDM.FUNDRAISING_PT.Recaudaciones>(DevExpress.Xpo.XpoDefault.Session, filtro_recaudaciones, orden_recaudaciones);
            formas_pagos         = new DevExpress.Xpo.XPCollection <Fundraising_PTDM.FUNDRAISING_PT.Formas_Pagos>(DevExpress.Xpo.XpoDefault.Session, filtro_status, new DevExpress.Xpo.SortProperty("tpago", DevExpress.Xpo.DB.SortingDirection.Ascending));
            formas_pagos.Sorting = orden_formas_pagos;
            usuarios             = new DevExpress.Xpo.XPCollection <Fundraising_PTDM.FUNDRAISING_PT.Usuarios>(DevExpress.Xpo.XpoDefault.Session, filtro_status, new DevExpress.Xpo.SortProperty("usuario", DevExpress.Xpo.DB.SortingDirection.Ascending));
            cajas   = new DevExpress.Xpo.XPCollection <Fundraising_PTDM.FUNDRAISING_PT.Cajas>(DevExpress.Xpo.XpoDefault.Session, filtro_status, new DevExpress.Xpo.SortProperty("codigo", DevExpress.Xpo.DB.SortingDirection.Ascending));
            cajeros = new DevExpress.Xpo.XPCollection <Fundraising_PTDM.FUNDRAISING_PT.Cajeros>(DevExpress.Xpo.XpoDefault.Session, filtro_status, new DevExpress.Xpo.SortProperty("cajero", DevExpress.Xpo.DB.SortingDirection.Ascending));
            //
            bindingSource_sucursales.DataSource   = sucursales;
            bindingSource_recaudadores.DataSource = usuarios;
            bindingSource_supersisores.DataSource = usuarios;
            bindingSource_cajas.DataSource        = cajas;
            bindingSource_cajeros.DataSource      = cajeros;
            bindingSource_formas_pagos.DataSource = formas_pagos;
        }
Beispiel #5
0
        public UI_Depositos_Bancarios_Det(object form_padre, int lntpago)
        {
            WaitForm1 WaitForm1 = new WaitForm1();

            DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(WaitForm1, typeof(WaitForm1), false, false, false);
            DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption("Saldos Pendientes para Depósitar...");
            DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormDescription("Espere un momento por favor... Cargando y Validando Datos...   .");
            //
            // asignacion de valores a objetos publicos //
            Form_padre = form_padre;
            //totales_deposito_aux = ((Fundraising_PT.Formularios.UI_Depositos_Bancarios)Form_padre).totales_deposito;
            //Totales_deposito = totales_deposito;
            lg_deposito_bancario = ((Fundraising_PTDM.FUNDRAISING_PT.Depositos_Bancarios)((Fundraising_PT.Formularios.UI_Depositos_Bancarios)form_padre).bindingSource1.Current).oid;
            ln_status_deposito   = ((Fundraising_PTDM.FUNDRAISING_PT.Depositos_Bancarios)((Fundraising_PT.Formularios.UI_Depositos_Bancarios)form_padre).bindingSource1.Current).status;
            ln_sucursal_dep_det  = ((Fundraising_PTDM.FUNDRAISING_PT.Depositos_Bancarios)((Fundraising_PT.Formularios.UI_Depositos_Bancarios)form_padre).bindingSource1.Current).sucursal;
            obj_headerMenu_ant   = ((Fundraising_PT.Formularios.UI_Depositos_Bancarios)form_padre).HeaderMenu;
            lHeader_ant          = ((Fundraising_PT.Formularios.UI_Depositos_Bancarios)form_padre).HeaderMenu.Caption;
            lAccion  = "Detalle del depósito por forma de pago";
            ln_modo  = (((Fundraising_PT.Formularios.UI_Depositos_Bancarios)form_padre).lAccion == "Insertar" ? 1 : ((Fundraising_PT.Formularios.UI_Depositos_Bancarios)form_padre).lAccion == "Editar" ? 2 : 0);
            ln_tpago = lntpago;
            //
            InitializeComponent();
            this.SetStyle(ControlStyles.ResizeRedraw, true);
            //
            // llena los datos de la coleccion de las formas de pago y usuarios //
            CriteriaOperator filtro_status = (new OperandProperty("status") == new OperandValue(1));

            DevExpress.Xpo.SortProperty orden_formas_pagos = (new DevExpress.Xpo.SortProperty("codigo", DevExpress.Xpo.DB.SortingDirection.Ascending));
            DevExpress.Xpo.SortProperty orden_usuarios     = (new DevExpress.Xpo.SortProperty("usuario", DevExpress.Xpo.DB.SortingDirection.Ascending));
            //
            formas_pagos = new DevExpress.Xpo.XPCollection <Fundraising_PTDM.FUNDRAISING_PT.Formas_Pagos>(DevExpress.Xpo.XpoDefault.Session, filtro_status, orden_formas_pagos);

            // se crean las columnas al datatable de saldos ///
            saldos_formas_pagos.Columns.Add("oid_forma_pago", typeof(Guid));
            saldos_formas_pagos.Columns.Add("oid_recaudador", typeof(Guid));
            saldos_formas_pagos.Columns.Add("cod_forma_pago", typeof(string));
            saldos_formas_pagos.Columns.Add("recaudador", typeof(string));
            saldos_formas_pagos.Columns.Add("forma_pago", typeof(string));
            saldos_formas_pagos.Columns.Add("monto_precargado", typeof(decimal));
            saldos_formas_pagos.Columns.Add("monto", typeof(decimal));
            saldos_formas_pagos.Columns.Add("saldo", typeof(decimal));
            saldos_formas_pagos.PrimaryKey = new DataColumn[] { saldos_formas_pagos.Columns["oid_forma_pago"], saldos_formas_pagos.Columns["oid_recaudador"] };

            // se crean las columnas a la vista que llenara los datos del datatable de saldos ///
            vsaldos_formas_pagos = new XPView(XpoDefault.Session, typeof(Fundraising_PTDM.FUNDRAISING_PT.Saldos_Recauda_dep));
            vsaldos_formas_pagos.AddProperty("oid_forma_pago", "forma_pago.oid", true, true, DevExpress.Xpo.SortDirection.None);
            vsaldos_formas_pagos.AddProperty("oid_recaudador", "recaudador.oid", true, true, DevExpress.Xpo.SortDirection.None);
            vsaldos_formas_pagos.AddProperty("cod_forma_pago", "forma_pago.codigo", true, true, DevExpress.Xpo.SortDirection.Ascending);
            vsaldos_formas_pagos.AddProperty("recaudador", "recaudador.usuario", true, true, DevExpress.Xpo.SortDirection.Ascending);
            vsaldos_formas_pagos.AddProperty("forma_pago", "forma_pago.nombre", true, true, DevExpress.Xpo.SortDirection.None);
            vsaldos_formas_pagos.AddProperty("recaudado", "Sum(recaudado)", false, true, DevExpress.Xpo.SortDirection.None);
            vsaldos_formas_pagos.AddProperty("depositado", "Sum(depositado)", false, true, DevExpress.Xpo.SortDirection.None);
            vsaldos_formas_pagos.AddProperty("saldo", "Sum(recaudado-depositado)", false, true, DevExpress.Xpo.SortDirection.None);

            // llena los datos de la coleccion del detalle del deposito //
            filtro_deposito_bancario_det = (new OperandProperty("deposito_bancario.oid") == new OperandValue(lg_deposito_bancario) & new OperandProperty("forma_pago.tpago") == new OperandValue(ln_tpago));
            DevExpress.Xpo.SortProperty      orden_deposito_bancario_det  = (new DevExpress.Xpo.SortProperty("forma_pago.tpago", DevExpress.Xpo.DB.SortingDirection.Ascending));
            DevExpress.Xpo.SortingCollection orden_deposito_bancario_det1 = new DevExpress.Xpo.SortingCollection(new DevExpress.Xpo.SortProperty("forma_pago.tpago", DevExpress.Xpo.DB.SortingDirection.Ascending));
            orden_deposito_bancario_det1.Add(new DevExpress.Xpo.SortProperty("forma_pago.codigo", DevExpress.Xpo.DB.SortingDirection.Ascending));
            orden_deposito_bancario_det1.Add(new DevExpress.Xpo.SortProperty("recaudador.usuario", DevExpress.Xpo.DB.SortingDirection.Ascending));
            //
            depositos_bancarios_det         = new DevExpress.Xpo.XPCollection <Fundraising_PTDM.FUNDRAISING_PT.Depositos_Bancarios_Det>(DevExpress.Xpo.XpoDefault.Session, filtro_deposito_bancario_det, orden_deposito_bancario_det);
            depositos_bancarios_det.Sorting = orden_deposito_bancario_det1;
            //
            seteo_nivel_seguridad();
            //
            // bindeo de datos a los bindingsource principales //
            bindingSource_recaudador.DataSource = usuarios;
            bindingSource_depositos_bancarios_det.DataSource = depositos_bancarios_det;
        }