Beispiel #1
0
        public List <PermisoXElementosObjBE> getElementsObjectsXIdObj(long IdPermisosXObj, Int64 App)
        {
            linqIELDataBaseDataContext    dboSegLatino         = new linqIELDataBaseDataContext();
            List <PermisoXElementosObjBE> PermisoXElementosObj = new List <PermisoXElementosObjBE>();

            try
            {
                Int64 iApp        = App;
                var   lnqConsulta = dboSegLatino.sp_getElementsObjectsXIdObj(IdPermisosXObj);
                foreach (var a in lnqConsulta)
                {
                    PermisoXElementosObjBE Permiso = new PermisoXElementosObjBE();
                    Permiso.IDELEMENTOSXOBJ = a.IDELEMENTOSXOBJ;
                    Permiso.IDPERMISOSOBJ   = a.IDPERMISOSOBJ ?? 0;
                    Permiso.ELEMENTO        = a.ELEMENTO;
                    Permiso.TOOLTIP         = a.TOOLTIP;
                    Permiso.ACTIVO          = a.ACTIVO ?? false;
                    PermisoXElementosObj.Add(Permiso);
                }
                return(PermisoXElementosObj);
            }
            catch (Exception ex)
            {
                StackTrace st      = new StackTrace(true);
                CommonDA   ComunDA = new CommonDA();
                ComunDA.insErrorDB("Error: " + ex.Message + " En El Metodo: " + MethodBase.GetCurrentMethod().Name, st, "", App.ToString());
                throw new Exception(ex.Message);
            }
        }