Esempio n. 1
0
        //保存新
        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);
            }
        }
Esempio n. 2
0
        private void ChangedID(MD_Namespace _ns)
        {
            IDTable.Clear();
            this.label2.Text = "写入命名空间定义 ....";
            Application.DoEvents();
            MD_Namespace _newns = new MD_Namespace();

            _newns.NameSpace    = _ns.NameSpace;
            _newns.Description  = _ns.Description;
            _newns.MenuPosition = _ns.MenuPosition;
            _newns.DisplayTitle = _ns.DisplayTitle;
            _newns.Owner        = "ZHTJ";
            _newns.DisplayOrder = _ns.DisplayOrder;
            _newns.Concepts     = _ns.Concepts;
            _newns.Nodes        = CurrentNode;
            _newns.DWDM         = CurrentNode.DWDM;
            using (MetaDataServiceClient _mdc = new MetaDataServiceClient())
            {
                _mdc.SaveNewNameSapce(_newns);
            }

            _ns.DWDM  = CurrentNode.DWDM;
            _ns.Nodes = CurrentNode;

            this.label2.Text = "写入表定义 ....";
            Application.DoEvents();
            WriteTableDefine_New(_ns);

            this.label2.Text = "写入查询模型定义 ....";
            Application.DoEvents();
            WriteModelDefine_New(_ns);

            this.label2.Text = "写入代码表定义 ....";
            Application.DoEvents();
            WriteRefTable_New(_ns);

            this.label2.Text = "导入完成 ....";
            Application.DoEvents();

            XtraMessageBox.Show("导入成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
Esempio n. 3
0
        private void WriteNamespace(DataTable _dt, DataSet _ds)
        {
            using (MetaDataServiceClient _mdc = new MetaDataServiceClient())
            {
                IDTable.Clear();
                if (_dt.Rows.Count > 0)
                {
                    foreach (DataRow _dr in _dt.Rows)
                    {
                        this.label2.Text = "写入命名空间定义 ....";
                        Application.DoEvents();
                        string _oldNameSpace = _dr["NAMESPACE"].ToString();
                        string _NewNamespace = (this.TE_NEWNAME.EditValue == null || this.TE_NEWNAME.EditValue == "") ? _oldNameSpace : this.TE_NEWNAME.EditValue.ToString();

                        MD_Namespace _ns = new MD_Namespace();
                        _ns.NameSpace    = _NewNamespace;
                        _ns.Description  = _dr["DESCRIPTION"].ToString();
                        _ns.MenuPosition = _dr["MENUPOSITION"].ToString();
                        _ns.DisplayTitle = _dr["DISPLAYTITLE"].ToString();
                        _ns.Owner        = _dr["OWNER"].ToString();
                        _ns.DisplayOrder = _dr.IsNull("DISPLAYORDER") ? 0 : Convert.ToInt32(_dr["DISPLAYORDER"]);
                        _ns.Concepts     = _dr["CONCEPTS"].ToString();
                        _ns.Nodes        = CurrentNode;
                        _ns.DWDM         = CurrentNode.DWDM;
                        _mdc.SaveNewNameSapce(_ns);


                        this.label2.Text = "写入表定义 ....";
                        Application.DoEvents();
                        WriteTableDefine(_oldNameSpace, _ns, _ds);

                        this.label2.Text = "写入查询模型定义 ....";
                        Application.DoEvents();
                        WriteModelDefine(_oldNameSpace, _ns, _ds);

                        this.label2.Text = "写入代码表定义 ....";
                        Application.DoEvents();
                        WriteRefCodeDefine(_oldNameSpace, _ns, _ds);
                    }
                }
            }
        }