예제 #1
0
        public void SetSelection(SCBVariable var, Filter filter, List <string> items, int top = 10)
        {
            SCBQueryItem item = _items[var.code];

            if (item != null)
            {
                switch (filter)
                {
                case Filter.all:
                    item.selection.filter = SCBSelection.allString;
                    item.selection.values.Clear();
                    item.selection.values.Add("*");
                    break;

                case Filter.item:
                    item.selection.filter = SCBSelection.itemString;
                    item.selection.values.Clear();
                    item.selection.values.AddRange(items);
                    break;

                case Filter.top:
                    item.selection.filter = SCBSelection.topString;
                    item.selection.values.Clear();
                    item.selection.values.Add(top.ToString());
                    break;

                default:
                    item.selection.filter = SCBSelection.allString;
                    item.selection.values.Clear();
                    item.selection.values.Add("*");
                    break;
                }
            }
        }
예제 #2
0
        // end DTO props


        public SCBSelection(SCBVariable variable)
        {
            _variable = variable;
        }