public UnitDeleteResponse Execute(UnitDeleteRequest request) { UnitDeleteResponse unitDeleteResponse = new UnitDeleteResponse(); ServiceHelper.LoadService <IProductionService>().DeleteUnit(ServiceHelper.LoadService <IProductionService>().GetUnit(request.UnitDID)); return(unitDeleteResponse); }
private void DeleteUnit(UnitModel model) { if (MessageBox.Show("确认删除该部件吗?", "提示", MessageBoxButton.OKCancel) != MessageBoxResult.OK) { return; } UnitDeleteResponse unitDeleteResponse = LocalApi.Execute(new UnitDeleteRequest() { UnitDID = model.UnitDID }); this.RefreshData(); }