Example #1
0
        private void LinkEdit_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            ImageComboBoxItem selItem = lbType.SelectedItem as ImageComboBoxItem;

            if (selItem != null)
            {
                var    drs    = _intelibType.Select("type_id=" + selItem.Value);
                string doc_id = drs[0]["doc_id"].ToString();
                if (doc_id == TmoComm.login_docInfo.doc_id.ToString())
                {
                    UCIntervenelibTypeEditor typeEditor = new UCIntervenelibTypeEditor()
                    {
                        Title = "修改干预库类型", PrimaryKeyValue = selItem.Value.ToString(), DbOperaType = DBOperateType.Update
                    };
                    if (typeEditor.ShowDialog() == DialogResult.OK)
                    {
                        DXMessageBox.Show("干预库类型修改成功!", true);
                        _intelibType = Tmo_FakeEntityClient.Instance.GetData("tmo_intervenelibtype");
                        TSCommon.BindImageComboBox(lbType, _intelibType, null, "type_name", "type_id");
                    }
                    typeEditor.Dispose();
                }
                else
                {
                    DXMessageBox.ShowWarning("没有权限(非创建者)!\n创建者ID[" + doc_id + "]");
                }
            }
        }
Example #2
0
        private void LinkAdd_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            UCIntervenelibTypeEditor typeEditor = new UCIntervenelibTypeEditor()
            {
                Title = "新建干预库类型", DbOperaType = DBOperateType.Add
            };

            if (typeEditor.ShowDialog() == DialogResult.OK)
            {
                DXMessageBox.Show("干预库类型创建成功!", true);
                _intelibType = Tmo_FakeEntityClient.Instance.GetData("tmo_intervenelibtype");
                TSCommon.BindImageComboBox(lbType, _intelibType, null, "type_name", "type_id");
            }
            typeEditor.Dispose();
        }