using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Collections.ObjectModel; using BPASmartClient.Helper; namespace BPASmartClient.CustomResource.Pages.Model { public class ReportHelper { public ObservableCollection Reports { get; set; } = new ObservableCollection(); public void Add(ReportBase report) { Reports.Add(report); } public void Save(string name) { DataRecord record = new DataRecord(); record.Save(Reports, name); } public void Dispos() { Reports.Clear(); } public ObservableCollection GetData(string path) { DataRecord record = new DataRecord(); return record.Read>(path); } } //public class ReportHelper //{ // private volatile static ReportHelper _Instance; // public static ReportHelper GetInstance => _Instance ?? (_Instance = new ReportHelper()); // private ReportHelper() { } // public object GetData(string path) // { // DataRecord record = new DataRecord(); // return record.Read(path); // } //} }