private void btnBudget_Click(object sender, EventArgs e) { decimal budget = Convert.ToDecimal(txtBudget.Text); houselist = admin.Searched_by_maximum_price(admin.Search_All_Houses(), budget); if (houselist.Count() != 0) { gridAll.DataSource = houselist; } else { MessageBox.Show("There is no result with the condition", "NO RESULT", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }