|
|
@ -17,14 +17,17 @@ namespace BBWY.Client.ViewModels |
|
|
|
private PurchaseService purchaseService; |
|
|
|
private GlobalContext globalContext; |
|
|
|
private Order order; |
|
|
|
private bool noPurchaser; |
|
|
|
|
|
|
|
public IList<Purchaser> PurchaserList { get; set; } |
|
|
|
|
|
|
|
public bool NoPurchaser { get => noPurchaser; set { Set(ref noPurchaser, value); } } |
|
|
|
|
|
|
|
//public ICommand DeleteCommand { get; set; }
|
|
|
|
//public ICommand EditCommand { get; set; }
|
|
|
|
public ICommand PreviewPurchaseCommand { get; set; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ChoosePurchaseSchemeViewModel(PurchaseService purchaseService, GlobalContext globalContext) |
|
|
|
{ |
|
|
|
this.purchaseService = purchaseService; |
|
|
@ -44,6 +47,7 @@ namespace BBWY.Client.ViewModels |
|
|
|
protected override void Unload() |
|
|
|
{ |
|
|
|
this.order = null; |
|
|
|
this.NoPurchaser = false; |
|
|
|
PurchaserList.Clear(); |
|
|
|
} |
|
|
|
|
|
|
@ -65,6 +69,7 @@ namespace BBWY.Client.ViewModels |
|
|
|
App.Current.Dispatcher.Invoke(() => |
|
|
|
{ |
|
|
|
foreach (var p in purchaserResponse.Data) PurchaserList.Add(p); |
|
|
|
NoPurchaser = PurchaserList.Count() == 0; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|