Here is an example of copying a record from a grid :
In the clicked method of the button
public void clicked()
{
super();
ThyKanbanTable::createCopy(thyKanbanTable);
thyKanbanTable_ds.executeQuery();
thyKanbanTable_ds.last(); // set the cursor at the last record copied
Tab.tab(1); // display the tab number one of the form
}
createCopy is declared under the ThyKanbanTable as following :
public static server void createCopy(ThyKanbanTable _ThyKanbanTable)
{
ThyKanbanTable newKanbanTable;
;
ttsbegin;
newKanbanTable.data(_ThyKanbanTable);
newKanbanTable.KanbanID = NumberSeq::newGetNum(ThyKanbanParameters::numRefKanbanId()).num();
newKanbanTable.insert();
ttscommit;
}
In the clicked method of the button
public void clicked()
{
super();
ThyKanbanTable::createCopy(thyKanbanTable);
thyKanbanTable_ds.executeQuery();
thyKanbanTable_ds.last(); // set the cursor at the last record copied
Tab.tab(1); // display the tab number one of the form
}
createCopy is declared under the ThyKanbanTable as following :
public static server void createCopy(ThyKanbanTable _ThyKanbanTable)
{
ThyKanbanTable newKanbanTable;
;
ttsbegin;
newKanbanTable.data(_ThyKanbanTable);
newKanbanTable.KanbanID = NumberSeq::newGetNum(ThyKanbanParameters::numRefKanbanId()).num();
newKanbanTable.insert();
ttscommit;
}
No comments:
Post a Comment