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"
            })));
        }
Exemple #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"
            })));
        }