public Dialog_ImportNamesapce(MD_Nodes _node) { InitializeComponent(); CurrentNode = _node; this.label2.Visible = false; this.te_Type.EditValue = "0"; }
internal void InserNew(MD_Nodes _nodes, string _groupType) { _guideLineGroup = new MD_GuideLineGroup(); _guideLineGroup.SSDW = _nodes.DWDM; _guideLineGroup.LX = (_groupType == "TJZB") ? 3 : 1; RefreshData(); this.TE_GroupName.Properties.ReadOnly = false; }
public bool SaveNewNodes(MD_Nodes Nodes) { try { OraMetaDataFactroy _of = new OraMetaDataFactroy(); return(_of.SaveNewNodes(Nodes)); } catch (Exception ex) { throw new FaultException(ex.Message); } }
private void LoadNamespaceOfNodes(TreeListNode _fnode, MD_Nodes _mnode) { _fnode.Nodes.Clear(); _mnode.NameSpaces = DAConfig.DataAccess.GetNameSpaceAtNode(_mnode.DWDM) as List <MD_Namespace>; foreach (MD_Namespace _ns in _mnode.NameSpaces) { TreeListNode _node = treeList1.AppendNode(null, _fnode); _node.SetValue(this.treeListColumn1, _ns); _node.HasChildren = true; _node.ImageIndex = 2; _node.SelectImageIndex = 0; } }
public MD_Nodes SaveNew() { _nodesData = new MD_Nodes(); _nodesData.ID = Guid.NewGuid().ToString(); this.NodesData.NodeName = this.TE_NAME.EditValue.ToString(); this.NodesData.DWDM = this.TE_DWDM.EditValue.ToString(); this.NodesData.DisplayTitle = this.TE_DISPLAY.EditValue.ToString(); this.NodesData.Descript = this.TE_DESCRIPT.EditValue.ToString(); using (MetaDataServiceClient _mdc = new MetaDataServiceClient()) { if (_mdc.SaveNewNodes(this.NodesData)) { XtraMessageBox.Show("添加成功!"); } return(_nodesData); } }
//保存新 public void SaveNew(MD_Nodes _nodes) { MD_Namespace _ns = new MD_Namespace(); _ns.NameSpace = this.TE_NAMESPACE.EditValue.ToString(); _ns.Description = this.TE_DESCRIPT.EditValue.ToString(); _ns.MenuPosition = (this.TE_MENU.EditValue == null) ? "" : this.TE_MENU.EditValue.ToString(); _ns.DisplayTitle = this.TE_DISPLAY.EditValue.ToString(); _ns.Owner = this.TE_OWNER.EditValue.ToString(); _ns.DisplayOrder = this.TE_ORDER.EditValue.ToString() == "" ? 0 : int.Parse(this.TE_ORDER.EditValue.ToString()); _ns.DWDM = this.TE_DWDM.EditValue.ToString(); _ns.Concepts = this.TE_CONCEPTS.EditValue.ToString(); _ns.Nodes = _nodes; using (MetaDataServiceClient _mdc = new MetaDataServiceClient()) { _mdc.SaveNewNameSapce(_ns); } }
public static bool SaveNodes(MD_Nodes mdNode) { //SqlParameter[] _param = { // new SqlParameter("@NODENAME", SqlDbType.NVarChar, 100), // new SqlParameter("@DISPLAYTITLE", SqlDbType.NVarChar, 200), // new SqlParameter("@DESCRIPT", SqlDbType.NVarChar, 2000), // new SqlParameter("@DWDM", SqlDbType.NVarChar, 100), // new SqlParameter("@ID", SqlDbType.NVarChar, 100) // }; //_param[0].Value = mdNode.NodeName; //_param[1].Value = mdNode.DisplayTitle; //_param[2].Value = mdNode.Descript; //_param[3].Value = mdNode.DWDM; //_param[4].Value = mdNode.ID; //SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringProfile, CommandType.Text, SqlUpdateNode, _param); //return true; IDbConnection conn = new SqlConnection(SqlHelper.ConnectionStringProfile); conn.Execute(SqlUpdateNode, mdNode); return(true); }
private void LoadChildData(TreeListNode _fnode, object _value) { if (_value is MD_Nodes) { MD_Nodes _nodes = _value as MD_Nodes; LoadNamespaceOfNodes(_fnode, _nodes); } if (_value is MD_Namespace) { MD_Namespace _ns = _value as MD_Namespace; LoadInputViewOfNamespace(_fnode, _ns); } if (_value is MD_InputModel) { MD_InputModel _model = _value as MD_InputModel; LoadInputModelDetial(_fnode, _model); } if (_value is MD_Title) { MD_Title _title = _value as MD_Title; switch (_title.TitleType) { case "MD_INPUTCOLUMES": LoadInputModelColumnGroup(_fnode, _title.FatherObj as MD_InputModel); break; case "MD_SAVEDEFINE": Load_SaveDesTables(_fnode, _title.FatherObj as MD_InputModel); break; case "MD_CHILDDEFINE": Load_ChildModel(_fnode, _title.FatherObj as MD_InputModel); break; } } }
/// <summary> /// 新增节点信息 /// </summary> /// <param name="_nodes"></param> /// <returns></returns> public static bool AddNewNode(MD_Nodes node) { StringBuilder _sb = new StringBuilder(); _sb.Append("insert into MD_NODES (ID,NODENAME,DISPLAYTITLE,DESCRIPT,DWDM) "); _sb.Append(" values (@ID,@NODENAME,@DISPLAYTITLE,@DESCRIPT,@DWDM) "); SqlParameter[] _param = { new SqlParameter("@ID", SqlDbType.NVarChar, 100), new SqlParameter("@NODENAME", SqlDbType.NVarChar, 100), new SqlParameter("@DISPLAYTITLE", SqlDbType.NVarChar, 200), new SqlParameter("@DESCRIPT", SqlDbType.NVarChar, 2000), new SqlParameter("@DWDM", SqlDbType.NVarChar, 100) }; _param[0].Value = node.ID; _param[1].Value = node.NodeName; _param[2].Value = node.DisplayTitle; _param[3].Value = node.Descript; _param[4].Value = node.DWDM; SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringProfile, CommandType.Text, _sb.ToString(), _param); return(true); }
private void LoadChildData(TreeListNode _fnode, object _value) { using (MetaDataServiceClient _mdc = new MetaDataServiceClient()) { if (_value is MD_Nodes) { _fnode.Nodes.Clear(); MD_Nodes _nodes = _value as MD_Nodes; MD_Title _mt = new MD_Title("统计指标", "MD_TJZB", _nodes); TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _mt); _newnode.HasChildren = true; _newnode.ImageIndex = 1; _newnode.SelectImageIndex = 2; _mt = new MD_Title("报表指标", "MD_REPORTGUIDLINE", _nodes); _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _mt); _newnode.HasChildren = true; _newnode.ImageIndex = 1; _newnode.SelectImageIndex = 2; } if (_value is MD_Title) { IList <MD_GuideLineGroup> _guideLineGroups = null; _fnode.Nodes.Clear(); MD_Title _mdtitle = _value as MD_Title; MD_Nodes _nodes = (MD_Nodes)_mdtitle.FatherObj; switch (_mdtitle.TitleType) { case "MD_TJZB": _guideLineGroups = _mdc.GetGuideLineGroup(_nodes.DWDM, "3"); //参数3表示统计指标 foreach (MD_GuideLineGroup _tb in _guideLineGroups) { TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _tb); _newnode.ImageIndex = 0; _newnode.SelectImageIndex = 2; _newnode.HasChildren = true; } break; case "MD_REPORTGUIDLINE": _guideLineGroups = _mdc.GetGuideLineGroup(_nodes.DWDM, "1"); //参数1表示报表指标 foreach (MD_GuideLineGroup _tb in _guideLineGroups) { TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _tb); _newnode.ImageIndex = 0; _newnode.SelectImageIndex = 2; _newnode.HasChildren = true; } break; } } if (_value is MD_GuideLineGroup) { MD_GuideLineGroup _glg = _value as MD_GuideLineGroup; switch (_glg.LX) { case 1: //报表指标 break; case 3: //统计指标 List <MD_GuideLine> _guideLineList = _mdc.GetGuideLineOfGroup(_glg.ZBZTMC).ToList <MD_GuideLine>(); _glg.ChildGuideLines = _guideLineList; foreach (MD_GuideLine _gl in _guideLineList) { TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _gl); _newnode.ImageIndex = 0; _newnode.SelectImageIndex = 2; _newnode.HasChildren = true; _gl.MD_GuideLineGroup = _glg; } break; } } if (_value is MD_GuideLine) { MD_GuideLine _gline = _value as MD_GuideLine; List <MD_GuideLine> _childGuideLineList = _mdc.GetChildGuideLines(_gline.ID).ToList <MD_GuideLine>(); _gline.Children = _childGuideLineList; foreach (MD_GuideLine _gl in _childGuideLineList) { TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _gl); _newnode.ImageIndex = 0; _newnode.SelectImageIndex = 2; _newnode.HasChildren = true; } } } }
public Dialog_AddGuideLineGroup(MD_Nodes _nodes, string _groupType) { InitializeComponent(); this.guideLineGroupManager1.InserNew(_nodes, _groupType); }
public Dialog_AddNameSpace(MD_Nodes _node) { InitializeComponent(); this.nameSpaceManager1.InsertNewNs(_node); }
public NodeManager(MD_Nodes _nodes) { InitializeComponent(); NodesData = _nodes; }
public void SaveData(MD_Nodes _node) { this.nameSpaceManager1.SaveNew(_node); }
private void LoadChildData(TreeListNode _fnode, object _value) { using (MetaDataServiceClient _mdc = new MetaDataServiceClient()) { MD_Title _mt; MD_Namespace _ns; if (_value is MD_Nodes) { _fnode.Nodes.Clear(); MD_Nodes _node = _value as MD_Nodes; IList <MD_Namespace> _namespaces = _mdc.GetNameSpaceAtNode(_node.DWDM); if (_node.NameSpaces == null) { _node.NameSpaces = new List <MD_Namespace>(); } foreach (MD_Namespace _space in _namespaces) { TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _space); _newnode.ImageIndex = 1; _newnode.SelectImageIndex = 0; _newnode.HasChildren = true; _node.NameSpaces.Add(_space); } _mt = new MD_Title("菜单定义", "MD_MENU", _node); TreeListNode _newnode2 = treeList1.AppendNode(null, _fnode); _newnode2.SetValue(this.treeListColumn1, _mt); _newnode2.ImageIndex = 1; _newnode2.SelectImageIndex = 0; _newnode2.HasChildren = true; } if (_value is MD_Namespace) { _fnode.Nodes.Clear(); _ns = _value as MD_Namespace; _mt = new MD_Title("数据表", "MD_TABLE", _ns); TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _mt); _newnode.ImageIndex = 1; _newnode.SelectImageIndex = 0; _newnode.HasChildren = true; _mt = new MD_Title("查询模型", "MD_QUERYMODEL", _ns); _newnode = treeList1.AppendNode(null, _fnode); _newnode.ImageIndex = 1; _newnode.SelectImageIndex = 0; _newnode.SetValue(this.treeListColumn1, _mt); _newnode.HasChildren = true; _mt = new MD_Title("代码表", "MD_REFTABLE", _ns); _newnode = treeList1.AppendNode(null, _fnode); _newnode.ImageIndex = 1; _newnode.SelectImageIndex = 0; _newnode.SetValue(this.treeListColumn1, _mt); _newnode.HasChildren = true; } if (_value is MD_Title) { _fnode.Nodes.Clear(); MD_Title _mdtitle = _value as MD_Title; switch (_mdtitle.TitleType) { case "MD_TABLE": _ns = (MD_Namespace)_mdtitle.FatherObj; IList <MD_Table> _tables = _mdc.GetTablesAtNamespace(_ns.NameSpace); if (_ns.TableList == null) { _ns.TableList = new List <MD_Table>(); } foreach (MD_Table _tb in _tables) { TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _tb); _newnode.HasChildren = true; _newnode.ImageIndex = 2; _newnode.SelectImageIndex = 0; _ns.TableList.Add(_tb); _tb.NamespaceName = _ns.NameSpace; } break; case "MD_QUERYMODEL": _ns = (MD_Namespace)_mdtitle.FatherObj; IList <MD_QueryModel> _models = _mdc.GetQueryModelAtNamespace(_ns.NameSpace); if (_ns.QueryModelList == null) { _ns.QueryModelList = new List <MD_QueryModel>(); } foreach (MD_QueryModel _model in _models) { TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _model); _newnode.ImageIndex = 1; _newnode.SelectImageIndex = 0; _newnode.HasChildren = true; _ns.QueryModelList.Add(_model); _model.Namespace = _ns; } break; case "MD_REFTABLE": _ns = (MD_Namespace)_mdtitle.FatherObj; IList <MD_RefTable> _refTables = _mdc.GetRefTableAtNamespace(_ns.NameSpace); if (_ns.RefTableList == null) { _ns.RefTableList = new List <MD_RefTable>(); } foreach (MD_RefTable _rt in _refTables) { TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _rt); _newnode.ImageIndex = 2; _newnode.SelectImageIndex = 0; _newnode.HasChildren = false; _ns.RefTableList.Add(_rt); _rt.Namespace = _ns; } break; case "MD_MENU": MD_Nodes _node = (MD_Nodes)_mdtitle.FatherObj; IList <MD_Menu> _menuTable = _mdc.GetMenuDefineOfNode(_node.DWDM); foreach (MD_Menu _menu in _menuTable) { TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _menu); if (_menu.MenuType.Length > 3 && _menu.MenuType.Substring(0, 3) == "WEB") { _newnode.ImageIndex = 4; _newnode.SelectImageIndex = 0; } else if (_menu.MenuType.Length > 3 && _menu.MenuType.Substring(0, 3) == "SL_") { _newnode.ImageIndex = 5; _newnode.SelectImageIndex = 0; } else { _newnode.ImageIndex = 2; _newnode.SelectImageIndex = 0; } _newnode.HasChildren = true; _menu.NodeID = _node.ID; _menu.MD_Nodes = _node; } break; case "MD_CONCEPTGROUP": InitConceptGroup(_fnode); break; case "MD_VIEW_GUIDELINE": InitView2GuideLine(_fnode, (MD_QueryModel)_mdtitle.FatherObj); break; case "MD_VIEW_APPLICATION": InitView2Application(_fnode, (MD_QueryModel)_mdtitle.FatherObj); break; case "MD_VIEW_EXRIGHT": InitViewExRight(_fnode, (MD_QueryModel)_mdtitle.FatherObj); break; } } if (_value is MD_QueryModel_ExRight) { _fnode.Nodes.Clear(); MD_QueryModel_ExRight _fright = _value as MD_QueryModel_ExRight; IList <MD_QueryModel_ExRight> _erList = _mdc.GetQueryModelExRights(_fright.ModelID, _fright.ID); foreach (MD_QueryModel_ExRight _right in _erList) { TreeListNode _node = treeList1.AppendNode(null, _fnode); _node.ImageIndex = 1; _node.SelectImageIndex = 0; _node.SetValue(this.treeListColumn1, _right); _node.HasChildren = true; } } if (_value is MD_QueryModel) { _fnode.Nodes.Clear(); MD_QueryModel _qm = _value as MD_QueryModel; MD_ViewTable _mainTable = _mdc.GetMainTableOfQueryModel(_qm.QueryModelID); if (_mainTable != null) { TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _mainTable); _newnode.ImageIndex = 2; _newnode.SelectImageIndex = 0; _newnode.HasChildren = true; _mainTable.QueryModelID = _qm.QueryModelID; _qm.MainTable = _mainTable; } List <MD_View2ViewGroup> _v2vGroup = _mdc.GetView2ViewGroupOfQueryModel(_qm.QueryModelID).ToList <MD_View2ViewGroup>(); if (_v2vGroup != null && _v2vGroup.Count > 0) { foreach (MD_View2ViewGroup _g in _v2vGroup) { TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _g); _newnode.ImageIndex = 3; _newnode.SelectImageIndex = 0; _newnode.HasChildren = true; _g.QueryModelID = _qm.QueryModelID; } } _mt = new MD_Title("关联数据指标", "MD_VIEW_GUIDELINE", _qm); TreeListNode _newqxnode2 = treeList1.AppendNode(null, _fnode); _newqxnode2.ImageIndex = 8; _newqxnode2.SelectImageIndex = 0; _newqxnode2.SetValue(this.treeListColumn1, _mt); _newqxnode2.HasChildren = true; _mt = new MD_Title("集成应用展示", "MD_VIEW_APPLICATION", _qm); TreeListNode _newAppnode = treeList1.AppendNode(null, _fnode); _newAppnode.ImageIndex = 8; _newAppnode.SelectImageIndex = 0; _newAppnode.SetValue(this.treeListColumn1, _mt); _newAppnode.HasChildren = true; _mt = new MD_Title("扩展权限定义", "MD_VIEW_EXRIGHT", _qm); TreeListNode _newqxnode = treeList1.AppendNode(null, _fnode); _newqxnode.ImageIndex = 6; _newqxnode.SelectImageIndex = 0; _newqxnode.SetValue(this.treeListColumn1, _mt); _newqxnode.HasChildren = true; } if (_value is MD_View2ViewGroup) { _fnode.Nodes.Clear(); MD_View2ViewGroup _v2vg = _value as MD_View2ViewGroup; List <MD_View2View> _v2vs = _mdc.GetView2ViewList(_v2vg.ID, _v2vg.QueryModelID).ToList <MD_View2View>(); if (_v2vs != null) { foreach (MD_View2View _v in _v2vs) { TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _v.QueryModelID = _v2vg.QueryModelID; _v.ViewGroupID = _v2vg.ID; _newnode.SetValue(this.treeListColumn1, _v); _newnode.ImageIndex = 2; _newnode.SelectImageIndex = 0; _newnode.HasChildren = true; } } } if (_value is MD_Table) { _fnode.Nodes.Clear(); MD_Table _tb = _value as MD_Table; List <MD_Table2View> _t2vs = _mdc.GetTable2ViewList(_tb.TID).ToList <MD_Table2View>(); if (_t2vs != null) { foreach (MD_Table2View _t2v in _t2vs) { TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _t2v); _newnode.ImageIndex = 2; _newnode.SelectImageIndex = 0; _newnode.HasChildren = true; } } } if (_value is MD_ViewTable) { _fnode.Nodes.Clear(); MD_ViewTable _vt = _value as MD_ViewTable; if (_vt.ViewTableType == MDType_ViewTable.MainTable) { MetaDataServiceClient _msc = new MetaDataServiceClient(); IList <MD_ViewTable> _childTables = _msc.GetChildTableOfQueryModel(_vt.QueryModelID); foreach (MD_ViewTable _cvt in _childTables) { TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _cvt); _newnode.ImageIndex = 2; _newnode.SelectImageIndex = 0; _newnode.HasChildren = true; _cvt.QueryModelID = _vt.QueryModelID; } } } if (_value is MD_Menu) { MD_Menu _fmenu = _value as MD_Menu; IList <MD_Menu> _menuTable = _mdc.GetSubMenuDefine(_fmenu.MenuID); foreach (MD_Menu _menu in _menuTable) { TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _menu); if (_menu.MenuType.Length > 3 && _menu.MenuType.Substring(0, 3) == "WEB") { _newnode.ImageIndex = 4; _newnode.SelectImageIndex = 0; } else if (_menu.MenuType.Length > 3 && _menu.MenuType.Substring(0, 3) == "SL_") { _newnode.ImageIndex = 5; _newnode.SelectImageIndex = 0; } else { _newnode.ImageIndex = 2; _newnode.SelectImageIndex = 0; } _newnode.HasChildren = true; _menu.NodeID = _fmenu.MD_Nodes.ID; _menu.MD_Nodes = _fmenu.MD_Nodes; } } if (_value is MD_ConceptGroup) { MD_ConceptGroup _cGroup = _value as MD_ConceptGroup; List <MD_ConceptItem> _itemDefines = _mdc.GetSubConceptTagDefine(_cGroup.Name).ToList <MD_ConceptItem>(); _cGroup.Items = _itemDefines; _fnode.Nodes.Clear(); foreach (MD_ConceptItem _item in _itemDefines) { TreeListNode _newnode = treeList1.AppendNode(null, _fnode); _newnode.SetValue(this.treeListColumn1, _item); _newnode.HasChildren = false; } } } }
public bool SaveNewNodes(MD_Nodes _nodes) { return(MetaDataFactroy.SaveNewNodes(_nodes)); }
internal void InsertNewNs(MD_Nodes _node) { this.TE_NAMESPACE.Properties.ReadOnly = false; this.TE_OWNER.EditValue = _node.NodeName; this.TE_DWDM.EditValue = _node.DWDM; }
public async Task <bool> SaveNewNodes(MD_Nodes nodes) { var ret = await this.mdService.SaveNewNodes(nodes); return(ret); }
public MD_Nodes SaveData() { _nodesData = this.nodeManager1.SaveNew(); return(_nodesData); }