private void ButDeleteSaleOrder_Click(object sender, RoutedEventArgs e) { var saleOrder = GridSaleOrders.SelectedItem as DataModel.Model.SaleOrder; if (saleOrder != null) { if (saleOrder.SaleOrderStatus == (byte)DataType.SaleOrderStatus.Balanced) { MessageBox.Show("已结算,不能删除!", SmallHoneybee.Wpf.Properties.Resources.SystemName, MessageBoxButton.OK, MessageBoxImage.Warning); } else { _saleOrders.Remove(saleOrder); _saleOrderRepository.Delete(saleOrder); _unitOfWork.Commit(); } } }
public void DeleteSaleOrder(SaleOrderContract saleOrderContract) { var saleorder = ISaleOrderRepository.Get(saleOrderContract.Id); ISaleOrderRepository.Delete(saleorder); }
public void Delete(SaleOrderContract saleOrderContract) { var SaleOrderContract = ISaleOrderRepository.Get(saleOrderContract.Id); ISaleOrderRepository.Delete(SaleOrderContract); }