Пример #1
0
        private void SetSimpleSelectOptions(EbSimpleSelect simpleSelect)
        {
            simpleSelect.Options.Clear();

            foreach (EbMobileSSOption so in this.Options)
            {
                simpleSelect.Options.Add(new EbSimpleSelectOption
                {
                    EbSid       = "ss_options_" + Guid.NewGuid().ToString("N"),
                    Name        = so.Name,
                    Value       = so.Value,
                    DisplayName = so.DisplayName
                });
            }
        }
Пример #2
0
        public override EbControl GetWebFormControl(int counter)
        {
            EbControl ctrl;
            string    ebSid = this.EbControlType + counter;

            if (IsSimpleSelect)
            {
                EbSimpleSelect simpleSelect = new EbSimpleSelect
                {
                    EbSid  = ebSid,
                    Name   = this.Name,
                    Margin = new UISides {
                        Top = 0, Bottom = 0, Left = 0, Right = 0
                    },
                    Label = this.Label
                };
                ctrl = simpleSelect;
                this.SetSimpleSelectOptions(simpleSelect);
            }
            else
            {
                EbPowerSelect powerselect = new EbPowerSelect
                {
                    EbSid        = ebSid,
                    DataSourceId = this.DataSourceRefId,
                    Name         = this.Name,
                    Margin       = new UISides {
                        Top = 0, Bottom = 0, Left = 0, Right = 0
                    },
                    Label = this.Label
                };
                ctrl = powerselect;
                this.SetDisplayMember(powerselect);
                this.SetValueMember(powerselect);
            }
            return(ctrl);
        }