private void cmdAddStop_Click(object sender, EventArgs e) { Server.Service1 server = new Server.Service1(); bool addstop; bool addstoppassed; server.addstop(textBox1.Text, txtStopName.Text, txtLongitude.Text, txtLatitude.Text, out addstop, out addstoppassed); if (addstop) { MessageBox.Show("Stop has been added"); Server.Service1 myserver = new Server.Service1(); BindingSource bs = new BindingSource(); bs.DataSource = myserver.getstops(textBox1.Text); dataGridView1.DataSource = bs; } else { MessageBox.Show(" enter something"); } }