private void btnSearchByYear_Click(object sender, RoutedEventArgs e) { int year = int.Parse(txtSearch.Text); dgLeaveAproveReject.DataContext = leaveBLL.LeaveSearchByYearBLL(year, EmployeeEntity.EmployeeID); }