统计页面增加订单详情页
This commit is contained in:
1 parent
545a0751c8
commit
b0ec6ef3ea
9 files changed
+484
-83
No files matched your search
@@ -0,0 +1,50 @@
|
||||
using _29WxOrderWpf.Ctrls.Statistics.Models;
|
||||
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;
|
||||
|
||||
namespace _29WxOrderWpf.Ctrls.Statistics;
|
||||
|
||||
/// <summary>
|
||||
/// ShowOrderDialogView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ShowOrderDialogView : UserControl
|
||||
{
|
||||
public ShowOrderDialogView(List<ShopRevenueStatisticsRow> list)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = new ShowOrderDialogViewModel(list);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 复制订单号到剪贴板
|
||||
/// </summary>
|
||||
private void CopyOrderId_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is FrameworkElement element
|
||||
&& element.DataContext is ShopRevenueStatisticsRow row
|
||||
&& !string.IsNullOrEmpty(row.OrderId))
|
||||
{
|
||||
Clipboard.SetText(row.OrderId);
|
||||
}
|
||||
}
|
||||
}
|
||||
class ShowOrderDialogViewModel
|
||||
{
|
||||
public List<ShopRevenueStatisticsRow> Data { get; set; }
|
||||
public ShowOrderDialogViewModel(List<ShopRevenueStatisticsRow> list)
|
||||
{
|
||||
Data = list ?? new List<ShopRevenueStatisticsRow>();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user