Esempio n. 1
0
        private void btnAdd_Click_1(object sender, EventArgs e)
        {
            FrmSelectGroup frm = new FrmSelectGroup();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                foreach (DictionaryEntry de in frm.GroupItems)
                {
                    if (!groupItems.Contains(de.Key) && !addgroupItems.Contains(de.Key))
                    {
                        addgroupItems.Add(de.Key, de.Value);
                        ListViewItem listItem = new ListViewItem();
                        listItem.Text = ((Smmgroup)de.Value).Groupname;
                        listItem.Tag  = de.Value;
                        listView.Items.Add(listItem);
                    }
                }
            }
        }
Esempio n. 2
0
        private void btnAdd_Click_1(object sender, EventArgs e)
        {
            FrmSelectGroup frm = new FrmSelectGroup();
            if (frm.ShowDialog() == DialogResult.OK)
            {

                foreach (DictionaryEntry de in frm.GroupItems)
                {
                    if (!groupItems.Contains(de.Key) && !addgroupItems.Contains(de.Key))
                    {
                        addgroupItems.Add(de.Key, de.Value);
                        ListViewItem listItem = new ListViewItem();
                        listItem.Text = ((Smmgroup)de.Value).Groupname;
                        listItem.Tag = de.Value;
                        listView.Items.Add(listItem);
                    }
                }
            }
        }