Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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);
            }
        }