private void AddCustomerType(string customerType, string label, ref float y) { var view = new CustomerSearchTypeView(_stringHelper, false, label, customerType, CustomerInfo.GetImage(customerType)); this.AddView(view); y += _rowHeight; }
public void Databind() { if (_isPresetList) { return; } if (_isControlLoaded) { return; } _isControlLoaded = true; if (CdlSettings.Organizer != null) { _stringHelper.BusinessObject = CdlSettings.Organizer.BusinessObject; _stringHelper.Controller = CdlSettings.Organizer.Form as CdlViewController; } CustomerSearchTypeView view; float y = 0f; _helper.SetDisplayTypes(); view = new CustomerSearchTypeView(_stringHelper, true, _stringHelper["wf_individuals"], "INDV", string.Empty); this.AddView(view); y += 36f; foreach (string customerType in _helper.DisplayPersonTypes.Keys) { AddCustomerType(customerType, _helper.DisplayPersonTypes[customerType].ToString(), ref y); } view = new CustomerSearchTypeView(_stringHelper, true, _stringHelper["wf_organizations"], "ORG", string.Empty); this.AddView(view); y += 36f; foreach (string customerType in _helper.DisplayOrgTypes.Keys) { AddCustomerType(customerType, _helper.DisplayOrgTypes[customerType].ToString(), ref y); } }