Refreshing data grid view after inserting, deleting, updating #SQL #SQLServerManagement

private void RefreshButton_Click_1(object sender, EventArgs e)
        {
           
                 
            SqlConnection n = new SqlConnection("Data Source=LENOVO-PC;Initial Catalog=DicleY;Integrated Security=True");
            string query = "select * from Personel";
            SqlCommand d = new SqlCommand(query, n);
            SqlDataAdapter da = new SqlDataAdapter(d);
            DataTable dt = new DataTable();
            da.Fill(dt);
            dataGridView1.DataSource = dt;


        }

Yorumlar

Popüler Yayınlar