Beispiel #1
0
        public List <Balanza> convertirTabBalanza(Int64 idEmpresa)
        {
            List <Balanza> lstBalanza = new List <Balanza>();



            List <ScSaldoConCc> lstSaldoCC = new List <ScSaldoConCc>();

            lstSaldoCC = obtenerSalContCC(idEmpresa);

            foreach (ScSaldoConCc saldoCC in lstSaldoCC)
            {
                Balanza balanza = new Balanza();
                balanza.year      = saldoCC.year;
                balanza.cta       = saldoCC.cta.ToString();
                balanza.scta      = saldoCC.scta.ToString();
                balanza.sscta     = saldoCC.sscta.ToString();
                balanza.salini    = saldoCC.salini;
                balanza.enecargos = saldoCC.enecargos;
                balanza.eneabonos = saldoCC.eneabonos;
                balanza.febabonos = saldoCC.febabonos;
                balanza.febcargos = saldoCC.febcargos;
                balanza.marabonos = saldoCC.marabonos;
                balanza.marcargos = saldoCC.marcargos;
                balanza.abrabonos = saldoCC.abrabonos;
                balanza.abrcargos = saldoCC.abrcargos;
                balanza.mayabonos = saldoCC.mayabonos;
                balanza.maycargos = saldoCC.maycargos;
                balanza.junabonos = saldoCC.junabonos;
                balanza.juncargos = saldoCC.juncargos;
                balanza.julabonos = saldoCC.julabonos;
                balanza.julcargos = saldoCC.julcargos;
                balanza.agoabonos = saldoCC.agoabonos;
                balanza.agocargos = saldoCC.agocargos;
                balanza.sepabonos = saldoCC.sepabonos;
                balanza.sepcargos = saldoCC.sepcargos;
                balanza.octabonos = saldoCC.octabonos;
                balanza.octcargos = saldoCC.octcargos;
                balanza.novabonos = saldoCC.novabonos;
                balanza.novcargos = saldoCC.novcargos;
                balanza.dicabonos = saldoCC.dicabonos;
                balanza.diccargos = saldoCC.diccargos;
                //balanza.TEXT_DESCRIPCION = "";
                //balanza.TEXT_DESCRIPCION2 = "";
                balanza.cierre_abonos = saldoCC.cierreabonos;
                balanza.cierre_cargos = saldoCC.cierrecargos;
                balanza.acta          = saldoCC.acta;
                balanza.cc            = saldoCC.cc;


                lstBalanza.Add(balanza);
            }


            return(lstBalanza);
        }
Beispiel #2
0
        public List <Balanza> lstBalanzaETL(int id_compania)
        {
            List <Balanza> lstBalanza = new List <Balanza>();
            DataTable      dt         = new DataTable();

            dt = cadena_conexion_extrac(id_compania);
            foreach (DataRow r in dt.Rows)
            {
                Balanza balanza = new Balanza();
                balanza.id           = Convert.ToInt32(r["INT_IDBALANZA"]);
                balanza.cta          = r["VARCHAR_CTA"].ToString();
                balanza.scta         = r["VARCHAR_SCTA"].ToString();
                balanza.sscta        = r["VARCHAR_SSCTA"].ToString();
                balanza.year         = Convert.ToInt32(r["INT_YEAR"]);
                balanza.salini       = Convert.ToDouble(r["DECI_SALINI"]);
                balanza.enecargos    = Convert.ToDouble(r["DECI_ENECARGOS"]);
                balanza.eneabonos    = Convert.ToDouble(r["DECI_ENEABONOS"]);
                balanza.febcargos    = Convert.ToDouble(r["DECI_FEBCARGOS"]);
                balanza.febabonos    = Convert.ToDouble(r["DECI_FEBABONOS"]);
                balanza.marcargos    = Convert.ToDouble(r["DECI_MARCARGOS"]);
                balanza.marabonos    = Convert.ToDouble(r["DECI_MARABONOS"]);
                balanza.abrcargos    = Convert.ToDouble(r["DECI_ABRCARGOS"]);
                balanza.abrabonos    = Convert.ToDouble(r["DECI_ABRABONOS"]);
                balanza.maycargos    = Convert.ToDouble(r["DECI_ABRABONOS"]);
                balanza.mayabonos    = Convert.ToDouble(r["DECI_MAYABONOS"]);
                balanza.juncargos    = Convert.ToDouble(r["DECI_JUNCARGOS"]);
                balanza.junabonos    = Convert.ToDouble(r["DECI_JUNABONOS"]);
                balanza.julcargos    = Convert.ToDouble(r["DECI_JULCARGOS"]);
                balanza.julabonos    = Convert.ToDouble(r["DECI_JULABONOS"]);
                balanza.agocargos    = Convert.ToDouble(r["DECI_AGOCARGOS"]);
                balanza.agoabonos    = Convert.ToDouble(r["DECI_AGOABONOS"]);
                balanza.sepcargos    = Convert.ToDouble(r["DECI_AGOABONOS"]);
                balanza.sepabonos    = Convert.ToDouble(r["DECI_SEPABONOS"]);
                balanza.octcargos    = Convert.ToDouble(r["DECI_OCTCARGOS"]);
                balanza.octabonos    = Convert.ToDouble(r["DECI_OCTABONOS"]);
                balanza.novcargos    = Convert.ToDouble(r["DECI_NOVCARGOS"]);
                balanza.novabonos    = Convert.ToDouble(r["DECI_NOVABONOS"]);
                balanza.diccargos    = Convert.ToDouble(r["DECI_DICCARGOS"]);
                balanza.dicabonos    = Convert.ToDouble(r["DECI_DICABONOS"]);
                balanza.cc           = Convert.ToString(r["INT_CC"]);
                balanza.incluir_suma = Convert.ToInt32(r["DECI_INCLUIR_SUMA"]);
                lstBalanza.Add(balanza);
            }
            return(lstBalanza);
        }