示例#1
0
        private void bntAddnew_Click(object sender, RoutedEventArgs e)
        {
            empAddUptDialog = new EmployeeAddOrUpdateDialog(_unitofork);
            empAddUptDialog.ShowDialog();

            empwithad = _unitofork.EmployeeRepository.Get(x => x.Manager.Equals(admin.AdId) && x.Deleted.Equals(0)).ToList();
            lvDataEmployee.ItemsSource = empwithad;
            lvDataEmployee.UnselectAll();
            lvDataEmployee.Items.Refresh();
        }
示例#2
0
        private void bntUpdate_Click(object sender, RoutedEventArgs e)
        {
            if (lvDataEmployee.SelectedItem == null)
            {
                MessageBox.Show("Employee must be selected to update! Choose again!");
                return;
            }

            empAddUptDialog = new EmployeeAddOrUpdateDialog(_unitofork, emp);
            empAddUptDialog.ShowDialog();
            lvDataEmployee.UnselectAll();
            lvDataEmployee.Items.Refresh();
        }