Ejemplo n.º 1
0
        public async Task <IActionResult> Download(string file)
        {
            var thumbnail = Request.Query.ContainsKey("thumbnail");
            var bp        = new BusinessParam(_hostEnvironment);

            return(await FileFacade.GetInstance().Download(file, bp, thumbnail));
        }
Ejemplo n.º 2
0
        public ServiceResult <object> Save(FileDto dto)
        {
            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 ? FileFacade.GetInstance().Save(bp, dto) : checkAccess);
        }
Ejemplo n.º 3
0
        public ServiceResult <object> CreateFolder(FolderDto dto)
        {
            var userInfo    = _userSessionManager.GetUserInfo(dto.Ticket, Request);
            var bp          = new BusinessParam(userInfo, _hostEnvironment);
            var checkAccess = _userSessionManager.CheckAccess(bp, ClassDetails[0].Clazz, "insert");

            return(checkAccess.Done
                ? FileFacade.GetInstance().CreateFolder(bp, dto)
                : checkAccess);
        }
Ejemplo n.º 4
0
        public ServiceResult <object> GetAllExtension(Clause clause)
        {
            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
                ? FileFacade.GetInstance().GetAllExtension(bp)
                : checkAccess);
        }
Ejemplo n.º 5
0
        public ServiceResult <object> CreateFile()
        {
            var ticket      = Request.Form["ticket"];
            var userInfo    = _userSessionManager.GetUserInfo(ticket, Request);
            var bp          = new BusinessParam(userInfo, _hostEnvironment);
            var checkAccess = _userSessionManager.CheckAccess(bp, ClassDetails[0].Clazz, "insert");

            return(checkAccess.Done
                ? FileFacade.GetInstance().CreateFile(bp, Request).Result
                : checkAccess);
        }