[FormDataSourceEventHandler(formDataSourceStr(SalesCreateQuotation, SalesQuotationTable), FormDataSourceEventType::Activated)]
public static void SalesQuotationTable_OnActivated(FormDataSource sender, FormDataSourceEventArgs e)
{
FormRun form = sender.formRun();
FormDataSource SalesQuotationTable_ds = form.dataSource(formDataSourceStr(SalesCreateQuotation , SalesQuotationTable)) as FormDataSource;
SalesQuotationTable salesQuotationTable = SalesQuotationTable_ds.cursor();
FormControl createRetailCustbtn = form.design(0).controlName(formcontrolStr(SalesCreateQuotation, DTCreateCustQuotation));
FormComboBoxControl accountType = form.design().controlName(formcontrolStr(SalesCreateQuotation, AccountType));
if(accountType.selection() == smmQuotationAccountType::BusRelAccount)
{
createRetailCustbtn.enabled(false);
}
else if(accountType.selection() == smmQuotationAccountType::CustAccount)
{
createRetailCustbtn.enabled(true);
}
}
void init()
{
next init();
this.setFieldsActive();
}
public void setFieldsActive()
{
next setFieldsActive();
DTCreateRetailCustQuotation.enabled(!prospect);
}
public void setFieldsActive()
{
//#define.BTNNAME('DTCreateCustQuotation')
FormControl createRetailCustbtn = this.design(0).controlName(formcontrolStr(SalesCreateQuotation,DTCreateCustQuotation)) as FormControl;
FormComboBoxControl accountType = this.design().controlName(formcontrolStr(SalesCreateQuotation, AccountType)) as FormComboBoxControl ;
if(accountType.selection() == 0)
{
createRetailCustbtn.enabled(false);
}
else if(accountType.selection() == 1)
{
createRetailCustbtn.enabled(true);
}
next setFieldsActive();
}
void init()
{
next init();
this.setFieldsActive();
}
André Arnaud de Cal... 291,391 Super User 2024 Season 2
Martin Dráb 230,445 Most Valuable Professional
nmaenpaa 101,156