After Writing or Deleting the record from the child form you just mention these lines...
write()
{
....
....
ParentTable_ds.reread();
element.args().record().reread();
}
or
PurchLine_ds.executeQuery();
or
Analyse the code below
<><>>
void clicked()
write()
{
....
....
ParentTable_ds.reread();
element.args().record().reread();
}
or
PurchLine_ds.executeQuery();
or
Analyse the code below
void clicked()
{ PurchLine tmpPurchLine; PurchLine updatePurchLine; PurchLine selectedRecord; Dialog dl; DialogField dlfTransdate; ; dl = new Dialog("Change confirmed date"); dlfTransdate = dl.addFieldValue(typeid("Transdate"),today(),"Confirmed date"); if(dl.run()){ selectedRecord = PurchLine_ds.cursor(); for (tmpPurchLine = PurchLine_ds.getFirst(true) ? PurchLine_ds.getFirst(true) : PurchLine_ds.cursor(); tmpPurchLine; tmpPurchLine = PurchLine_ds.getnext()) { ttsbegin; SELECT FORUPDATE updatePurchLine WHERE updatePurchLine.PurchId == tmpPurchLine.PurchId && updatePurchLine.VendAccount == tmpPurchLine.VendAccount && updatePurchLine.LineNum == tmpPurchLine.LineNum && updatePurchLine.ItemId == tmpPurchLine.ItemId; updatePurchLine.ConfirmedDlv = dlfTransdate.value(); updatePurchLine.update(); ttscommit; } PurchLine_ds.reread(); PurchLine_ds.research(); PurchLine_ds.findRecord(selectedRecord); } super(); } |
void clicked()
{ PurchLine tmpPurchLine; PurchLine updatePurchLine; PurchLine selectedRecord; Dialog dl; DialogField dlfTransdate; ; dl = new Dialog("Change confirmed date"); dlfTransdate = dl.addFieldValue(typeid("Transdate"),today(),"Confirmed date"); if(dl.run())
{
selectedRecord = PurchLine_ds.cursor(); for (tmpPurchLine = PurchLine_ds.getFirst(true) ? PurchLine_ds.getFirst(true) : PurchLine_ds.cursor(); tmpPurchLine; tmpPurchLine = PurchLine_ds.getnext()) { ttsbegin; SELECT FORUPDATE updatePurchLine WHERE updatePurchLine.PurchId == tmpPurchLine.PurchId && updatePurchLine.VendAccount == tmpPurchLine.VendAccount && updatePurchLine.LineNum == tmpPurchLine.LineNum && updatePurchLine.ItemId == tmpPurchLine.ItemId; updatePurchLine.ConfirmedDlv = dlfTransdate.value(); updatePurchLine.update(); ttscommit; } PurchLine_ds.reread(); PurchLine_ds.research(); PurchLine_ds.findRecord(selectedRecord); } super(); } |
void clicked()
{
PurchLine tmpPurchLine;
PurchLine updatePurchLine;
PurchLine selectedRecord;
Dialog dl;
DialogField dlfTransdate;
;
dl = new Dialog("Change confirmed date");
dlfTransdate = dl.addFieldValue(typeid("Transdate"),today(),"Confirmed date");
if(dl.run())
{
selectedRecord = PurchLine_ds.cursor();
for (tmpPurchLine = PurchLine_ds.getFirst(true) ? PurchLine_ds.getFirst(true) : PurchLine_ds.cursor();
tmpPurchLine; tmpPurchLine = PurchLine_ds.getnext())
{
ttsbegin;
SELECT FORUPDATE updatePurchLine
WHERE updatePurchLine.PurchId == tmpPurchLine.PurchId && updatePurchLine.VendAccount == tmpPurchLine.VendAccount && updatePurchLine.LineNum == tmpPurchLine.LineNum && updatePurchLine.ItemId == tmpPurchLine.ItemId;
updatePurchLine.ConfirmedDlv = dlfTransdate.value();
updatePurchLine.update();
ttscommit;
}
PurchLine_ds.reread();
PurchLine_ds.research();
PurchLine_ds.findRecord(selectedRecord);
}
super();
}
PurchLine tmpPurchLine;
PurchLine updatePurchLine;
PurchLine selectedRecord;
Dialog dl;
DialogField dlfTransdate;
;
dl = new Dialog("Change confirmed date");
dlfTransdate = dl.addFieldValue(typeid("Transdate"),today(),"Confirmed date");
if(dl.run())
{
selectedRecord = PurchLine_ds.cursor();
for (tmpPurchLine = PurchLine_ds.getFirst(true) ? PurchLine_ds.getFirst(true) : PurchLine_ds.cursor();
tmpPurchLine; tmpPurchLine = PurchLine_ds.getnext())
{
ttsbegin;
SELECT FORUPDATE updatePurchLine
WHERE updatePurchLine.PurchId == tmpPurchLine.PurchId && updatePurchLine.VendAccount == tmpPurchLine.VendAccount && updatePurchLine.LineNum == tmpPurchLine.LineNum && updatePurchLine.ItemId == tmpPurchLine.ItemId;
updatePurchLine.ConfirmedDlv = dlfTransdate.value();
updatePurchLine.update();
ttscommit;
}
PurchLine_ds.reread();
PurchLine_ds.research();
PurchLine_ds.findRecord(selectedRecord);
}
super();
}