Exemplo n.º 1
0
        public ActionResult DocumentRead(string AttachPath)
        {
            OBKCertificateFileModel fileModel = new OBKCertificateFileModel();

            fileModel.AttachPath  = AttachPath;
            fileModel.AttachFiles = UploadHelper.GetFilesInfo(AttachPath, false);

            return(Content(JsonConvert.SerializeObject(fileModel, Formatting.Indented, new JsonSerializerSettings()
            {
                DateFormatString = "dd.MM.yyyy HH:mm"
            })));
        }
Exemplo n.º 2
0
        public ActionResult DocumentRead(Guid id)
        {
            OBK_ActReception        reception = db.OBK_ActReception.Find(id);
            OBKCertificateFileModel fileModel = new OBKCertificateFileModel();

            if (reception.AttachPath != null)
            {
                fileModel.AttachPath  = reception.AttachPath;
                fileModel.AttachFiles = UploadHelper.GetFilesInfo(fileModel.AttachPath.ToString(), false);
            }
            else
            {
                fileModel.AttachPath  = FileHelper.GetObjectPathRoot();
                fileModel.AttachFiles = UploadHelper.GetFilesInfo(fileModel.AttachPath.ToString(), false);
            }

            return(Content(JsonConvert.SerializeObject(fileModel, Formatting.Indented, new JsonSerializerSettings()
            {
                DateFormatString = "dd.MM.yyyy HH:mm"
            })));
        }