Beispiel #1
0
    protected int QueryPurchaseGift()
    {
        MaintainGoodsInTransit BCO = new MaintainGoodsInTransit(ConntionDB);

        ParameterList.Clear();

        ParameterList.Add(txtPURCHASE_NO.Text.Trim());

        DataTable dt = BCO.QueryGiftByPURCHASE(ParameterList);

        DataTable dtNew = ConvetGV2_DT(dt);

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

        BindData(GridView2);

        //iResult 0:查無資料 1:有資料但全部結案 2:有資料(可能包含部分結案)
        int iResult = 2;
        if (dt.Rows.Count == 0)
            iResult = 0;
        else if (dtNew.Rows.Count == 0)
            iResult = 1;

        return iResult;
    }