public void BindHistory() { if (ddlSyncDate.SelectedIndex <= 0) { chkHistory.Checked = false; btnDownloadSelected.Visible = true; return; } try { int is_Fetch_Count = ucCustomPagerProgram_List.isCountRecord; DateTime?HISDate = Convert.ToDateTime(ddlSyncDate.SelectedValue); DataSet ds_ProgramList_Scheduled = BLL_LMS_Training.GET_Programs_To_Sync_His(ucCustomPagerProgram_List.CurrentPageIndex, ucCustomPagerProgram_List.PageSize, HISDate, ref is_Fetch_Count); gvProgram_ListDetails.DataSource = ds_ProgramList_Scheduled.Tables[0]; gvProgram_ListDetails.DataBind(); ucCustomPagerProgram_List.CountTotalRec = is_Fetch_Count.ToString(); ucCustomPagerProgram_List.BuildPager(); } catch (Exception) { chkHistory.Checked = false; btnDownloadSelected.Visible = true; return; } }