public void CreateObjectFromOwner(ApplicationException _ApplicationException, Services.Packages.Security.ModelUser _Owner, string SessionToken)
        {
            ModelSession session = ApplicationExceptionSecureService.CheckSessionImp(SessionToken);

            //if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_Owner, SessionToken, "Create ApplicationExceptionOwning"))
            //	throw new UnauthorizedAccessException("Access Denied");

            _ApplicationException.Reload();

            if (!_ApplicationException.Exists && !Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_Owner, SessionToken, "Create ApplicationExceptionOwning"))
                throw new UnauthorizedAccessException("Access Denied");
            else if (_ApplicationException.Exists && !ApplicationExceptionSecureService.CheckAccessImp(_ApplicationException, SessionToken, "Update"))
                throw new UnauthorizedAccessException("Access Denied");

            _ApplicationException.Owner = session.User;
            _ApplicationException.Owner = _Owner;
            _ApplicationException.Create();
        }
        public void CreateObjectFromParentException(ApplicationException _ApplicationException, Services.Packages.Log.ApplicationException _ParentException, string SessionToken)
        {
            ModelSession session = ApplicationExceptionSecureService.CheckSessionImp(SessionToken);

            //if (!Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ParentException, SessionToken, "Create InnerExceptions"))
            //	throw new UnauthorizedAccessException("Access Denied");

            _ApplicationException.Reload();

            if (!_ApplicationException.Exists && !Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ParentException, SessionToken, "Create InnerExceptions"))
                throw new UnauthorizedAccessException("Access Denied");
            else if (_ApplicationException.Exists && !ApplicationExceptionSecureService.CheckAccessImp(_ApplicationException, SessionToken, "Update"))
                throw new UnauthorizedAccessException("Access Denied");

            _ApplicationException.Owner = session.User;
            _ApplicationException.ParentException = _ParentException;
            _ApplicationException.Create();
        }
        public void CreateObject(ApplicationException _ApplicationException, string SessionToken)
        {
            ModelSession session = ApplicationExceptionSecureService.CheckSessionImp(SessionToken);

            if (!ApplicationExceptionSecureService.CheckUserRightsImp(session.User.Name, "Create " + typeof(ApplicationException).FullName))
                throw new UnauthorizedAccessException("Access Denied");

            _ApplicationException.Owner = session.User;
            _ApplicationException.Create();
        }