Beispiel #1
0
        public void reloadGroups()
        {
            itemObjOrdered selectedItem = comboBox1.SelectedItem as itemObjOrdered;

            comboBox1.Items.Clear();
            List <itemObjOrdered> list_groups = gf.LoadGroups();

            itemObjOrdered[] arr_group = new itemObjOrdered[list_groups.Count];
            list_groups.CopyTo(arr_group);
            comboBox1.Items.AddRange(arr_group);
            label8.Text = changeTextOfCount2(comboBox1.Items.Count);

            if (selectedItem != null)
            {
                for (int i = 0; i < comboBox1.Items.Count; i++)
                {
                    if ((comboBox1.Items[i] as itemObjOrdered).Id_o == selectedItem.Id_o)
                    {
                        comboBox1.SelectedItem = (comboBox1.Items[i] as itemObjOrdered);
                        break;
                    }
                }
            }
            if (comboBox1.SelectedItem == null)
            {
                panel1.Visible = false;
            }
        }
Beispiel #2
0
        private void reloadGroups()
        {
            listBox1.Items.Clear();
            List <itemObjOrdered> listGroups = _groupFunct.LoadGroups();

            itemObjOrdered[] arr_group = new itemObjOrdered[listGroups.Count];
            listGroups.CopyTo(arr_group);
            listBox1.Items.AddRange(arr_group);
            labelCount.Text = listBox1.Items.Count.ToString() + " " + Rekod.Properties.Resources.EGO_groups;
        }