步步为盈
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.1 KiB

using BBWY.Client.Models;
using BBWY.Controls;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
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 BBWY.Client.Views.SealBox
{
/// <summary>
/// SplitOtherWareWindow.xaml 的交互逻辑
/// </summary>
public partial class SplitOtherWareWindow : BWindow
{
public SplitOtherWareWindow(int waitCount, WareType wareType, Action<int, WareType> SplitWare)
{
this. SplitWare = SplitWare;
WaitCount = waitCount;
WareTypeList.Remove(wareType);//移除当前落仓
InitializeComponent();
this.DataContext = this;
}
private Action<int, WareType> SplitWare { get;set;}
private int waitCount;
public int WaitCount { get => waitCount; set { Set(ref waitCount, value); } }
private int count;
public int Count { get => count; set { Set(ref count, value); } }
private WareType selectWareType;
public WareType SelectWareType { get => selectWareType; set { Set(ref selectWareType, value); } }
private ObservableCollection<WareType> wareTypeList=new ObservableCollection<WareType> {
WareType., WareType., WareType., WareType.
};
public ObservableCollection<WareType> WareTypeList { get => wareTypeList; set { Set(ref wareTypeList, value); } }
private void BButton_Click(object sender, RoutedEventArgs e)
{
if (WaitCount< Count)
{
MessageBox.Show("可分配量不足!");
return;
}
if (SplitWare != null) SplitWare(Count, SelectWareType);
this.Close();
}
private void BButton_Click_1(object sender, RoutedEventArgs e)
{
Count = WaitCount;
}
}
}