private void AttendanceByMonth_Search_Click(object sender, RoutedEventArgs e) { try { int ProjectID = int.Parse(txtPId.Text); int Month = int.Parse(txtMonth.Text); dgProjectAttendance.DataContext = attendanceBLL.LoadGridPAMBLL(ProjectID, Month, LoginEntity.UserID); } catch (Exception ex) { Console.WriteLine(ex.Message); } }