create dialog in class of axapta

This code is to create dialog in class using axapta code . Mostly new developer directly call dialog through report but by using class you can use to lot of report.

 DialogField DialogFromDate,DialogToDate;  
 // DateTimeUtil fromDate;  
 // DateTimeUtil toDate;  
 FromDate fromDate;  
 ToDate toDate;  
 DateTimeAccepted tmpdate;  
 protected Object dialog()  
 {  
 Object ret;  
 DialogRunbase dialog; //= super();  
 ;  
 Dialog = super(dialog);  
 Dialog.caption("Percentage Calculation");  
 DialogFromDate = dialog.addField(typeid(FromDate));  
 DialogToDate = dialog.addField(typeid(ToDate));  
 return dialog;  
 }  
 public boolean getFromDialog()  
 {  
 boolean ret;  
 ret = super();  
 fromDate=dialogFromDate.value();  
 toDate=dialogToDate.value();  
 return ret;  
 }  
 public container pack()  
 {  
 container ret;  
 // ret = super();  
 return ret;  
 }  
 public boolean unpack(container packedClass)  
 {  
 boolean ret;  
 ret = super(packedClass);  
 return ret;  
 }  
 static void main(Args args)  
 {  
 Class_jobJob class_jobJob;  
 ;  
 class_jobJob=new Class_jobJob();  
 if(class_jobJob.prompt())  
 {  
 class_jobJob.run();  
 }  
 }