TemplateCreateVM.cs 642 B

12345678910111213141516171819202122232425262728293031
  1. 
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Text;
  5. using FastReport.Utils.Json.Serialization;
  6. namespace FastReport.Cloud.FastReport.Models
  7. {
  8. internal sealed class TemplateCreateVM : FileCreateVM
  9. {
  10. private Report _report;
  11. [JsonIgnore]
  12. public Report Report
  13. {
  14. get { return _report; }
  15. set
  16. {
  17. _report = value;
  18. var ms = new MemoryStream();
  19. _report.Save(ms);
  20. byte[] bytes = ms.ToArray();
  21. ms.Dispose();
  22. Content = bytes;
  23. }
  24. }
  25. }
  26. }