try { SqlCommand cmdss1 = new SqlCommand("usp_Get_All_Item", cn); cmdss1.CommandType = CommandType.StoredProcedure; cmdss1.Parameters.Clear(); SqlDataAdapter SQss1 = new SqlDataAdapter(cmdss1); DataTable dtss1 = new DataTable(); SQss1.Fill(dtss1); if (dtss1.Rows.Count > 0) { for (int i = 0; i <= dtss1.Rows.Count - 1; i++) { string ssqs1 = dtss1.Rows[i]["Item_No"].ToString(); string ssqs2 = dtss1.Rows[i]["Item_Name"].ToString(); string s = ssqs1; Image m1 = BarcodeLib.Barcode.DoEncode(BarcodeLib.TYPE.CODE39, s, true, Color.Black, Color.White, 1200, 1200); dataGridView1.Rows[i].Cells[0].Value = ssqs1; dataGridView1.Rows[i].Cells[1].Value = m1; dataGridView1.Rows[i].Cells[2].Value = ssqs2; } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)