private void AttendanceView(object sender, RoutedEventArgs e) { this.Close(); var view = new AttendenceView(_employee, new AttendanceViewModel(_vm._context)); view.Show(); }
private void ViewAttendance(object sender, RoutedEventArgs e) { var index = EmployeesList.SelectedIndex; if (index != -1) { var employee = _EmployeeDict[index]; var view = new AttendenceView(employee, new AttendanceViewModel(_vm._context), 1); view.Show(); } else { MessageBox.Show("Select an Employee"); } }