Tuesday, 16 July 2013

Dialog(date of birth and name)

static void Simple_Dialog(Args _args)
{
DialogButton dialogButton;
dialog dialog;
dialogGroup dialogGroup;
dialogField dialogField1;
dialogField dialogField2;
container nameAndDOB,a;
   
dialog = new Dialog(“Date and Name”);
dialogGroup = dialog.addGroup(“Enter details”);
dialogField1 = dialog.addField(extendedTypeStr(Name));
dialogField2 = dialog.addField(extendedTypeStr(TransDate));
  
if (dialog.run())
{
print dialogField1.value();
print dialogField2.value();
  nameAndDOB = [dialogField1.value(),dialogField2.value()];
pause;
}
dialogButton = Box::yesNo(“Do you want to see the birthdate?”, DialogButton::Yes);
if (dialogButton == DialogButton::Yes)
{
Box::info(strFmt(“%1, %2″, conPeek(nameAndDOB,1),conPeek(nameAndDOB,2)));
}
else
{
Box::info(strFmt(“%1″,conPeek(nameAndDOB,1)));
}
}


No comments:

Post a Comment