From d577ffa73beaf0a52073f4268ac90c751d7908d5 Mon Sep 17 00:00:00 2001 From: xxe Date: Fri, 9 Sep 2022 10:39:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E8=B4=B9=E7=BB=88=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HKCardOUT/Logic/Service/HKCore.cs | 2 +- HKCardOUT/ViewModels/RootViewModel.cs | 11 ++-- HKCardOUT/Views/RootView.xaml | 73 ++++++++++++++++++++------- 3 files changed, 61 insertions(+), 25 deletions(-) diff --git a/HKCardOUT/Logic/Service/HKCore.cs b/HKCardOUT/Logic/Service/HKCore.cs index 82fc257..346712f 100644 --- a/HKCardOUT/Logic/Service/HKCore.cs +++ b/HKCardOUT/Logic/Service/HKCore.cs @@ -42,7 +42,7 @@ namespace HKCardOUT.Logic.Service return DbContext.Context.Queryable() .Where(t => t.CreateTime >= Begin) .Where(t => t.CreateTime < End) - .OrderByDescending(t => t.CreateTime).ToPageList(0, 10); + .OrderByDescending(t => t.CreateTime).ToPageList(0, 100); } } } diff --git a/HKCardOUT/ViewModels/RootViewModel.cs b/HKCardOUT/ViewModels/RootViewModel.cs index 061698b..76ba912 100644 --- a/HKCardOUT/ViewModels/RootViewModel.cs +++ b/HKCardOUT/ViewModels/RootViewModel.cs @@ -21,12 +21,11 @@ namespace HKCardOUT.ViewModels protected override void OnViewLoaded() { - Result = new ObservableCollection(this.Container.Get().PullDaySaleLog()); - //ThreadManage.GetInstance().Start(() => - //{ - // Result = new ObservableCollection(this.Container.Get().PullDaySaleLog()); - // Thread.Sleep(3000); - //}, "消费记录查询"); + ThreadManage.GetInstance().Start(() => + { + Result = new ObservableCollection(this.Container.Get().PullDaySaleLog()); + Thread.Sleep(3000); + }, "消费记录查询"); } #region 属性 diff --git a/HKCardOUT/Views/RootView.xaml b/HKCardOUT/Views/RootView.xaml index 43a5997..400110f 100644 --- a/HKCardOUT/Views/RootView.xaml +++ b/HKCardOUT/Views/RootView.xaml @@ -11,32 +11,69 @@ ShowMaxButton="False" ShowMinButton="False" ShowTitle="True" - Topmost="True" WindowStartupLocation="CenterScreen" WindowState="Maximized" mc:Ignorable="d"> + + + + - - - - + IsReadOnly="True" + ItemsSource="{Binding Result}" + Style="{StaticResource DataGridBaseStyle}"> + + + + + + + + +