|
|
@ -46,7 +46,7 @@ namespace BBWY.Client.Models.PackTask |
|
|
|
return; |
|
|
|
} |
|
|
|
ApiResponse<object> res = null; |
|
|
|
if (Id > 0) |
|
|
|
if (Id > 0)//修改
|
|
|
|
{ |
|
|
|
res = consumableService.Edit(new ConsuableRequest |
|
|
|
{ |
|
|
@ -80,7 +80,11 @@ namespace BBWY.Client.Models.PackTask |
|
|
|
if (res != null && res.Success) |
|
|
|
{ |
|
|
|
var win = obj as System.Windows.Window; |
|
|
|
if (ReflashDatas != null) ReflashDatas(); |
|
|
|
|
|
|
|
ViewModelLocator viewModel = new ViewModelLocator(); |
|
|
|
var con = viewModel.Consumable; |
|
|
|
con.SearchConsumable(); |
|
|
|
//if (ReflashDatas != null) ReflashDatas();
|
|
|
|
win.Close(); |
|
|
|
} |
|
|
|
else |
|
|
@ -94,6 +98,9 @@ namespace BBWY.Client.Models.PackTask |
|
|
|
var res = consumableService.Deleted(Id); |
|
|
|
if (res.Success) |
|
|
|
{ |
|
|
|
ViewModelLocator viewModel = new ViewModelLocator(); |
|
|
|
var con = viewModel.Consumable; |
|
|
|
con.SearchConsumable(); |
|
|
|
list.Remove(this); |
|
|
|
} |
|
|
|
} |
|
|
@ -102,7 +109,15 @@ namespace BBWY.Client.Models.PackTask |
|
|
|
|
|
|
|
public void EditConsumable() |
|
|
|
{ |
|
|
|
EditConsumable add = new EditConsumable(this); |
|
|
|
EditConsumable add = new EditConsumable(new ConsumableModel(consumableService) { |
|
|
|
Heigth=this.Heigth, Length=this.Length, |
|
|
|
Id=this.Id, Name=this.Name, Weigth=this.Weigth, |
|
|
|
Remark = this.Remark, |
|
|
|
Width = this.Width , |
|
|
|
Price = this.Price |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
add.Show(); |
|
|
|
} |
|
|
|
|
|
|
|