Beispiel #1
0
        private void barButtonItem_CreateRelation_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            TreeListNode fpnode = treeList_FPropertyList.FocusedNode;
            TreeListNode spnode = treeList_SPropertyList.FocusedNode;
            TreeListNode rnode  = treeList_RelationList.FocusedNode;

            MyRelationData relationData = new MyRelationData();

            relationData.RELATIONDATA_ID                = System.Guid.NewGuid().ToString();
            relationData.RELATIONDATA_CODE              = fpnode.GetValue("PROPERTYTYPE_CODE").ToString() + "-" + rnode.GetValue("RELATIONTYPE_CODE").ToString() + "-" + spnode.GetValue("PROPERTYTYPE_CODE").ToString();
            relationData.RELATIONDATA_NAME              = fpnode.GetValue("PROPERTYTYPE_NAME").ToString() + "-" + rnode.GetValue("RELATIONTYPE_NAME").ToString() + "-" + spnode.GetValue("PROPERTYTYPE_NAME").ToString();
            relationData.RELATIONDATA_CREATETIME        = DateTime.Now.ToString();
            relationData.RELATIONDATA_FPROPERTYID       = fpnode.GetValue("PROPERTYTYPE_ID").ToString();
            relationData.RELATIONDATA_FPROPERTYNAME     = fpnode.GetValue("PROPERTYTYPE_NAME").ToString();
            relationData.RELATIONDATA_FPROPERTYTYPEID   = fpnode.GetValue("PROPERTYTYPE_PARENTID").ToString();
            relationData.RELATIONDATA_IFINVALID         = "T";
            relationData.RELATIONDATA_LASTMODIFIEDTIME  = DateTime.Now.ToString();
            relationData.RELATIONDATA_LOBJECTID         = lobjectId;
            relationData.RELATIONDATA_MODIFICATIONTIMES = "0";
            relationData.RELATIONDATA_RELATIONID        = rnode.GetValue("RELATIONTYPE_ID").ToString();
            relationData.RELATIONDATA_RELATIONNAME      = rnode.GetValue("RELATIONTYPE_NAME").ToString();
            relationData.RELATIONDATA_RELATIONTYPEID    = rnode.GetValue("RELATIONTYPE_PARENTID").ToString();
            relationData.RELATIONDATA_ROBJECTTYPEID     = robjectId;
            relationData.RELATIONDATA_SPROPERTYID       = spnode.GetValue("PROPERTYTYPE_ID").ToString();
            relationData.RELATIONDATA_SPROPERTYNAME     = spnode.GetValue("PROPERTYTYPE_NAME").ToString();
            relationData.RELATIONDATA_SPROPERTYTYPEID   = spnode.GetValue("PROPERTYTYPE_PARENTID").ToString();

            relationDataList.Add(relationData);
            this.gridControl_RelationData.DataSource = relationDataList;
            this.gridControl_RelationData.Refresh();
        }
Beispiel #2
0
        private void barButtonItem_Delete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (this.gridView_RelationData.GetFocusedRow() == null)
            {
                return;
            }
            MyRelationData relationData = this.gridView_RelationData.GetFocusedRow() as MyRelationData;

            relationDataList.Remove(relationData);
        }
Beispiel #3
0
        //关系数据获取
        private void gridControl_RelationDataList_FocusedViewChanged(object sender, DevExpress.XtraGrid.ViewFocusEventArgs e)
        {
            if (e.View == null)
            {
                return;
            }

            //关系数据获取
            g_relationData = this.gridView_RelationDataList.GetRow(this.gridView_LVocabulary.FocusedRowHandle) as MyRelationData;


            this.memoEdit_Data.Text     = g_relationData.RELATIONDATA_NOTE;
            this.memoEdit_DataName.Text = g_relationData.RELATIONDATA_NAME;

            //获取对应关系树节点,并赋值给info
            this.memoEdit_Info.Text     = g_relationInfo.RELATIONINFO_NOTE;
            this.memoEdit_InfoName.Text = g_relationInfo.RELATIONINFO_NAME;
        }
Beispiel #4
0
        public bool SaveRelationData(MyRelationData item)
        {
            bool result = true;

            return(result);
        }