Example #1
0
        public ServiceResult <object> AutocompleteView(Clause clause)
        {
            var userInfo    = _userSessionManager.GetUserInfo(clause.Ticket, Request);
            var bp          = new BusinessParam(userInfo, clause);
            var checkAccess = _userSessionManager.CheckAccess(bp, ClassDetails[0].Clazz, "autocomplete");

            return(checkAccess.Done
                ? UseCaseFacade.GetInstance().AutocompleteView(bp)
                : checkAccess);
        }
Example #2
0
        public ServiceResult <object> GetTotalUseCase(Clause clause, bool getAllData, string term, string pageNumber)
        {
            var userInfo    = _userSessionManager.GetUserInfo(clause.Ticket, Request);
            var bp          = new BusinessParam(userInfo, clause);
            var checkAccess = _userSessionManager.CheckAccess(bp, ClassDetails[0].Clazz, "gridView");

            return(checkAccess.Done
                ? UseCaseFacade.GetInstance().GetTotalUseCase(bp, getAllData, term, pageNumber)
                : checkAccess);
        }
Example #3
0
        public ServiceResult <object> Save()
        {
            var dtoFromRequest = UseCaseFacade.GetInstance().GetDtoFromRequest(HttpContext.Request);

            if (!dtoFromRequest.Done)
            {
                return(dtoFromRequest);
            }
            var dto         = (UseCaseDto)dtoFromRequest.Result;
            var userInfo    = _userSessionManager.GetUserInfo(dto.Ticket, Request);
            var bp          = new BusinessParam(userInfo);
            var checkAccess = _userSessionManager.CheckAccess(bp, ClassDetails[0].Clazz,
                                                              dto.EntityId == 0 ? "insert" : "update");

            return(checkAccess.Done ? UseCaseFacade.GetInstance().Save(bp, dto) : checkAccess);
        }