GST Billing Software

header image

Form Parameter in Kushal

Erachana Line

14. How to create Form Parameter in Kushal?

To create Form variables, select the Form, and in Properties Tab, select the Design section, select Properties property. Click Collections and enter the Parameter name and click Ok.

Parameter

Example :

In the sample file, you can see a customer details in Cmn_Customer Form. In that Form, you can see theHistory button, which when clicked, Customer_History Form opens, and the details of that particular customer can be seen in that Form. Here, a Form parameter 'Id' is being passed from Cmn_Customer toCustomer_History Form. Using this parameter ( Id), we can filter the customer details of the selected id.

Example to set a property value -

This code has to be added to the Cmn_Customer's History button's Click event.

Form frm = ControlAdapter.CreateForm("Customer_History"); frm.SetPropertyValue("id", txt_cmn_customer_Id.Text); frm.ShowDialog();

In the above code, parameter a Form object is created, and using that object, we are setting a value to the Form parameter.

Example to get a property value -

This code must be added in Customer_History Form's Form Load event.

int id = TypeConverter.ConvertToInt(this.id);

While loading, the passed parameter gets initialised to the Customer_History Form.