Beispiel #1
0
        protected override void OnEdit(object sender, EventArgs args)
        {
            EditModelFrm  frm           = new EditModelFrm();
            ColumnSetNode columnSetNode = (ColumnSetNode)this.Reslove(typeof(ColumnSetNode), this.ColumnSetName);

            frm.UpdateModel(this, columnSetNode);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                this.Children.Clear();

                //更新模型
                IList <EditModelFrm.FieldItem> items = frm.FieldItems;

                foreach (EditModelFrm.FieldItem item in items)
                {
                    FieldNode node = NodeFactory.CreateNode <FieldNode>();// new FieldNode();
                    node.Name        = item.Name;
                    node.ColumnName  = item.ColumnName;
                    node.Description = item.Description;
                    node.NullAble    = item.NullAble;
                    node.SystemType  = SchemaUtility.GetSystemType(DBGlobalService.DbType, item.SystemType);
                    node.Parent      = this;
                }
            }
            base.OnEdit(sender, args);
        }
Beispiel #2
0
        protected override void OnEdit(object sender, EventArgs args)
        {
            EditModelFrm frm = new EditModelFrm();
            ColumnSetNode columnSetNode = (ColumnSetNode)this.Reslove(typeof(ColumnSetNode), this.ColumnSetName);
            frm.UpdateModel(this, columnSetNode);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                this.Children.Clear();

                //更新模型
                IList<EditModelFrm.FieldItem> items = frm.FieldItems;

                foreach (EditModelFrm.FieldItem item in items)
                {
                    FieldNode node = NodeFactory.CreateNode<FieldNode>();// new FieldNode();
                    node.Name = item.Name;
                    node.ColumnName = item.ColumnName;
                    node.Description = item.Description;
                    node.NullAble = item.NullAble;
                    node.SystemType = SchemaUtility.GetSystemType(DBGlobalService.DbType, item.SystemType);
                    node.Parent = this;
                }
            }
            base.OnEdit(sender, args);
        }