In this class, we have theses methods:
We must use :
Dialog: where we define the variables to use:
Object dialog()
{
DialogRunbase dialog = super();
;
dialog.caption("@PAY5567");
filetxt = dialog.addFieldValue(typeid(NoYes),rangePaytypeNum);
filetxt.label("@Pay5325");
Path = dialog.addFieldValue(typeId(FileNameSave),rangePaytypeNum);
return dialog;
}
{
DialogRunbase dialog = super();
;
dialog.caption("@PAY5567");
filetxt = dialog.addFieldValue(typeid(NoYes),rangePaytypeNum);
filetxt.label("@Pay5325");
Path = dialog.addFieldValue(typeId(FileNameSave),rangePaytypeNum);
return dialog;
}
We must use :
lastValueElementName: to call the appropriate report :
identifiername lastValueElementName()
{
return ReportStr(PayrollTransfer);
}
We must finally use :
main : to initialize and run the class for example :
static void main(Args args)
{
PayrolltransferReport payrolltransferReport ;
;
payrolltransferReport = new PayrolltransferReport ();
if (payrolltransferReport .prompt() )
{
payrolltransferReport.run();
}
}
{
PayrolltransferReport payrolltransferReport ;
;
payrolltransferReport = new PayrolltransferReport ();
if (payrolltransferReport .prompt() )
{
payrolltransferReport.run();
}
}
We can use
GetFromDialog: where we want to return the values entered:
For example :
public NoYes getFromDialog()
{
;
showHolidaySection = NoYesCombo1.value();
ChoosePrinter = NoYesCombo.value();
return super();
}
{
;
showHolidaySection = NoYesCombo1.value();
ChoosePrinter = NoYesCombo.value();
return super();
}
We can use
Run : If we have some infologs or messages to display while filling in the dialog For example
public void run()
{
textbuffer bufferyear;
String30 buffertrimester;
;
okcancel = false;
if(filetxt.value()==1)
{
if (path.value()!="" )
{
this.f_txt(path.value());
//Le fichier text est crée
Box::info("@Pay5323","info","...");
}
//L'emplacement est invalide !
else
{
Box::info("@Pay5324","info","....");
okcancel = true;
}
}
else
{
okcancel = false;
}
// if(!okcancel)
super();
}
{
textbuffer bufferyear;
String30 buffertrimester;
;
okcancel = false;
if(filetxt.value()==1)
{
if (path.value()!="" )
{
this.f_txt(path.value());
//Le fichier text est crée
Box::info("@Pay5323","info","...");
}
//L'emplacement est invalide !
else
{
Box::info("@Pay5324","info","....");
okcancel = true;
}
}
else
{
okcancel = false;
}
// if(!okcancel)
super();
}
Aucun commentaire:
Enregistrer un commentaire