5
Answers

What is wrong here?

Goran Bibic

Goran Bibic

7y
187
1
private void delete_button4_Click(object sender, EventArgs e)
{
if (bar_code1DataGridView.SelectedRows.Count > 0)
{
DataGridViewRow dr = bar_code1DataGridView.SelectedRows[0];
if (string.IsNullOrEmpty(dr.Cells["id"].Value.ToString()))
{
String cs = "Data Source=.\\SQLEXPRESS;Initial Catalog=barcode;Integrated Security=True";
using (SqlConnection openCon = new SqlConnection(cs))
{
using (SqlCommand querySaveStaff = new SqlCommand("DELETE FROM bar_code1 WHERE id=@id", openCon))
{
// querySaveStaff.Parameters.Add("@id",SqlDbType.Int).Value=idTextBox.Text;
querySaveStaff.Parameters.AddWithValue("@id", 1);
openCon.Open();
querySaveStaff.ExecuteNonQuery();
openCon.Close();
}
}
using (SqlConnection openCon = new SqlConnection(cs))
{
string saveStaff = "SELECT * FROM dbo.bar_code1 ";
openCon.Open();
using (SqlDataAdapter querySaveStaff = new SqlDataAdapter(saveStaff, cs))
{
querySaveStaff.Fill(barcodeDataSet.bar_code1);
bar_code1DataGridView.DataSource = barcodeDataSet.bar_code1;
bar_code1DataGridView.Update();
bar_code1DataGridView.Refresh();
}
}
}
}
}
Answers (5)
0
balu

balu

NA 2 0 18y
this is the my answer for u r quetioun : in .net upto 44 lang are their.
nearly 7-10 lag are comming yearly.
0
Scott Lysle

Scott Lysle

NA 28.5k 14.4m 18y
It is difficult to say; since the release of Visual Studio 2005, over 4 million copies have been shipped; of course these editions support C#, C++, and VB (and others) and so you can't draw the conclusion that the number is entirely applicable to C# developers.  In 2001, Bill Gates said that there were 8 million installed copies of VB running around (that they knew about) but the number of installed copies is not really a valid metric since one person may use several machines and account for several installed copies; as for illegal copies, that is another factor to consider.  I bring up VB because it is supposed to be the most popular language in the world and therefore I would assume the C# programmer count trails the VB count but I don't know by what margin.  Personally, I code in several languages and therefore I don't consider myself specifically a C# programmer.

Even trying to derive a count from sold copies of Visual Studio won't take into account those that might use the SDK alone or that may use some other IDE capable of supporting C#.

I have actually tried to get the counts that you are talking about and I have never found a definitive answer; if you do, please post it here, I am sure a lot people would be interested in the knowing the counts.