예제 #1
0
 void FieldDataToEdit()
 {
     txtFieldName.Text    = _fieldObject.Name;
     fctDescription.Text  = _fieldObject.Description;
     cbPrimaryKey.Checked = _tableObject.IsPrimary(_fieldObject.Name);
     cbNotNull.Checked    = _tableObject.IsNotNull(_fieldObject.Name);
 }
예제 #2
0
        public FieldForm(DBRegistrationClass dbReg, Form parent, TreeNode tableNode, TableFieldClass fieldObject, NotifiesClass lnotify, StateClasses.EditStateClass.eBearbeiten bearbeitenMode)
        {
            InitializeComponent();

            DataFilled     = false;
            this.MdiParent = parent;
            _dbReg         = dbReg;
            TableNode      = tableNode;
            var tc = (TableClass)tableNode.Tag;

            TableObject    = tc.Clone() as TableClass;
            BearbeitenMode = bearbeitenMode;
            FillCombos();
            if (BearbeitenMode == StateClasses.EditStateClass.eBearbeiten.eInsert)
            {
                NewFieldObject();
            }
            else
            {
                FieldObject                = fieldObject;
                FieldObject.IsPrimary      = TableObject.IsPrimary(FieldObject.Name);
                FieldObject.Domain.NotNull = TableObject.IsNotNull(FieldObject.Name);
                FieldObject.TableName      = TableObject.Name;
            }

            OrgFieldObject = FieldObject.DeepClone();
            ObjectToEdit(FieldObject);

            _localTableNotify = (lnotify == null) ? new NotifiesClass() : lnotify;

            DataFilled = false;
            _localTableNotify.Register4Info(TableInfoRaised);
            localNotify.Register4Info(InfoRaised);
            localNotify.Register4Error(ErrorRaised);
        }