public List <cp_codigo_SRI_x_CtaCble_Info> Get_codigo_SRI_x_CtaCble()
 {
     try
     {
         List <cp_codigo_SRI_x_CtaCble_Info> lm = new List <cp_codigo_SRI_x_CtaCble_Info>();
         EntitiesCuentasxPagar CodSRIxCC        = new EntitiesCuentasxPagar();
         var q = from A in CodSRIxCC.vwcp_codigo_SRI_x_ctaCble
                 select A;
         tb_Empresa_Data        emp          = new tb_Empresa_Data();
         List <tb_Empresa_Info> listaEmpresa = new List <tb_Empresa_Info>();
         listaEmpresa = emp.Get_List_Empresa();
         foreach (var item in q)
         {
             cp_codigo_SRI_x_CtaCble_Info info = new cp_codigo_SRI_x_CtaCble_Info();
             info.IdEmpresa = item.IdEmpresa;
             info.Empresa   = (from x in listaEmpresa
                               where x.IdEmpresa == item.IdEmpresa
                               select x.em_nombre).ToString();
             info.idCodigo_SRI = item.idCodigo_SRI;
             info.IdCtaCble    = item.IdCtaCble;
             info.pc_Cuenta    = item.pc_Cuenta;
             lm.Add(info);
         }
         return(lm);
     }
     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.ToString() + " " + ex.Message;
         throw new Exception(ex.ToString());
     }
 }
Пример #2
0
 public List <tb_Empresa_Info> Get_List_Empresa(List <int> List_Empresa)
 {
     try
     {
         tb_Empresa_Data        EmD = new tb_Empresa_Data();
         List <tb_Empresa_Info> le  = new List <tb_Empresa_Info>();
         le = EmD.Get_List_Empresa(List_Empresa);
         return(le);
     }
     catch (Exception ex)
     {
         Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message);
         throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "ObtenerlistEmpresa", ex.Message), ex)
               {
                   EntityType = typeof(tb_Empresa_Bus)
               };
     }
 }
 public cp_codigo_SRI_x_CtaCble_Info GetInfo_codigo_SRI_x_CtaCble(int IdEmpresa, int IdCodigo_SRI)
 {
     try
     {
         cp_codigo_SRI_x_CtaCble_Info info      = new cp_codigo_SRI_x_CtaCble_Info();
         EntitiesCuentasxPagar        CodSRIxCC = new EntitiesCuentasxPagar();
         var q = from A in CodSRIxCC.cp_codigo_SRI_x_CtaCble
                 where A.IdEmpresa == IdEmpresa &&
                 A.idCodigo_SRI == IdCodigo_SRI
                 select A;
         tb_Empresa_Data        emp          = new tb_Empresa_Data();
         List <tb_Empresa_Info> listaEmpresa = new List <tb_Empresa_Info>();
         listaEmpresa = emp.Get_List_Empresa();
         foreach (var item in q)
         {
             info.IdEmpresa = item.IdEmpresa;
             info.Empresa   = (from x in listaEmpresa
                               where x.IdEmpresa == item.IdEmpresa
                               select x.em_nombre).ToString();
             info.idCodigo_SRI = item.idCodigo_SRI;
             info.IdCtaCble    = item.IdCtaCble;
             info.nom_pc       = item.nom_pc;
             info.ip           = item.ip;
             info.idUsuario    = item.idUsuario;
             info.fecha_UltMod = item.fecha_UltMod;
         }
         return(info);
     }
     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.ToString() + " " + ex.Message;
         throw new Exception(ex.ToString());
     }
 }