页面加查询条件本地调试对传入列的判断

if (bcls_rec->Tables[0].Columns.Contains("CAST_LOT_NO1"))
        {
            cast_lot_no1 = bcls_rec->Tables[0].Rows[0]["CAST_LOT_NO1"].ToString().Trim();
        }
        
        billet_type = bcls_rec->Tables[0].Rows[0]["BILLET_TYPE"].ToString().Trim();
        lg_st = bcls_rec->Tables[0].Rows[0]["LG_ST"].ToString().Trim();
        slab_dest = bcls_rec->Tables[0].Rows[0]["SLAB_DEST"].ToString().Trim();
        if (bcls_rec->Tables[0].Columns.Contains("CAST_LOT_NO2"))
        {
            cast_lot_no2 = bcls_rec->Tables[0].Rows[0]["CAST_LOT_NO2"].ToString().Trim();
        }
        if (bcls_rec->Tables[0].Columns.Contains("PONO1"))
        {
            pono1 = bcls_rec->Tables[0].Rows[0]["PONO1"].ToString().Trim();
        }
        if (bcls_rec->Tables[0].Columns.Contains("PONO2"))
        {
            pono2 = bcls_rec->Tables[0].Rows[0]["PONO2"].ToString().Trim();
        }
        

开发时需使用判断防止用户测试出现问题,调试好发布需将判断去掉。

posted @ 2021-03-08 16:23  gitee1412  阅读(163)  评论(0)    收藏  举报