private void DeleteCustomer(object p) { CustomerModel customer = (CustomerModel)p; List <CustomerModel> customerModels = Customers.ToList(); customerModels.Remove(customer); Customers = customerModels.ToArray(); customer.Delete(dbAccess); }
public override void OnExecute(object sender, ExecutedRoutedEventArgs e) { CustomerModel customerModel = _viewModel.SelectedCustomerModel; if (customerModel.Delete() > 0) { _viewModel.Customers.Remove(customerModel); } }
public String Delete() { String message = ""; if (Valid()) { message = _custmodel.Delete(); } else { message = "Pengisian data kurang lengkap"; } return(message); }