GST Billing Software

header image

Pass Data to a form and get back Data from the passed form

Erachana Line

56. How to pass data to a form and get back data from the passed form?

A classic example for this scenario is Receipts form, where data has to be sent from 'Receipts Form' to Add Receipts Form. Here, the Outstanding Bills will be selected, and the selected data has to be passed back to Receipts Form.

To do this, you need to create parameters in the Outstanding Bill form, to pass the form, use the 'SetPropertyValue' function. To receive a value from that form, use 'GetPropertyValue' function. For more information, you can see the SampleApp.ert, 'Sal_Receipt' form, and see the expression 'Add_Bills'

(Sample ERT File is available In Kushal Installation Folder i.e. C:\Kushal\Samples or By clicking on Sample Menu)


Form frm = ControlAdapter.CreateForm("Sal_Outstanding_Bills");

frm.SetPropertyValue("val", sql_condition);

frm.ShowDialog();

DataTable dt = (DataTable) frm.GetPropertyValue("ret_val");