Esempio n. 1
0
        public NotNullForm(Form parent, DBRegistrationClass dbReg, TreeNode tn, ContextMenuStrip cmGroup, ContextMenuStrip cm)
        {
            InitializeComponent();
            this.MdiParent = parent;

            _dbReg  = dbReg;
            Cm      = cm;
            CmGroup = cmGroup;
            Tn      = tn;

            TreeNode t            = StaticTreeClass.FindPrevDBNode(Tn);
            TreeNode orgTableNode = StaticTreeClass.FindPrevTableNode(Tn);
            TreeNode TableNode    = StaticTreeClass.FindFirstNodeInAllNodes(t, StaticVariablesClass.CommonTablesKeyGroupStr);

            //Bei insert
            if (Tn.Tag == null)
            {
                NotNullObject                = new NotNullsClass();
                NotNullObject.Name           = "NEW_CNSTR";
                NotNullObject.ConstraintType = eConstraintType.NOTNULL;
            }
            else
            {
                NotNullObject = Tn.Tag as NotNullsClass;
            }

            if (orgTableNode != null)
            {
                OrgTable = orgTableNode.Tag as TableClass;
                NotNullObject.TableName = OrgTable.Name;
            }

            Tables = StaticTreeClass.GetTableObjectsFromNode(TableNode);

            _localNotify.Notify.OnRaiseErrorHandler += Notify_OnRaiseErrorHandler;
            _localNotify.Notify.OnRaiseInfoHandler  += Notify_OnRaiseInfoHandler;
        }