private void searchButton_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(fromPriceTextBox.Text)) { MessageBox.Show("Enter 1st price"); return; } if (String.IsNullOrEmpty(toPriceTextBox.Text)) { MessageBox.Show("Enter 2nd price"); return; } List <Mobile> mobiles = _mobileManager.GetByPriceRange(fromPriceTextBox.Text, toPriceTextBox.Text); if (mobiles != null) { mobileDataGridView.DataSource = mobiles; SL(); // return; } else { MessageBox.Show("No data found"); return; } }