On click method or some way of inheritance

There is form ContractDetails with control name LineViewHeader. In LineViewHeader there is field LineViewHeader_Name. Also, on form there is menu item button Add Contacts. When click on Add Contacts opens new form smmContactPerson. On form smmContactPerson there is field Company. That field (Company) need to be the same like field in previous form LineViewHeader_Name, but instead of that it show me drop down menu item with all Companies and selected first one in that menu.

class ContractDetails_AddContact
{

    [FormControlEventHandler(formControlStr(ContractDetails, AddContacts), FormControlEventType::Clicked)]
    public static void AddContacts_OnClicked(FormControl sender, FormControlEventArgs e)
    {

        ContactPerson  contactPerson;
        FormRun formRun = sender.formRun() as FormRun;
        FormDataSource  lineViewHeader_Name;

        lineViewHeader_Name = sender.formRun().dataSource(1);
        contactPerson = lineViewHeader_Name.cursor();
    }

}
Related
Recommended