using Muchinfo.MTPClient.Data.Model.Sale; using Muchinfo.MTPClient.Sale.ViewModels; using System.Collections.Generic; using System.Windows; using System.Windows.Input; namespace Muchinfo.MTPClient.Sale.Views { /// /// SaleOrderFrame.xaml 的交互逻辑 /// public partial class SaleOrderFrame : Window { public SaleOrderFrame(SaleGoods saleGoods ) { InitializeComponent(); this.DataContext = new SaleOrderViewModel(saleGoods); } private void Window_MouseDown(object sender, MouseButtonEventArgs e) { if (e.LeftButton == MouseButtonState.Pressed) { DragMove(); } } private void btnClose_Click(object sender, RoutedEventArgs e) { this.Close(); } private void DecimalUpDown_KeyDown(object sender, KeyEventArgs e) { if ((e.Key >= Key.NumPad0 && e.Key <= Key.NumPad9) || (e.Key >= Key.D0 && e.Key <= Key.D9)) { e.Handled = false; } else { e.Handled = true; } } } }