private void btnDateSearch_Click(object sender, EventArgs e) { bool rbtStart; if (rbtPlannedStart.Checked == true) { rbtStart = true; } else { rbtStart = false; } DateTime date = dtpSearchDate.Value.Date; dgvProjectList.DataSource = _proBLL.DateSearch(date, rbtStart); }