发票助手修改,增加时间范围,增加上次读取历史,修复bug
This commit is contained in:
1 parent
b42c17c013
commit
9e62672013
8 files changed
+729
-218
No files matched your search
@@ -0,0 +1,64 @@
|
||||
using _29WxOrderWpf.Commands;
|
||||
using _29WxOrderWpf.Ctrls.PDDInvoice.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using WPFCommon.Models;
|
||||
using static Org.BouncyCastle.Math.EC.ECCurve;
|
||||
|
||||
namespace _29WxOrderWpf.Ctrls.PDDInvoice;
|
||||
|
||||
/// <summary>
|
||||
/// PDDInvoiceDialog.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class PDDInvoiceDialog : UserControl
|
||||
{
|
||||
public PDDInvoiceDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = this;
|
||||
Config = NaiBa.Util.Helper.ConfigHelper.LoadConfig<InvoiceConfig>(ConfigPath);
|
||||
}
|
||||
|
||||
private void PDDInvoiceDialog_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void ViewModel_RequestClose()
|
||||
{
|
||||
Window parentWindow = Window.GetWindow(this);
|
||||
if (this.IsLoaded && parentWindow != null)
|
||||
parentWindow.Close();
|
||||
}
|
||||
|
||||
|
||||
private const string ConfigPath = "./invoice.config";
|
||||
public InvoiceConfig Config { get; }
|
||||
|
||||
public ICommand ConfirmCommand => new DelegateCommand(Confirm);
|
||||
|
||||
private void Confirm()
|
||||
{
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig(ConfigPath, Config);
|
||||
ViewModel_RequestClose();
|
||||
}
|
||||
public ICommand CancelCommand => new DelegateCommand(Cancel);
|
||||
|
||||
private void Cancel()
|
||||
{
|
||||
ViewModel_RequestClose();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user