private void btnSearch_Click(object sender, EventArgs e) { if (!chbxLocation.Checked && !chbxDate.Checked && !chbxPrice.Checked) { FFindingTour_Load(sender, e); } else { List <string> whereArgs = new List <string>(); whereArgs.Add(chbxLocation.Checked.ToString()); whereArgs.Add(tbxStartLocation.Text); whereArgs.Add(tbxDestination.Text); whereArgs.Add(chbxDate.Checked.ToString()); whereArgs.Add(dtpFromDate.Text); whereArgs.Add(dtpEndDate.Text); whereArgs.Add(chbxPrice.Checked.ToString()); whereArgs.Add(Utils.eraiseComma(tbxMinPrice.Text)); whereArgs.Add(Utils.eraiseComma(tbxMaxPrice.Text)); try { dtgListTour.DataSource = tourModel.getValidTourWhere(whereArgs); formatDtgListTour(); } catch { Utils.showErrorLoadData(Constants.ettTour); } } }