private void lookupCompany_EditValueChanged(object sender, EventArgs e) { if (lookupCompany.EditValue == null) { lookupFinPeriod.Properties.DataSource = null; } else { lookupFinPeriod.Properties.ValueMember = "FinPeriodID"; lookupFinPeriod.Properties.DisplayMember = "FinPeriodName"; List <Model.Settings.FinPeriodEditListModel> FinPerList = FinPeriodDAL.GetEditList((int)lookupCompany.EditValue); lookupFinPeriod.Properties.DataSource = FinPerList; if (FinPerList != null && FinPerList.Count > 0) { lookupFinPeriod.EditValue = FinPerList.First().FinPeriodID; } } }
public override object GetEditListDataSource() { return(DALObject.GetEditList(Model.CommonProperties.LoginInfo.LoggedInCompany.CompanyID)); }