Beispiel #1
0
        private void GetScopes(string name)
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("Name");
            var     scopeNames = _variableService.GetScopes(name);
            DataRow firstRow   = dt.Rows.Add();

            firstRow[0] = "All";
            foreach (var scopeName in scopeNames)
            {
                DataRow row = dt.Rows.Add();
                row[0] = scopeName;
            }

            comboBox2.ValueMember   = "Name";
            comboBox2.DisplayMember = "Name";
            comboBox2.DataSource    = dt;
        }