Пример #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            List <string> names = new List <string>();

            foreach (object o in chkProperties.CheckedItems)
            {
                names.Add(o.ToString());
            }

            UniqueConstraintInfo uniq = new UniqueConstraintInfo(names.ToArray());

            if (bs.Contains(uniq))
            {
                MessageService.ShowError("This unique constraint already exists");
            }
            else
            {
                bs.Add(uniq);
            }
        }
Пример #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            List<string> names = new List<string>();
            foreach (object o in chkProperties.CheckedItems)
            {
                names.Add(o.ToString());
            }

            UniqueConstraintInfo uniq = new UniqueConstraintInfo(names.ToArray());
            if (bs.Contains(uniq))
            {
                MessageService.ShowError("This unique constraint already exists");
            }
            else
            {
                bs.Add(uniq);
            }
        }