예제 #1
0
        private void bntAddnew_Click(object sender, RoutedEventArgs e)
        {
            _cusAddOrUpdate = new CustomerAddOrUpdateDialog(_unitofwork, null);
            _cusAddOrUpdate.ShowDialog();

            allcus = _unitofwork.CustomerRepository.Get(x => x.Deleted.Equals(0)).ToList();
            lvDataCustomer.ItemsSource = allcus;
            lvDataCustomer.UnselectAll();
            lvDataCustomer.Items.Refresh();
        }
예제 #2
0
        private void bntUpdate_Click(object sender, RoutedEventArgs e)
        {
            if (lvDataCustomer.SelectedItem == null)
            {
                MessageBox.Show("Custoer must be selected to update! Choose again!");
                return;
            }

            _cusAddOrUpdate = new CustomerAddOrUpdateDialog(_unitofwork, ctm);
            _cusAddOrUpdate.ShowDialog();
            lvDataCustomer.UnselectAll();
            lvDataCustomer.Items.Refresh();
        }