select record from table 1 and copy to table 2 in C#
<p>i have a select statement  that select records from table1 and show in in datagridview,</p>

<p>how do i copy data that are shown in datagridview to table2 after the select statement.
below is my code of select item from table1</p>

<pre><code>     public void getdata(){
        if (txt_Barcode.Text== "" )
        {
            MessageBox.Show ("Please fill in something");
        }
        for (int i = 0; i &lt; dgv_Detail.Rows.Count +1; i++)
        {

            da = new SqlDataAdapter("select * from asset where asset_no='" + txt_Barcode.Text + "'", conn);

        }
             da.Fill(Assetdt);         
        }



    #endregion

    public void fillds()
    {
        dgv_Detail.DataSource = Assetdt;
    }
</code></pre>

<p>to activate the event</p>

<pre><code> private void txt_Barcode_KeyDown(object sender, KeyEventArgs e)
    {
        if (e.KeyData == Keys.Enter)
        {

            getdata();
            fillds();

            insertbar();

        }
    }
</code></pre>

<p>anyone noes how to do it?</p>
