コード例 #1
0
        public ActionResult ViewRecord(string recordId, string practitionerId)
        {
            RecordFileSystem record = new RecordFileSystem();

            record.Id             = Guid.Parse(recordId);
            record.PractitionerId = Guid.Parse(practitionerId);
            PractitionerProcess process = new PractitionerProcess();
            RecordFileSystem    result  = new RecordFileSystem();

            result = process.GetRecord(record);

            if (result != null)
            {
                if (result.FileContentsString != null)
                {
                    result.FileContents = Convert.FromBase64String(result.FileContentsString);
                    FileContentResult fileResult = new FileContentResult(result.FileContents, ConstantHelper.AppSettings.RecordFileType);

                    return(fileResult);
                }

                return(new HttpNotFoundResult("Record Not Found!"));
            }
            else
            {
                return(new HttpNotFoundResult("Record Not Found!"));
            }
        }