private void StaffSetup() { pageName.Text = "Entity Editor - Staff Records"; bool canAccessEmployees = Staff.Can(StaffModel.Permission.AccessEmployeeData); // need get staff function dataSource = DBAccessHelper.GetStaff(canAccessEmployees); if (dataSource == null) { dataSource = new DataTable() { Columns = { { "error" }, { "no values found" } } } } ; resultDg.ItemsSource = dataSource.AsDataView(); resultDg.Visibility = form.Visibility = formEmployeeData.Visibility = deleteSelectedRecord.Visibility = saveFormChanges.Visibility = Visibility.Visible; addNewRecord.Visibility = Visibility.Collapsed; }