foreach (DataGridViewRow g1 in dataGridView.Rows)
{
cmd = new SqlCommand("insert into MainBillForm Values (Datetxt.Text,Nametxt.Text,Phtxt.Text,ONtxt.Text,TotalTaxtxt.Text,totalamounttxt.Text,row.Cells[0].FormattedValue.ToString(),row.Cells[1].FormattedValue.ToString(),row.Cells[2].FormattedValue.ToString(),row.Cells[3].FormattedValue.ToString(),row.Cells[4].FormattedValue.ToString(),row.Cells[5].FormattedValue.ToString(),row.Cells[6].FormattedValue.ToString())", con);
con.Open();
cmd.ExecuteNonQuery();
MessageBox.Show("Records Inserted SuccessFully");
con.Close();
}

Ramesh PalanivelPosted Apr 10, 2017, 4:42 AM
Ramesh PalanivelPosted Apr 10, 2017, 6:48 AM
Jyoti JodhaPosted Apr 10, 2017, 6:38 AM
Ramesh PalanivelPosted Apr 10, 2017, 6:24 AM
Jyoti JodhaPosted Apr 10, 2017, 6:15 AM
Ramesh PalanivelPosted Apr 10, 2017, 6:05 AM
Jyoti JodhaPosted Apr 10, 2017, 5:54 AM
Ramesh PalanivelPosted Apr 10, 2017, 5:48 AM
Jyoti JodhaPosted Apr 10, 2017, 5:33 AM
Ramesh PalanivelPosted Apr 10, 2017, 4:57 AM
Jyoti JodhaPosted Apr 10, 2017, 4:51 AM
Ranjeet PatraPosted Apr 10, 2017, 4:44 AM