步步为盈
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.

70 lines
2.0 KiB

2 years ago
using BBWY.Client.APIServices;
using BBWY.Client.Models.PackTask;
using BBWY.Controls;
using System;
using System.Collections.Generic;
2 years ago
using System.IO.Packaging;
2 years ago
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 BBWY.Client.Views.StorePickSelf
{
/// <summary>
/// StorePickProductWindow.xaml 的交互逻辑
/// </summary>
public partial class StorePickProductWindow : BWindow
{
2 years ago
public StorePickProductWindow(StoreGetSelfResponse model, Func<int, string, bool> SaveData,bool _isQuality)
2 years ago
{
2 years ago
this. SaveData=SaveData;
StoreGetSelfResponse =model;
2 years ago
InitializeComponent();
this.DataContext = this;
2 years ago
IsQuality = _isQuality;
2 years ago
}
2 years ago
private bool isQuality;
public bool IsQuality { get => isQuality; set { Set(ref isQuality, value); } }
2 years ago
private string userName;
/// <summary>
/// 用户名
/// </summary>
public string UserName { get => userName; set { Set(ref userName, value); } }
private int count;
public int Count { get => count; set { Set(ref count, value); } }
private StoreGetSelfResponse storeGetSelfResponse;
public StoreGetSelfResponse StoreGetSelfResponse { get=> storeGetSelfResponse; set {Set(ref storeGetSelfResponse,value); } }
private void BButton_Click(object sender, RoutedEventArgs e)
{
2 years ago
if (SaveData != null&& SaveData(Count, UserName))
{
this.Close();
}
2 years ago
}
2 years ago
private Func<int, string,bool> SaveData { get; set; }
2 years ago
private void BButton_Click_1(object sender, RoutedEventArgs e)
{
Count = StoreGetSelfResponse.PickMaxCount;
}
}
}