Save and load report PDF data to json

This commit is contained in:
2026-02-16 18:39:19 +09:00
parent 833e97fbea
commit b4d09c0d8b
5 changed files with 131 additions and 30 deletions
+21 -5
View File
@@ -12,14 +12,18 @@ namespace ReceiptPDFBuilder.Models;
class PDFReport : ChangeNotifier
{
private string _baseFolder;
private string _name;
private string _title;
private List<ReportFile> _files;
private DateTime _lastSaved;
private DateTime? _lastGenerated;
public PDFReport()
{
_baseFolder = "";
_name = "";
_title = "";
_files = [];
_lastSaved = DateTime.Now;
_lastGenerated = null;
}
public string BaseFolder
@@ -28,10 +32,10 @@ class PDFReport : ChangeNotifier
set { _baseFolder = value; NotifyPropertyChanged(); }
}
public string Name
public string Title
{
get => _name;
set { _name = value; NotifyPropertyChanged(); }
get => _title;
set { _title = value; NotifyPropertyChanged(); }
}
public List<ReportFile> Files
@@ -39,4 +43,16 @@ class PDFReport : ChangeNotifier
get => _files;
set { _files = value; NotifyPropertyChanged(); }
}
public DateTime LastSaved
{
get => _lastSaved;
set { _lastSaved = value; NotifyPropertyChanged(); }
}
public DateTime? LastGenerated
{
get => _lastGenerated;
set { _lastGenerated = value; NotifyPropertyChanged(); }
}
}