vendredi 12 août 2011

How and use close method in a form

Called when a form is closed. 
 Here is an example when closing a form according to records in a grid of a table we update records in another table.

public void close()
{
    ThyProjForcasTable          ProjForcasTable;
    ;

    super();

    ttsbegin;
    while select ProjForcasTable
        where ProjForcasTable.ProjId == ThyProjForcasTable.ProjId
    {
        if (ProjForcasTable.NoYesId == NoYes::No)
        {
            select forupdate projTable
                where projTable.ProjId == ThyProjForcasTable.ProjId;

        Projtable.Status = ProjStatus::Created;
        Projtable.update();
        }
    }
    ttscommit;
}

Aucun commentaire:

Enregistrer un commentaire