Passing parameters to a query
You can take advantage of C#'s variable parameter arguments (keyword params). Like this -

public DataSet GetDataSource(string fillBy, string server, params KeyValuePair&lt;String, Object&gt;[] parameters)
    {
        string query = GetQuery[fillBy];
        SqlConnection connection = new SqlConnection();
        connection.ConnectionString = GetSqlConnection[server];
        SqlDataAdapter adapter = new SqlDataAdapter(query, connection);
        foreach (KeyValuePair&lt;String, Object&gt; p in parameters)
        {
            adapter.SelectCommand.Parameters.AddWithValue("@" + p.Key, (p.Value.ToString().Length == 0) ? DBNull.Value : p.Value);
        }
        DataSet dataSet = new DataSet();
        dataSet.Tables.Add(new DataTable());
        adapter.Fill(dataSet.Tables[0]);
        return dataSet;
    }


params is the keyword to use for taking variable numbers of arguments. Then you can just call it with variable arguments like -

   dataGridView.DataSource = dataSource.GetDataSource(fillBy, server, 
        new KeyValuePair&lt;string, object&gt;("findBy",findByTextBox.Text) 
        ).Tables[0];


and in another time you can call same function with - 

   dataGridView.DataSource = dataSource.GetDataSource(fillBy, server, 
            new KeyValuePair&lt;string, object&gt;("findBy",findByTextBox.Text), 
            new KeyValuePair&lt;string, object&gt;("findBy2",findByTextBox2.Text)
        ).Tables[0];


This will atleast save you from defining a dictionary all the time.