Exemplo n.º 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();
        }
Exemplo n.º 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();
        }