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.
79 lines
2.2 KiB
79 lines
2.2 KiB
using BBWYB.Client.Models;
|
|
using BBWYB.Client.Models.APIModel.Response.PackPurchaseTask;
|
|
using BBWYB.Client.ViewModels;
|
|
using BBWYB.Client.Views.Ware;
|
|
using BBWYB.Client.Views.WebB;
|
|
using CommunityToolkit.Mvvm.Messaging;
|
|
using CommunityToolkit.Mvvm.Messaging.Messages;
|
|
using SJ.Controls;
|
|
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.Shapes;
|
|
|
|
namespace BBWYB.Client.Views.PackPurchaseTaska
|
|
{
|
|
/// <summary>
|
|
/// UpdatePurchaseTaskWindow.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class UpdatePurchaseTaskWindow : BWindow
|
|
{
|
|
public UpdatePurchaseTaskWindow(PackTaskResponse packTaskResponse, string shopname, OrderSku order, Action ReflashWindow = null)
|
|
{
|
|
InitializeComponent();
|
|
|
|
var updatePackTask = (this.DataContext as UpdatePurchaseTaskViewModel);
|
|
var show = updatePackTask.SearchSku(packTaskResponse, shopname, order);
|
|
if (!show) { this.Close(); IsClosed = true; }
|
|
|
|
if (ReflashWindow != null)
|
|
updatePackTask.ReflashWindow = ReflashWindow;
|
|
|
|
|
|
//this.Loaded += UpdatePurchaseTaskWindow_Loaded;
|
|
//this.Unloaded += UpdatePurchaseTaskWindow_Unloaded;
|
|
}
|
|
|
|
|
|
public bool IsClosed { get; set; }=false;
|
|
|
|
|
|
private void UpdatePurchaseTaskWindow_Unloaded(object sender, RoutedEventArgs e)
|
|
{
|
|
WeakReferenceMessenger.Default.Unregister<Message_BindingUpdatePurchaseTaskClose>(this);
|
|
}
|
|
|
|
private void UpdatePurchaseTaskWindow_Loaded(object sender, RoutedEventArgs e)
|
|
{
|
|
|
|
WeakReferenceMessenger.Default.Register<Message_BindingUpdatePurchaseTaskClose>(this, (o, r) =>
|
|
{
|
|
this.DialogResult = r.Value;
|
|
this.Close();
|
|
});
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
public class Message_BindingUpdatePurchaseTaskClose : ValueChangedMessage<bool>
|
|
{
|
|
public Message_BindingUpdatePurchaseTaskClose(bool value) : base(value)
|
|
{
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|