예제 #1
0
        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();
                }
            }
        }
예제 #2
0
        public void DeleteSaleOrder(SaleOrderContract saleOrderContract)
        {
            var saleorder = ISaleOrderRepository.Get(saleOrderContract.Id);

            ISaleOrderRepository.Delete(saleorder);
        }
예제 #3
0
        public void Delete(SaleOrderContract saleOrderContract)
        {
            var SaleOrderContract = ISaleOrderRepository.Get(saleOrderContract.Id);

            ISaleOrderRepository.Delete(SaleOrderContract);
        }