private static void GetMISCPBM(DataTable dtJLD)
{
if (dtJLD == null || dtJLD.Rows.Count == 0)
return; //跳出此函数
foreach(DataRow dr in dtJLD.Rows)
{
string strERP_WL_BM = dr["ERP_WL_BM"] == DBNull.Value ? "" : dr["ERP_WL_BM"].ToString();
if (strERP_WL_BM == "")
continue; //下面的代码不执行了,重新下一个循环
if (strERP_WL_BM.Length == 16)
{
strERP_WL_BM = strERP_WL_BM.Substring(8, strERP_WL_BM.Length - 8);
}
else
{
continue;
}
string strSql = "select xsmis_bm from zd_sap_bmdz where bmlb='01' and sap_key1='"+strERP_WL_BM+"' ";
DataTable dtMISCPBM = Sybase.SlnDataAccess.GetDataTable(strSql);
if (dtMISCPBM == null || dtMISCPBM.Rows.Count == 0)
continue;
if (dtMISCPBM.Rows[0][0] != DBNull.Value)
{
dr["ITEMNUM"] = dtMISCPBM.Rows[0][0].ToString();
}
}
}
return && continue用法小结
最新推荐文章于 2022-03-29 11:25:23 发布