68 lines
2.2 KiB
C#
68 lines
2.2 KiB
C#
using AllBase;
|
|
using AllBase.Extension;
|
|
using AllBase.Model;
|
|
using NaiBa.Util.Extension;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
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.Shapes;
|
|
|
|
namespace _29WxOrderWpf.OrderCtrls
|
|
{
|
|
/// <summary>
|
|
/// OrderListWindow.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class OrderListWindow : UserControl
|
|
{
|
|
public ObservableCollection<oms_wei_order_info> lstOrder { get; set; } = new ObservableCollection<oms_wei_order_info>();
|
|
public List<oms_wei_order_info> lstOrder1 { get; set; } = new List<oms_wei_order_info>();
|
|
|
|
|
|
public OrderListWindow()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void Window_Loaded(object sender, RoutedEventArgs e)
|
|
{
|
|
//MyData newItem = new MyData { Name = "New Person", Age = 28 }; // 创建新数据项
|
|
//_myDataCollection.Add(newItem); // 添加到集合中
|
|
//dataGrid.Items.Refresh();.
|
|
//dgOrder.Items.Add(1111111);
|
|
|
|
dgOrder.ItemsSource = lstOrder;
|
|
|
|
lbxOrder.ItemsSource = lstOrder;
|
|
for (int i = 0; i < 10000; i++)
|
|
{
|
|
//lstOrder.Add(new oms_wei_order_info() { id = 1, is_select = false, order_id = ("3737033423685556736".ParseToLong() + Randomx.GetId(0,100)).ParseToString(), shop_name = "媛卡曦工厂优选" });
|
|
lstOrder.Add(new oms_wei_order_info() { id = 1, is_select = false, order_id = Randomx.GetId(1000, 10000).ParseToString(), shop_name = "媛卡曦工厂优选" });
|
|
}
|
|
lstOrder.SortDesc(o => o.order_id.ParseToLong());
|
|
|
|
}
|
|
|
|
private void Path_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
|
{
|
|
var orderId = ((sender as Border)?.Tag).ParseToString();
|
|
try
|
|
{
|
|
Clipboard.SetText(orderId);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
}
|