private void btnShowAll_Click(object sender, EventArgs e) { AppointmentDataGridView.Columns.Clear(); DrAppointmentClass grid = new DrAppointmentClass(); DataTable dt = grid.GetAll(); if (dt == null) { AppointmentDataGridView.Columns.Clear(); } else { AppointmentDataGridView.DataSource = dt; } }
private void ShowByDate() { AppointmentDataGridView.Columns.Clear(); DrAppointmentClass grid = new DrAppointmentClass(); DataTable dt = grid.Get(); if (dt == null) { AppointmentDataGridView.Columns.Clear(); } else { AppointmentDataGridView.DataSource = dt; } }