static SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings["Connection"].ToString()); [WebMethod] public DataSet SQLBranchMaster() { String Load = "SELECT * FROM BranchMaster"; conn.Open(); SqlDataAdapter adapt = new SqlDataAdapter(Load,conn); DataSet ds = new DataSet(); adapt.Fill(ds); conn.Close(); return ds; }
dataGridView1 = new DataGridView(); // Service is my Webserive class name // myservice is my reference added in the Winforms myservice.Service test = new myservice.Service(); dataGridView1.DataSource = test.SQLBranchMaster();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)