示例#1
0
        private void DeleteCustomer(object p)
        {
            CustomerModel        customer       = (CustomerModel)p;
            List <CustomerModel> customerModels = Customers.ToList();

            customerModels.Remove(customer);
            Customers = customerModels.ToArray();
            customer.Delete(dbAccess);
        }
示例#2
0
            public override void OnExecute(object sender, ExecutedRoutedEventArgs e)
            {
                CustomerModel customerModel = _viewModel.SelectedCustomerModel;

                if (customerModel.Delete() > 0)
                {
                    _viewModel.Customers.Remove(customerModel);
                }
            }
示例#3
0
        public String Delete()
        {
            String message = "";

            if (Valid())
            {
                message = _custmodel.Delete();
            }
            else
            {
                message = "Pengisian data kurang lengkap";
            }

            return(message);
        }