Esempio n. 1
0
        public ActionResult DocumentView(long uri)
        {
            Logger.Info($"Document View");
            var file = DocManagerHelper.GetDocumentForView(uri, AppUserState.UserName, AppUserState.Wgs, AppUserState.Ds, AppUserState.UserId);
            var conn = new InforConnection(tu: _tu, tup: _tup);
            var rec  = (InforRecord)conn.GetRecordWeb(uri, AppUserState.UserName, AppUserState.Wgs, AppUserState.Ds);
            var hvm  = new FileViewModel
            {
                Edit         = false,
                ErrorDisplay = ErrorDisplay,
                AppUserState = AppUserState,
                RecordNumber = rec.RecordNumber,
                Title        = rec.Title,
                FileModel    = new FileModel
                {
                    TypeDesktop  = true,
                    FileName     = file,
                    AppUserState = AppUserState,
                    RecordUri    = rec.Uri
                },
                Uri = uri
            };

            Logger.Info($"{hvm.FileModel.FileUri}");
            Logger.Info($"{hvm.FileModel.Key}");
            Logger.Info($"{hvm.FileModel.DocumentType}");
            return(PartialView("_DocumentView", hvm));
        }