Tuesday, January 6, 2015

Dynamics NAV - Window Dialog to Show Status

è Define the Global Variable

Name
DataType
Subtype
Length
Window_gDlg
Dialog


RecNo_gInt
Integer


TotalRecNo_gInt
Integer



è Define Global TextConstant

Name
ConstValue
Subtype
Length
Text001_gCtx
Updating Seasons code...\


Text002_gCtx
Item No.: #1############\


Text003_gCtx
@2@@@@@@@@@@@@@@@@@@@@@@



è Open the Window Dialog

IF GUIALLOWED THEN BEGIN
  Window_gDlg.OPEN(Text001_gCtx + Text002_gCtx + Text003_gCtx);
  TotalRecNo_gInt := COUNT;
END;

è Update the Window Dialog

IF GUIALLOWED THEN BEGIN
  RecNo_gInt += 1;
  Window_gDlg.UPDATE(1,"No.");
  Window_gDlg.UPDATE(2,ROUND(RecNo_gInt / TotalRecNo_gInt * 10000,1));
END;

è Close the Window Dialog

IF GUIALLOWED THEN BEGIN
  Window_gDlg.CLOSE;
  MESSAGE(Text000_gCtx);

END;

No comments:

Post a Comment