string sql = "select [DocEntry],[JobCardNo],[ITEMNAME],[OD] ,[PlanQty],[FinalInspectionRemarks] ,[OrderDate] ,[Division],[ChervonSet],[Profile] from SAPProduction.FactoryProductionData WHERE JobCardNo ='" + findjobsap.Text.ToString() + "'";
SqlDataAdapter da1 = new SqlDataAdapter(sql, objConn1);
DataSet ds1 = new DataSet();
objConn1.Open();
da1.Fill(ds1, "FactoryProductionData");
if (ds1 == null)
{
objConn1.Close();
return;
}
dataGridView1.DataSource = ds1;
dataGridView1.DataMember = "FactoryProductionData";
objConn1.Close();
if (dataGridView1.Rows.Count <= 0)
{
MessageBox.Show("");
}