Пример #1
0
    protected int QueryOnWayDetail(string strONWAY_NO)
    {
        MaintainGoodsInTransit BCO = new MaintainGoodsInTransit(ConntionDB);

        ParameterList.Clear();

        ParameterList.Add(strONWAY_NO);

        DataTable dt = BCO.QueryItem(ParameterList);

        DataTable dtNew = ConvetGV1_DT(dt);

        Session[PageTimeStamp.Value + GridView1.ID] = dtNew;

        BindData(GridView1);

        //iResult 0:查無資料 1:有資料(有包含結案資料) 2:有資料(無結案過資料)
        int iResult = 2;
        if (dtNew.Rows.Count == 0)
        {
            iResult = 0;
        }
        else
        {
            for (int i = 0; i < dtNew.Rows.Count; i++)
            {
                if (dtNew.Rows[i]["CLOSE_TYPE"].ToString() != "")
                {
                    iResult = 1;
                    break;
                }
            }
        }

        return iResult;

    }