2011-09-14 34 views

回答

1

添加修改的方法將控制方法節點:

public boolean modified() 
{ 
    boolean ret = super(); 
    ; 
    SysQuery::findOrCreateRange(purchTable_ds.queryRun().query().dataSourceNo(1), fieldNum(PurchTable,PurchId)).value(this.text()); 
    purchTable_ds.research(); 
    return ret; 
} 

這會PurchId查詢範圍添加到PurchTable數據源,填補它與你輸入的值,然後做數據源的研究。

1

您可以接受揚的回答,也只是一個小幅調整我想補充 - 我不認爲它會與research工作,應該是executeQuery代替:

public boolean modified() 
{ 
    Query q; 
    QueryBuildDataSource qbds; 
    QueryBuildRange qbr; 
    boolean ret; 
    ; 

    ret = super(); 

    q = purchTable_ds.queryRun().query(); 
    qbds = q.dataSourceTable(tablenum(PurchTable)); 
    qbr = SysQuery::findOrCreateRange(qbds, fieldNum(PurchTable,PurchId)); 
    qbr.value(this.text()); 
    PurchTable_ds.executeQuery(); 

    return ret; 
} 

測試吧,反正。