Beispiel #1
0
        public string getMax_GJ_ID(string prefijoCfg, string id_site)
        {
            AdminGJ oAdmGJ = new AdminGJ();

            ID = oAdmGJ.getMax_GJ_ID(prefijoCfg, id_site);
            return(ID);
        }
Beispiel #2
0
        public string getNext_ID(string id_site, int add_Id = 0)
        {
            AdminGJ oAdmGJ = new AdminGJ();

            ID = oAdmGJ.getNext_GJ_ID(id_site, add_Id);
            return(ID);
        }
Beispiel #3
0
        public void generate()
        {
            AdminCurrencyTracking oCurrencyTracking = new AdminCurrencyTracking();
            AdminGeneralJournal   oAdminGJ          = new AdminGeneralJournal();
            AdminGJ                      oAdmGJ     = new AdminGJ();
            GJ                           oGJ;
            List <GJ_CURR>               lstGJ_CURR        = new List <GJ_CURR>();
            List <GJ_DIST>               lstGJ_DIST        = new List <GJ_DIST>();
            List <GJ_LINE>               lstGJ_LINE        = new List <GJ_LINE>();
            List <VMXCONTROLPOLIZA>      lstVMXPoliza      = new List <VMXCONTROLPOLIZA>();
            List <VMX_CONTOLPOLIZA_LINE> lstVMXPoliza_line = new List <VMX_CONTOLPOLIZA_LINE>();

            try
            {
                oAdminGJ.crearConexiones();

                _lstCurrencyTracking = oCurrencyTracking.getCurrencyTracking(GJ_DATE);

                // a) GJ - General Journal
                oGJ = getGJ();
                oAdminGJ.createGJ(oGJ);

                // b) GJ_CURR - General Journal Currecncy
                lstGJ_CURR = getGJ_CURR();
                foreach (GJ_CURR oGJ_CURR in lstGJ_CURR)
                {
                    oAdminGJ.createGJ_CURR(oGJ_CURR);
                }

                // c) GJ_DIST - General Journal Distribution
                lstGJ_DIST = getListGJ_DIST();
                foreach (GJ_DIST oGJ_DIST in lstGJ_DIST)
                {
                    oAdminGJ.createGJ_DIST(oGJ_DIST);
                }

                // d) GJ_LINE - General Journal Line
                lstGJ_LINE = getListGJ_LINE();
                foreach (GJ_LINE oGJ_LINE in lstGJ_LINE)
                {
                    oAdminGJ.createGJ_LINE(oGJ_LINE);
                }

                // e) VMXCONTROLPOLIZA
                lstVMXPoliza = getListVMXCONTROLPOLIZA();
                foreach (VMXCONTROLPOLIZA oVMXPoliza in lstVMXPoliza)
                {
                    oAdminGJ.createVMXCONTROLPOLIZA(oVMXPoliza);
                }

                // f) VMX_CONTOLPOLIZA_LINE
                lstVMXPoliza_line = getListVMX_CONTOLPOLIZA_LINE_CXC_TCPago();

                foreach (VMX_CONTOLPOLIZA_LINE oVMXPoliza in lstVMXPoliza_line)
                {
                    oAdminGJ.createVMX_CONTOLPOLIZA_LINE_CXC(oVMXPoliza);
                }

                // Actualizar el nuevo número de póliza
                oAdmGJ.setNext_GJ_ID();

                oAdminGJ.commitTransaction();
            }
            catch (Exception ex)
            {
                oAdminGJ.rollBackTransaction();
                throw new Exception("Error al generar Poliza Contable. Detalle: " + ex.Message);
            }
            finally
            {
                oAdminGJ.cerrarConexiones();
            }
        }
Beispiel #4
0
        /// <summary>
        /// Obtiene el siguiente ID para poliza contable
        /// </summary>
        public PolizaContable()
        {
            AdminGJ oAdmGJ = new AdminGJ();

            _ID = oAdmGJ.getNext_GJ_ID();
        }