Esempio n. 1
0
 public List <XCONTA_Rpt023_Info> GetList(int IdEmpresa, string IdCentroCosto, int Nivel, DateTime FechaFin, string IdUsuario, string Balance, bool MostrarSaldo0)
 {
     try
     {
         using (EntitiesContabilidadRptGeneral db = new EntitiesContabilidadRptGeneral())
         {
             return(db.spCONTA_Rpt023(IdEmpresa, IdCentroCosto, Nivel, FechaFin, IdUsuario, Balance, MostrarSaldo0).Select(q => new XCONTA_Rpt023_Info
             {
                 IdEmpresa = q.IdEmpresa,
                 IdCtaCble = q.IdCtaCble,
                 IdCentroCosto = q.IdCentroCosto,
                 IdUsuario = q.IdUsuario,
                 IdCtaCblePadre = q.IdCtaCblePadre,
                 Naturaleza = q.Naturaleza,
                 NombreCuenta = q.NombreCuenta,
                 NombreCentroCosto = q.NombreCentroCosto,
                 EsCuentaMovimiento = q.EsCuentaMovimiento,
                 NivelCuenta = q.NivelCuenta,
                 Saldo = q.Saldo,
                 SaldoNaturaleza = q.SaldoNaturaleza,
                 TipoCuenta = q.EsCuentaMovimiento == true ? "Cta Movimiento" : "Cta Padre"
             }).ToList());
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Esempio n. 2
0
        public List <XCONTA_Rpt003_Info> consultar_data(int IdEmpresa, int IdTipoCbte, decimal IdCbteCble, ref String mensajeError)
        {
            try
            {
                List <XCONTA_Rpt003_Info> lista = new List <XCONTA_Rpt003_Info>();

                using (EntitiesContabilidadRptGeneral OEnti = new EntitiesContabilidadRptGeneral())
                {
                    var select = from k in OEnti.vwCONTA_Rpt003
                                 where k.IdEmpresa == IdEmpresa &&
                                 k.IdTipoCbte == IdTipoCbte &&
                                 k.IdCbteCble == IdCbteCble
                                 select k;
                    foreach (var item in select)
                    {
                        XCONTA_Rpt003_Info info = new XCONTA_Rpt003_Info();
                        info.debe                  = item.debe;
                        info.Cred                  = item.Cred;
                        info.IdEmpresa             = item.IdEmpresa;
                        info.IdTipoCbte            = item.IdTipoCbte;
                        info.IdCbteCble            = item.IdCbteCble;
                        info.CodCbteCble           = item.CodCbteCble;
                        info.IdPeriodo             = item.IdPeriodo;
                        info.cb_Fecha              = item.cb_Fecha;
                        info.cb_Valor              = item.cb_Valor;
                        info.cb_Observacion        = item.cb_Observacion;
                        info.cb_Estado             = item.cb_Estado;
                        info.cb_Anio               = item.cb_Anio;
                        info.cb_mes                = item.cb_mes;
                        info.secuencia             = item.secuencia;
                        info.IdCtaCble             = item.IdCtaCble;
                        info.dc_Valor              = item.dc_Valor;
                        info.dc_Observacion        = item.dc_Observacion;
                        info.pc_Cuenta             = item.pc_Cuenta;
                        info.tc_TipoCbte           = item.tc_TipoCbte;
                        info.nom_punto_cargo       = item.nom_punto_cargo;
                        info.nom_punto_cargo_grupo = item.nom_punto_cargo_grupo;
                        info.pc_clave_corta        = item.pc_clave_corta;

                        lista.Add(info);
                    }
                }

                return(lista);
            }
            catch (Exception ex)
            {
                string mensaje = "";
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "",
                                                                                          "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }
Esempio n. 3
0
        public List <XCONTA_Rpt005_Info> Cargar_data(int idempresa, DateTime FechaIni, DateTime FechaFin)
        {
            try
            {
                List <XCONTA_Rpt005_Info> listadedatos = new List <XCONTA_Rpt005_Info>();
                FechaIni = Convert.ToDateTime(FechaIni.ToShortDateString());
                FechaFin = Convert.ToDateTime(FechaFin.ToShortDateString());


                using (EntitiesContabilidadRptGeneral OEnti = new EntitiesContabilidadRptGeneral())
                {
                    var select = from h in OEnti.vwCONTA_Rpt005
                                 where h.IdEmpresa == idempresa &&
                                 h.Fecha >= FechaIni && h.Fecha <= FechaFin
                                 select h;

                    foreach (var item in select)
                    {
                        XCONTA_Rpt005_Info itemInfo = new XCONTA_Rpt005_Info();


                        itemInfo.IdEmpresa      = item.IdEmpresa;
                        itemInfo.IdTipoCbte     = item.IdTipoCbte;
                        itemInfo.IdCbteCble     = item.IdCbteCble;
                        itemInfo.IdPeriodo      = item.IdPeriodo;
                        itemInfo.Fecha          = item.Fecha;
                        itemInfo.IdCtaCble      = item.IdCtaCble;
                        itemInfo.IdCentroCosto  = item.IdCentroCosto;
                        itemInfo.Valor          = item.Valor;
                        itemInfo.Centro_costo   = item.Centro_costo;
                        itemInfo.TipoCbte       = item.TipoCbte;
                        itemInfo.nom_Cuenta     = item.nom_Cuenta;
                        itemInfo.Naturaleza_cta = item.Naturaleza_cta;
                        itemInfo.IdCtaCblePadre = item.IdCtaCblePadre;
                        itemInfo.AnioFiscal     = item.AnioFiscal;
                        itemInfo.IdMes          = item.IdMes;
                        itemInfo.Mes            = item.Mes;

                        listadedatos.Add(itemInfo);
                    }
                }

                return(listadedatos);
            }
            catch (Exception ex)
            {
                string mensaje = "";
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "",
                                                                                          "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }
Esempio n. 4
0
        public List <XCONTA_Rpt009_Info> Get_list_CbteCble_x_cp_Conciliacion_caja(int IdEmpresa, decimal IdConciliacion_caja)
        {
            try
            {
                List <XCONTA_Rpt009_Info> Lista = new List <XCONTA_Rpt009_Info>();

                using (EntitiesContabilidadRptGeneral Context = new EntitiesContabilidadRptGeneral())
                {
                    var lst = from q in Context.vwCONTA_Rpt009
                              where IdEmpresa == q.IdEmpresa &&
                              IdConciliacion_caja == q.IdConciliacion_Caja
                              select q;
                    foreach (var item in lst)
                    {
                        XCONTA_Rpt009_Info info = new XCONTA_Rpt009_Info();
                        info.IdEmpresa                         = item.IdEmpresa;
                        info.IdConciliacion_Caja               = item.IdConciliacion_Caja;
                        info.tc_TipoCbte                       = item.tc_TipoCbte;
                        info.IdEmpresa                         = item.IdEmpresa_cbte;
                        info.IdTipoCbte                        = item.IdTipoCbte;
                        info.IdCbteCble                        = item.IdCbteCble;
                        info.secuencia                         = item.secuencia;
                        info.IdCtaCble                         = item.IdCtaCble;
                        info.nom_Cuenta                        = item.nom_Cuenta;
                        info.IdCentroCosto                     = item.IdCentroCosto;
                        info.nom_Centro_costo                  = item.nom_Centro_costo;
                        info.IdCentroCosto_sub_centro_costo    = item.IdCentroCosto_sub_centro_costo;
                        info.nom_Centro_costo_sub_centro_costo = item.nom_Centro_costo_sub_centro_costo;
                        info.Debe                  = item.Debe;
                        info.Haber                 = item.Haber;
                        info.dc_Observacion        = item.dc_Observacion;
                        info.IdPunto_cargo         = item.IdPunto_cargo;
                        info.IdPunto_cargo_grupo   = item.IdPunto_cargo_grupo;
                        info.nom_punto_cargo_grupo = item.nom_punto_cargo_grupo;
                        info.nom_punto_cargo       = item.nom_punto_cargo;
                        Lista.Add(info);
                    }
                }

                return(Lista);
            }
            catch (Exception ex)
            {
                string mensaje = "";
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "",
                                                                                          "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }
Esempio n. 5
0
        public List <XCONTA_Rpt010_Info> Get_list_Data(int IdEmpresa, DateTime FechaIni, DateTime FechaFin, int IdPunto_cargo_grupo, bool Mostrar_Reg_Cero)
        {
            try
            {
                List <XCONTA_Rpt010_Info> Lista = new List <XCONTA_Rpt010_Info>();

                FechaIni = Convert.ToDateTime(FechaIni.ToShortDateString());
                FechaFin = Convert.ToDateTime(FechaFin.ToShortDateString());

                using (EntitiesContabilidadRptGeneral Context = new EntitiesContabilidadRptGeneral())
                {
                    IList <spCONTA_Rpt010_Result> listBalance =
                        Context.spCONTA_Rpt010(IdEmpresa, FechaIni, FechaFin, IdPunto_cargo_grupo, Mostrar_Reg_Cero).ToList();


                    foreach (var item in listBalance)
                    {
                        XCONTA_Rpt010_Info info = new XCONTA_Rpt010_Info();

                        info.IdEmpresa           = item.IdEmpresa;
                        info.IdPunto_cargo_grupo = item.IdPunto_cargo_grupo;
                        info.IdPunto_cargo       = item.IdPunto_cargo;
                        info.IdCtaCble           = item.IdCtaCble;
                        info.nom_Punto_cargo     = item.nom_Punto_cargo;
                        info.Saldo_Anterior      = item.Saldo_Anterior;
                        info.Debito                = item.Debito;
                        info.Credito               = item.Credito;
                        info.Saldo_Total           = item.Saldo_Total;
                        info.nom_empresa           = item.nom_empresa;
                        info.nom_punto_cargo_grupo = item.nom_punto_cargo_grupo;
                        info.Anio = FechaIni.Year;

                        Lista.Add(info);
                    }
                }

                return(Lista);
            }
            catch (Exception ex)
            {
                string mensaje = "";
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "",
                                                                                          "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }
Esempio n. 6
0
        public List <XCONTA_Rpt008_Info> Get_List_Reporte(int IdEmpresa, Decimal IdOrdenPago)
        {
            try
            {
                List <XCONTA_Rpt008_Info> Lista = new List <XCONTA_Rpt008_Info>();

                using (EntitiesContabilidadRptGeneral context = new EntitiesContabilidadRptGeneral())
                {
                    var contact = from q in context.vwCONTA_Rpt008
                                  where q.IdEmpresa == IdEmpresa &&
                                  q.IdOrdenPago == IdOrdenPago
                                  select q;

                    foreach (var item in contact)
                    {
                        XCONTA_Rpt008_Info Info = new XCONTA_Rpt008_Info();
                        Info.IdEmpresa      = item.IdEmpresa;
                        Info.IdOrdenPago    = item.IdOrdenPago;
                        Info.Secuencia_op   = item.Secuencia_op;
                        Info.IdEmpresa_cxp  = item.IdEmpresa_cxp;
                        Info.IdCbteCble_cxp = item.IdCbteCble_cxp;
                        Info.IdTipoCbte_cxp = item.IdTipoCbte_cxp;
                        Info.secuencia_cxp  = item.secuencia_cxp;
                        Info.IdCtaCble      = item.IdCtaCble;
                        Info.pc_Cuenta      = item.pc_Cuenta;
                        Info.pc_clave_corta = item.pc_clave_corta;
                        Info.dc_Observacion = item.dc_Observacion;
                        Info.cb_Fecha       = item.cb_Fecha;
                        Info.dc_Valor       = item.dc_Valor;
                        Info.CodTipoCbte    = item.CodTipoCbte;
                        Info.tc_TipoCbte    = item.tc_TipoCbte;

                        Lista.Add(Info);
                    }
                }
                return(Lista);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                MensajeError = ex.ToString() + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref MensajeError);
                throw new Exception(ex.InnerException.ToString());
            }
        }
Esempio n. 7
0
        public List <XCONTA_Rpt004_Info> GetListConsultaGeneral(int idEmpresa, ref string msg)
        {
            try
            {
                List <XCONTA_Rpt004_Info> listado = new List <XCONTA_Rpt004_Info>();

                using (EntitiesContabilidadRptGeneral db = new EntitiesContabilidadRptGeneral())
                {
                    var datos = (from a in db.vwCONTA_Rpt004
                                 where a.IdEmpresa == idEmpresa
                                 select a);

                    foreach (var item in datos)
                    {
                        XCONTA_Rpt004_Info info = new XCONTA_Rpt004_Info();

                        info.IdEmpresa            = item.IdEmpresa;
                        info.IdCtaCble            = item.IdCtaCble;
                        info.IdCtaCblePadre       = item.IdCtaCblePadre;
                        info.IdGrupoCble          = item.IdGrupoCble;
                        info.IdNivelCta           = item.IdNivelCta;
                        info.IdTipoCtaCble        = item.IdTipoCtaCble;
                        info.pc_clave_corta       = item.pc_clave_corta;
                        info.pc_Cuenta            = item.pc_Cuenta;
                        info.pc_es_flujo_efectivo = item.pc_es_flujo_efectivo;
                        info.pc_EsMovimiento      = item.pc_EsMovimiento;
                        info.pc_Estado            = item.pc_Estado;
                        info.pc_Naturaleza        = item.pc_Naturaleza;


                        listado.Add(info);
                    }
                }
                return(listado);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.InnerException + " " + ex.Message;
                msg     = mensaje;
                throw new Exception(ex.InnerException.ToString());
            }
        }
Esempio n. 8
0
        public List <XCONTA_Rpt018_Info> Get_list_reporte(int IdEmpresa, DateTime Fecha_ini, DateTime Fecha_fin, int IdPunto_cargo_grupo, bool Mostrar_detalle)
        {
            try
            {
                int IdPunto_cargo_grupo_ini = IdPunto_cargo_grupo;
                int IdPunto_cargo_grupo_fin = IdPunto_cargo_grupo == 0 ? 99999 : IdPunto_cargo_grupo;

                List <XCONTA_Rpt018_Info> Lista = new List <XCONTA_Rpt018_Info>();

                using (EntitiesContabilidadRptGeneral Context = new EntitiesContabilidadRptGeneral())
                {
                    var lst = from q in Context.spCONTA_Rpt018(Fecha_ini.Date, Fecha_fin.Date, IdEmpresa, IdPunto_cargo_grupo_ini, IdPunto_cargo_grupo_fin, Mostrar_detalle)
                              select q;

                    foreach (var item in lst)
                    {
                        XCONTA_Rpt018_Info info = new XCONTA_Rpt018_Info();
                        info.IdEmpresa             = item.IdEmpresa;
                        info.IdRow                 = item.IdRow;
                        info.IdCtaCble             = item.IdCtaCble;
                        info.pc_Cuenta             = item.pc_Cuenta;
                        info.Observacion           = item.Observacion;
                        info.Valor                 = item.Valor;
                        info.IdPunto_cargo_grupo   = item.IdPunto_cargo_grupo;
                        info.nom_punto_cargo_grupo = item.nom_punto_cargo_grupo;
                        info.Comprobante           = item.Comprobante;
                        info.IdCbteCble            = item.IdCbteCble;
                        Lista.Add(info);
                    }
                }

                return(Lista);
            }
            catch (Exception ex)
            {
                string mensaje = "";
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "",
                                                                                          "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }
Esempio n. 9
0
        public List <XCONTA_Rpt016_Info> Get_data_x_anio(int IdEmpresa, int Anio, bool Mostrar_CC)
        {
            try
            {
                List <XCONTA_Rpt016_Info> Lista = new List <XCONTA_Rpt016_Info>();

                using (EntitiesContabilidadRptGeneral Context = new EntitiesContabilidadRptGeneral())
                {
                    var lst = from q in Context.spCONTA_Rpt016_cuentas_x_anio(IdEmpresa, Anio, Mostrar_CC)
                              select q;

                    foreach (var item in lst)
                    {
                        XCONTA_Rpt016_Info info = new XCONTA_Rpt016_Info();
                        info.IdEmpresa            = item.IdEmpresa;
                        info.nivel                = item.nivel;
                        info.orden                = item.orden;
                        info.orden_tipo_gasto     = item.orden_tipo_gasto;
                        info.IdTipo_Gasto         = item.IdTipo_Gasto;
                        info.nom_tipo_Gasto       = item.nom_tipo_Gasto;
                        info.nom_tipo_Gasto_padre = item.nom_tipo_Gasto_padre;
                        info.IdCta                = item.IdCta;
                        info.nom_cuenta           = item.nom_cuenta;
                        info.Saldo                = item.dc_Valor;
                        info.nom_grupo_CC         = item.nom_grupo_CC;
                        Lista.Add(info);
                    }
                }

                return(Lista);
            }
            catch (Exception ex)
            {
                string mensaje = "";
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "",
                                                                                          "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }
Esempio n. 10
0
        public List <XCONTA_Rpt019_Info> Get_List_Reporte(int IdEmpresa, DateTime FechaIni, DateTime FechaFin, string IdCentro_Costo
                                                          , int IdPunto_Cargo_Grupo, int IdPunto_Cargo, bool Mostrar_Cero, bool MostrarCC, bool Considerar_asiento_cierre, string IdUsuario)
        {
            try
            {
                FechaIni = Convert.ToDateTime(FechaIni.ToShortDateString());
                FechaFin = Convert.ToDateTime(FechaFin.ToShortDateString());

                List <XCONTA_Rpt019_Info> Lista = new List <XCONTA_Rpt019_Info>();

                using (EntitiesContabilidadRptGeneral context = new EntitiesContabilidadRptGeneral())
                {
                    context.SetCommandTimeOut(3000);

                    var contact = from q in context.spCON_Mayorizar_x_fecha_corte(IdEmpresa, FechaIni, FechaFin, IdCentro_Costo, IdPunto_Cargo_Grupo, IdPunto_Cargo, Mostrar_Cero, MostrarCC, Considerar_asiento_cierre, IdUsuario)
                                  select q;


                    foreach (var item in contact)
                    {
                        XCONTA_Rpt019_Info Info = new XCONTA_Rpt019_Info();
                        Info.IdEmpresa      = item.IdEmpresa;
                        Info.IdCtaCble      = item.IdCtaCble;
                        Info.nom_cuenta     = item.nom_cuenta;
                        Info.IdNivelCta     = item.IdNivelCta;
                        Info.GrupoCble      = item.GrupoCble;
                        Info.OrderGrupoCble = item.OrderGrupoCble;
                        Info.IdCtaCblePadre = item.IdCtaCblePadre;

                        Info.Saldo_Inicial_debito  = item.Saldo_Inicial_deudor;
                        Info.Saldo_Inicial_credito = item.Saldo_Inicial_acreedor;

                        Info.Debito_Mes  = item.Debito_Mes;
                        Info.Credito_Mes = item.Credito_Mes;

                        Info.Saldo_final_debito  = item.Saldo_fin_deudor;
                        Info.Saldo_final_credito = item.Saldo_fin_acreedor;

                        Info.Debito_Mes_x_Movi  = item.Debito_Mes_x_Movi;
                        Info.Credito_Mes_x_Movi = item.Credito_Mes_x_Movi;

                        Info.pc_EsMovimiento = item.pc_EsMovimiento;

                        Info.IdPuntoCargo         = item.IdPunto_cargo;
                        Info.IdPuntoCargo_Grupo   = item.IdPunto_cargo_grupo;
                        Info.IdCentroCosto        = item.IdCentroCosto;
                        Info.nom_PuntoCargo       = item.nom_punto_cargo;
                        Info.nom_PuntoCargo_Grupo = item.nom_punto_cargo_grupo;
                        Info.nom_CentroCosto      = item.nom_centro_costo;
                        Info.nom_empresa          = item.nom_empresa;
                        Info.clave_corta          = item.pc_clave_corta;


                        Info.nom_empresa = item.nom_empresa;

                        Lista.Add(Info);
                    }
                }
                return(Lista);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                MensajeError = ex.ToString() + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref MensajeError);
                throw new Exception(ex.InnerException.ToString());
            }
        }
Esempio n. 11
0
        public List <XCONTA_Rpt002_Info> Get_data_Mayorizado_x_fecha(int IdEmpresa, DateTime FechaIni, DateTime FechaFin, string IdCentroCosto, int IdNivel_a_mostrar
                                                                     , int IdPunto_cargo_grupo
                                                                     , int IdPunto_cargo
                                                                     , bool Mostrar_reg_en_cero
                                                                     , bool MostrarCC, string IdGrupoCble, string IdUsuario, ref String MensajeError)
        {
            try
            {
                List <XCONTA_Rpt002_Info> listadedatos = new List <XCONTA_Rpt002_Info>();
                using (EntitiesContabilidadRptGeneral Estado_Resultado = new EntitiesContabilidadRptGeneral())
                {
                    Estado_Resultado.SetCommandTimeOut(30000);//timeout 3 minutos

                    IList <spCON_Mayorizar_x_fecha_corte_Result> listBalance = (from q in Estado_Resultado.spCON_Mayorizar_x_fecha_corte(IdEmpresa, FechaIni, FechaFin,
                                                                                                                                         IdCentroCosto, IdPunto_cargo_grupo, IdPunto_cargo, Mostrar_reg_en_cero, MostrarCC, true, IdUsuario)
                                                                                where q.GrupoCble == IdGrupoCble
                                                                                select q).ToList();


                    var Querry_x_ER = from C in listBalance
                                      where C.gc_estado_financiero == "ER" &&
                                      C.IdNivelCta <= IdNivel_a_mostrar
                                      select C;

                    foreach (var item in Querry_x_ER)
                    {
                        XCONTA_Rpt002_Info itemInfo = new XCONTA_Rpt002_Info();
                        itemInfo.IdEmpresa            = item.IdEmpresa;
                        itemInfo.IdCtaCble            = item.IdCtaCble;
                        itemInfo.nom_cuenta           = item.nom_cuenta;
                        itemInfo.nom_cuenta2          = item.IdCtaCble + " " + item.nom_cuenta;
                        itemInfo.IdNivelCta           = item.IdNivelCta;
                        itemInfo.IdCtaCblePadre       = item.IdCtaCblePadre;
                        itemInfo.GrupoCble            = item.GrupoCble;
                        itemInfo.OrderGrupoCble       = Convert.ToInt32(item.OrderGrupoCble);
                        itemInfo.gc_estado_financiero = item.gc_estado_financiero;


                        itemInfo.Saldo_Inicial = item.Saldo_Inicial;
                        itemInfo.Debito_Mes    = item.Debito_Mes;
                        itemInfo.Credito_Mes   = item.Credito_Mes;
                        itemInfo.Saldo         = item.Saldo_Mes;

                        itemInfo.Saldo_inicial_x_Movi = item.Saldo_inicial_x_Movi;
                        itemInfo.Debito_Mes_x_Movi    = item.Debito_Mes_x_Movi;
                        itemInfo.Credito_Mes_x_Movi   = item.Credito_Mes_x_Movi;
                        itemInfo.Saldo_x_Movi         = item.Saldo_x_Movi;



                        itemInfo.pc_EsMovimiento    = item.pc_EsMovimiento;
                        itemInfo.GrupoCble          = item.GrupoCble;
                        itemInfo.gc_signo_operacion = item.gc_signo_operacion;


                        itemInfo.IdPuntoCargo         = item.IdPunto_cargo;
                        itemInfo.IdPuntoCargo_Grupo   = item.IdPunto_cargo_grupo;
                        itemInfo.IdCentroCosto        = item.IdCentroCosto;
                        itemInfo.nom_PuntoCargo       = item.nom_punto_cargo;
                        itemInfo.nom_PuntoCargo_Grupo = item.nom_punto_cargo_grupo;
                        itemInfo.nom_CentroCosto      = item.nom_centro_costo;
                        itemInfo.nom_empresa          = item.nom_empresa;

                        itemInfo.IdGrupo_Mayor     = item.IdGrupo_Mayor;
                        itemInfo.nom_grupo_mayor   = item.nom_grupo_mayor;
                        itemInfo.order_grupo_mayor = item.order_grupo_mayor;

                        listadedatos.Add(itemInfo);
                    }
                }
                return(listadedatos);
            }
            catch (Exception ex)
            {
                string mensaje = "";
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "",
                                                                                          "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }
Esempio n. 12
0
        public List <XCONTA_Rpt021_Info> consultar_data(int IdEmpresa, DateTime FechaIni, DateTime FechaFin, string IdCentroCosto, int IdNivel_a_mostrar
                                                        , int IdPunto_cargo_grupo
                                                        , int IdPunto_cargo
                                                        , bool Mostrar_reg_Cero
                                                        , bool MostrarCC, bool Considerar_Asiento_cierre_anual, string IdUsuario, ref String MensajeError)
        {
            try
            {
                List <XCONTA_Rpt021_Info> listadedatos = new List <XCONTA_Rpt021_Info>();

                FechaIni = Convert.ToDateTime(FechaIni.ToShortDateString());
                FechaFin = Convert.ToDateTime(FechaFin.ToShortDateString());

                using (EntitiesContabilidadRptGeneral BalanceGeneral = new EntitiesContabilidadRptGeneral())
                {
                    BalanceGeneral.SetCommandTimeOut(30000);//timeout 3 minutos

                    IList <spCON_Mayorizar_x_fecha_corte_Result> listBalance =
                        BalanceGeneral.spCON_Mayorizar_x_fecha_corte(IdEmpresa, FechaIni, FechaFin, IdCentroCosto, IdPunto_cargo_grupo, IdPunto_cargo, Mostrar_reg_Cero, MostrarCC, Considerar_Asiento_cierre_anual, IdUsuario).Where(v => v.gc_estado_financiero == "ER" && v.IdNivelCta <= IdNivel_a_mostrar).ToList();


                    foreach (var item in listBalance)
                    {
                        XCONTA_Rpt021_Info itemInfo = new XCONTA_Rpt021_Info();
                        itemInfo.IdEmpresa            = item.IdEmpresa;
                        itemInfo.IdCtaCble            = item.IdCtaCble;
                        itemInfo.nom_cuenta           = item.nom_cuenta;
                        itemInfo.IdNivelCta           = item.IdNivelCta;
                        itemInfo.IdCtaCblePadre       = item.IdCtaCblePadre;
                        itemInfo.GrupoCble            = item.GrupoCble;
                        itemInfo.OrderGrupoCble       = Convert.ToInt32(item.OrderGrupoCble);
                        itemInfo.gc_estado_financiero = item.gc_estado_financiero;

                        itemInfo.Saldo_Inicial = item.Saldo_Inicial;
                        itemInfo.Debito_Mes    = item.Debito_Mes;
                        itemInfo.Credito_Mes   = item.Credito_Mes;
                        itemInfo.Saldo         = item.Saldo;

                        itemInfo.Saldo_inicial_x_Movi = item.Saldo_inicial_x_Movi;
                        itemInfo.Debito_Mes_x_Movi    = item.Debito_Mes_x_Movi;
                        itemInfo.Credito_Mes_x_Movi   = item.Credito_Mes_x_Movi;
                        itemInfo.Saldo_x_Movi         = item.Saldo_x_Movi;



                        itemInfo.pc_EsMovimiento = item.pc_EsMovimiento;
                        itemInfo.nom_cuenta2     = item.IdCtaCble + " - " + item.nom_cuenta;

                        itemInfo.IdPuntoCargo         = item.IdPunto_cargo;
                        itemInfo.IdPuntoCargo_Grupo   = item.IdPunto_cargo_grupo;
                        itemInfo.IdCentroCosto        = item.IdCentroCosto;
                        itemInfo.nom_PuntoCargo       = item.nom_punto_cargo;
                        itemInfo.nom_PuntoCargo_Grupo = item.nom_punto_cargo_grupo;
                        itemInfo.nom_CentroCosto      = item.nom_centro_costo;
                        itemInfo.nom_empresa          = item.nom_empresa;



                        listadedatos.Add(itemInfo);
                    }
                }
                return(listadedatos);
            }
            catch (Exception ex)
            {
                string mensaje = "";
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "",
                                                                                          "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }
Esempio n. 13
0
        public List <XCONTA_Rpt022_Info> consultar_data(int IdEmpresa, DateTime FechaIni, DateTime FechaFin, string IdCentroCosto, int IdNivel_a_mostrar
                                                        , int IdPunto_cargo_grupo
                                                        , int IdPunto_cargo
                                                        , bool Mostrar_reg_Cero
                                                        , bool MostrarCC, bool Considerar_Asiento_cierre_anual, string IdUsuario, ref String MensajeError)
        {
            try
            {
                List <XCONTA_Rpt022_Info> listadedatos = new List <XCONTA_Rpt022_Info>();

                FechaIni = Convert.ToDateTime(FechaIni.ToShortDateString());
                FechaFin = Convert.ToDateTime(FechaFin.ToShortDateString());

                using (EntitiesContabilidadRptGeneral BalanceGeneral = new EntitiesContabilidadRptGeneral())
                {
                    BalanceGeneral.SetCommandTimeOut(30000);//timeout 3 minutos

                    IList <spCON_Mayorizar_x_fecha_corte_Result> listBalance =
                        BalanceGeneral.spCON_Mayorizar_x_fecha_corte(IdEmpresa, FechaIni, FechaFin, IdCentroCosto, IdPunto_cargo_grupo, IdPunto_cargo, Mostrar_reg_Cero, MostrarCC, Considerar_Asiento_cierre_anual, IdUsuario).Where(v => v.gc_estado_financiero == "BG" && v.IdNivelCta <= IdNivel_a_mostrar).ToList();

                    ct_Plancta_nivel_Info info_nivel_2 = new ct_Plancta_nivel_Info();
                    ct_Plancta_nivel_Info info_nivel_3 = new ct_Plancta_nivel_Info();
                    ct_Plancta_nivel_Info info_nivel_4 = new ct_Plancta_nivel_Info();
                    ct_Plancta_nivel_Info info_nivel_5 = new ct_Plancta_nivel_Info();
                    ct_Plancta_nivel_Info info_nivel_6 = new ct_Plancta_nivel_Info();

                    ct_Plancta_nivel_Bus bus_nivel = new ct_Plancta_nivel_Bus();
                    info_nivel_2 = bus_nivel.Get_info_plancta_nivel(IdEmpresa, 2);
                    info_nivel_3 = bus_nivel.Get_info_plancta_nivel(IdEmpresa, 3);
                    info_nivel_4 = bus_nivel.Get_info_plancta_nivel(IdEmpresa, 4);
                    info_nivel_5 = bus_nivel.Get_info_plancta_nivel(IdEmpresa, 5);
                    info_nivel_6 = bus_nivel.Get_info_plancta_nivel(IdEmpresa, 6);


                    List <ct_Plancta_Info> lst_nivel_2 = new List <ct_Plancta_Info>();
                    List <ct_Plancta_Info> lst_nivel_3 = new List <ct_Plancta_Info>();
                    List <ct_Plancta_Info> lst_nivel_4 = new List <ct_Plancta_Info>();
                    List <ct_Plancta_Info> lst_nivel_5 = new List <ct_Plancta_Info>();
                    List <ct_Plancta_Info> lst_nivel_6 = new List <ct_Plancta_Info>();

                    ct_Plancta_Bus bus_plancta = new ct_Plancta_Bus();
                    lst_nivel_2 = bus_plancta.Get_List_Plancta(IdEmpresa, 2);
                    lst_nivel_3 = bus_plancta.Get_List_Plancta(IdEmpresa, 3);
                    lst_nivel_4 = bus_plancta.Get_List_Plancta(IdEmpresa, 4);
                    lst_nivel_5 = bus_plancta.Get_List_Plancta(IdEmpresa, 5);
                    lst_nivel_6 = bus_plancta.Get_List_Plancta(IdEmpresa, 6);

                    foreach (var item in listBalance)
                    {
                        if (item.IdNivelCta == IdNivel_a_mostrar)
                        {
                            XCONTA_Rpt022_Info itemInfo = new XCONTA_Rpt022_Info();
                            itemInfo.IdEmpresa            = item.IdEmpresa;
                            itemInfo.IdCtaCble            = item.IdCtaCble;
                            itemInfo.nom_cuenta           = item.nom_cuenta;
                            itemInfo.IdNivelCta           = item.IdNivelCta;
                            itemInfo.IdCtaCblePadre       = item.IdCtaCblePadre;
                            itemInfo.GrupoCble            = item.GrupoCble;
                            itemInfo.OrderGrupoCble       = Convert.ToInt32(item.OrderGrupoCble);
                            itemInfo.gc_estado_financiero = item.gc_estado_financiero;
                            itemInfo.Saldo_Inicial        = item.Saldo_Inicial;
                            itemInfo.Debito_Mes           = item.Debito_Mes;
                            itemInfo.Credito_Mes          = item.Credito_Mes;
                            itemInfo.Saldo = item.Saldo;
                            itemInfo.Saldo_inicial_x_Movi = item.Saldo_inicial_x_Movi;
                            itemInfo.Debito_Mes_x_Movi    = item.Debito_Mes_x_Movi;
                            itemInfo.Credito_Mes_x_Movi   = item.Credito_Mes_x_Movi;
                            itemInfo.Saldo_x_Movi         = item.Saldo_x_Movi;
                            itemInfo.pc_EsMovimiento      = item.pc_EsMovimiento;
                            itemInfo.nom_cuenta2          = item.IdCtaCble + " - " + item.nom_cuenta;
                            itemInfo.nom_cuenta           = item.nom_cuenta;
                            itemInfo.IdPuntoCargo         = item.IdPunto_cargo;
                            itemInfo.IdPuntoCargo_Grupo   = item.IdPunto_cargo_grupo;
                            itemInfo.IdCentroCosto        = item.IdCentroCosto;
                            itemInfo.nom_PuntoCargo       = item.nom_punto_cargo;
                            itemInfo.nom_PuntoCargo_Grupo = item.nom_punto_cargo_grupo;
                            itemInfo.nom_CentroCosto      = item.nom_centro_costo;
                            itemInfo.nom_empresa          = item.nom_empresa;


                            try
                            {
                                //Nivel 2
                                itemInfo.IdCtaCble_nivel2 = item.IdCtaCble.Length > info_nivel_2.nv_NumDigitos_total ? itemInfo.IdCtaCble.Substring(0, Convert.ToInt32(info_nivel_2.nv_NumDigitos_total)) : null;
                                if (itemInfo.IdCtaCble_nivel2 != null)
                                {
                                    itemInfo.pc_cuenta_nivel2 = lst_nivel_2.FirstOrDefault(q => q.IdCtaCble == itemInfo.IdCtaCble_nivel2).pc_Cuenta;
                                }
                            }
                            catch (Exception ex)
                            {
                            }
                            try
                            {
                                //Nivel 3
                                itemInfo.IdCtaCble_nivel3 = item.IdCtaCble.Length > info_nivel_3.nv_NumDigitos_total ? itemInfo.IdCtaCble.Substring(0, Convert.ToInt32(info_nivel_3.nv_NumDigitos_total)) : null;
                                if (itemInfo.IdCtaCble_nivel3 != null)
                                {
                                    itemInfo.pc_cuenta_nivel3 = lst_nivel_3.FirstOrDefault(q => q.IdCtaCble == itemInfo.IdCtaCble_nivel3).pc_Cuenta;
                                }
                            }
                            catch (Exception ex)
                            {
                            }
                            try
                            {
                                //Nivel 4
                                itemInfo.IdCtaCble_nivel4 = item.IdCtaCble.Length > info_nivel_4.nv_NumDigitos_total ? itemInfo.IdCtaCble.Substring(0, Convert.ToInt32(info_nivel_4.nv_NumDigitos_total)) : null;
                                if (itemInfo.IdCtaCble_nivel4 != null)
                                {
                                    itemInfo.pc_cuenta_nivel4 = lst_nivel_4.FirstOrDefault(q => q.IdCtaCble == itemInfo.IdCtaCble_nivel4).pc_Cuenta;
                                }
                            }
                            catch (Exception ex)
                            {
                            }
                            try
                            {
                                //Nivel 5
                                itemInfo.IdCtaCble_nivel5 = item.IdCtaCble.Length > info_nivel_5.nv_NumDigitos_total ? itemInfo.IdCtaCble.Substring(0, Convert.ToInt32(info_nivel_5.nv_NumDigitos_total)) : null;
                                if (itemInfo.IdCtaCble_nivel5 != null)
                                {
                                    itemInfo.pc_cuenta_nivel5 = lst_nivel_5.FirstOrDefault(q => q.IdCtaCble == itemInfo.IdCtaCble_nivel5).pc_Cuenta;
                                }
                            }
                            catch (Exception ex)
                            {
                            }
                            try
                            {
                                //Nivel 6
                                itemInfo.IdCtaCble_nivel6 = item.IdCtaCble.Length > info_nivel_6.nv_NumDigitos_total ? itemInfo.IdCtaCble.Substring(0, Convert.ToInt32(info_nivel_6.nv_NumDigitos_total)) : null;
                                if (itemInfo.IdCtaCble_nivel6 != null)
                                {
                                    itemInfo.pc_cuenta_nivel6 = lst_nivel_6.FirstOrDefault(q => q.IdCtaCble == itemInfo.IdCtaCble_nivel6).pc_Cuenta;
                                }
                            }
                            catch (Exception ex)
                            {
                            }


                            listadedatos.Add(itemInfo);
                        }
                    }
                }
                return(listadedatos.OrderBy(Q => Q.IdCtaCble).ToList());
            }
            catch (Exception ex)
            {
                string mensaje = "";
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "",
                                                                                          "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }
Esempio n. 14
0
        public List <XCONTA_Rpt006_Info> Get_Data_Reporte(int IdEmpresa, string IdCtaCble, string IdCentro_Costo,
                                                          DateTime FechaIni, DateTime FechaFin, int IdGrupo_Punto_Cargo, int IdPunto_Cargo, Boolean Mostrar_Asiento_cierre, ref string MensajeError)
        {
            try
            {
                List <XCONTA_Rpt006_Info> lstRpt = new List <XCONTA_Rpt006_Info>();

                double? Saldo          = 0;
                Boolean PrimerRegistro = true;

                FechaIni = Convert.ToDateTime(FechaIni.ToShortDateString());
                FechaFin = Convert.ToDateTime(FechaFin.ToShortDateString());

                using (EntitiesContabilidadRptGeneral listado = new EntitiesContabilidadRptGeneral())
                {
                    var select = from q in listado.spCONTA_Rpt006(IdEmpresa, IdCtaCble, IdCentro_Costo, FechaIni, FechaFin, IdGrupo_Punto_Cargo, IdPunto_Cargo, Mostrar_Asiento_cierre)
                                 select q;

                    foreach (var item in select)
                    {
                        if (PrimerRegistro)
                        {
                            Saldo          = (item.SaldoInicial == null) ? 0 : Convert.ToDouble(item.SaldoInicial);
                            PrimerRegistro = false;
                        }

                        XCONTA_Rpt006_Info infoRpt = new XCONTA_Rpt006_Info();
                        infoRpt.IdEmpresa   = item.IdEmpresa;
                        infoRpt.IdCbteCble  = item.IdCbteCble;
                        infoRpt.CodCbteCble = item.IdCbteCble + "/" + item.IdTipoCbte;

                        infoRpt.IdTipocbte            = item.IdTipoCbte;
                        infoRpt.sTipocbte             = item.sTipocbte;
                        infoRpt.IdPeriodo             = item.IdPeriodo;
                        infoRpt.FechaCbte             = item.FechaCbte;
                        infoRpt.IdCtaCble             = item.IdCtaCble;
                        infoRpt.nom_cuenta            = item.nom_cuenta;
                        infoRpt.Debito                = item.Debito;
                        infoRpt.Credito               = item.Credito;
                        infoRpt.Concepto              = item.Concepto;
                        infoRpt.ruc_empresa           = item.ruc_empresa;
                        infoRpt.nom_empresa           = item.nom_empresa;
                        infoRpt.SaldoInicial          = item.SaldoInicial;
                        infoRpt.SaldoFinal            = item.SaldoFinal;
                        infoRpt.nom_grupo_punto_cargo = item.nom_grupo_punto_cargo;
                        infoRpt.nom_punto_cargo       = item.nom_punto_cargo;
                        infoRpt.Icono_Cbte_externo    = Core.Erp.Reportes.Properties.Resources.comprobante_32x32;
                        infoRpt.IdCentro_Costo        = item.IdCentro_Costo;
                        infoRpt.nom_centro_costo      = item.nom_centro_costo;
                        infoRpt.pc_clave_corta        = item.pc_clave_corta;

                        Saldo = Saldo + ((item.Debito > 0) ? item.Debito : item.Credito * -1);

                        infoRpt.Saldo = Saldo;



                        lstRpt.Add(infoRpt);
                    }
                }

                return(lstRpt);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                MensajeError = ex.InnerException + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref MensajeError);
                throw new Exception(ex.InnerException.ToString());
            }
        }
Esempio n. 15
0
        public List <XCONTA_Rpt014_Info> Get_list_reporte(int IdEmpresa, List <string> IdGrupoCble, string IdCtaCble, string IdCentroCosto, DateTime FechaIni, DateTime FechaFin)
        {
            try
            {
                List <XCONTA_Rpt014_Info> Lista = new List <XCONTA_Rpt014_Info>();
                using (EntitiesContabilidadRptGeneral Context = new EntitiesContabilidadRptGeneral())
                {
                    var lst = from q in Context.vwCONTA_Rpt014
                              where IdEmpresa == q.IdEmpresa &&
                              FechaIni <= q.cb_Fecha && q.cb_Fecha <= FechaFin
                              select q;

                    if (IdGrupoCble.Count != 0)
                    {
                        lst = lst.Where(q => IdGrupoCble.Contains(q.IdGrupoCble));
                    }
                    if (IdCtaCble != "")
                    {
                        lst = lst.Where(q => q.IdCtaCble == IdCtaCble);
                    }
                    if (IdCentroCosto != "")
                    {
                        lst = lst.Where(q => q.IdCentroCosto == IdCentroCosto);
                    }
                    foreach (var item in lst)
                    {
                        XCONTA_Rpt014_Info info = new XCONTA_Rpt014_Info();
                        info.IdEmpresa      = item.IdEmpresa;
                        info.IdTipoCbte     = item.IdTipoCbte;
                        info.IdCbteCble     = item.IdCbteCble;
                        info.secuencia      = item.secuencia;
                        info.cb_Observacion = item.cb_Observacion;
                        info.cb_Fecha       = item.cb_Fecha;
                        info.tc_TipoCbte    = item.tc_TipoCbte;
                        info.IdCtaCble      = item.IdCtaCble;
                        info.pc_Cuenta      = item.pc_Cuenta;
                        info.IdCentroCosto  = item.IdCentroCosto;
                        info.Centro_costo   = item.Centro_costo;
                        info.dc_Valor       = item.dc_Valor;
                        info.IdGrupoCble    = item.IdGrupoCble;
                        info.gc_GrupoCble   = item.gc_GrupoCble == "" ? "Sin centro de costo" : item.gc_GrupoCble;
                        info.IdCentroCosto_sub_centro_costo = item.IdCentroCosto_sub_centro_costo;
                        info.nom_subcentro         = item.nom_subcentro;
                        info.nom_punto_cargo       = item.nom_punto_cargo;
                        info.IdPunto_cargo         = item.IdPunto_cargo;
                        info.nom_punto_cargo_grupo = item.nom_punto_cargo_grupo;
                        info.IdPunto_cargo_grupo   = item.IdPunto_cargo_grupo;
                        info.gc_Orden = item.gc_Orden;
                        Lista.Add(info);
                    }
                }
                return(Lista);
            }
            catch (Exception ex)
            {
                string mensaje = "";
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "",
                                                                                          "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }