private void Execute_Reset(object obj) { var p = (SfDataGrid)obj; p.SearchHelper.ClearSearch(); var res = cusRepository.GetAll(); CusList.Clear(); res.Distinct().ToList().ForEach(i => _cusList.Add(i)); }
private void Execute_DelCus(object obj) { MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Are you sure?", "Confirmation", System.Windows.MessageBoxButton.YesNo, MessageBoxImage.Question); if (messageBoxResult == MessageBoxResult.Yes) { var p = (customer)obj; cusRepository.Delete(p); var res = cusRepository.GetAll(); CusList.Clear(); res.Distinct().ToList().ForEach(i => _cusList.Add(i)); System.Windows.Forms.MessageBox.Show("Successfully updated", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); } }