Ejemplo n.º 1
0
        public static Boolean IsInherited(FzSchemeEntity scheme, List<FzRelationEntity> relations)
        {
            try
            {
                foreach (FzRelationEntity relation in relations)
                {
                    if (scheme.Equals(relation.Scheme))
                    {
                        return true;
                        //break;
                    }
                }
            }
            catch { }

            return false;
        }
Ejemplo n.º 2
0
        private void DeleteScheme(FzSchemeEntity delScheme)
        {
            if (FzSchemeBLL.IsInherited(delScheme, fdbEntity.Relations))
            {
                MessageBox.Show("Scheme is being inherited!");
            }
            else
            {
                DialogResult result = new DialogResult();
                result = MessageBox.Show("Delete this scheme ?", "Delete scheme " + delScheme.SchemeName, MessageBoxButtons.YesNo);
                if (result == DialogResult.Yes)
                {
                    if (currentScheme != null && delScheme.Equals(currentScheme))
                    {
                        //CloseCurrentScheme();
                        AddRowDefault();
                    }

                    DeleteTreeNode(delScheme.SchemeName, delScheme, null, null);
                }
            }
        }