コード例 #1
0
        private void 添加医生ToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            modifyFlag = 0;
            UCCreatDoctor UC = new UCCreatDoctor(this);

            UC.Location = new System.Drawing.Point(0, 0);
            panel1.Controls.Clear();
            panel1.Controls.Add(UC);
            panel1.Text = "添加医生";
        }
コード例 #2
0
 private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     treeView1.SelectedNode = e.Node;
     if (e.Button == MouseButtons.Left)
     {
         modifyFlag = 1;
         if (e.Node.Level == 0)
         {
             name = e.Node.Text;
             id   = e.Node.Name;;
             UCUpdateDepartment UC = new UCUpdateDepartment(this);
             UC.Location = new System.Drawing.Point(0, 0);
             panel1.Controls.Clear();
             panel1.Controls.Add(UC);
         }
         else
         {
             name = e.Node.Text;
             id   = e.Node.Name;;
             UCCreatDoctor UC = new UCCreatDoctor(this);
             UC.Location = new System.Drawing.Point(0, 0);
             panel1.Controls.Clear();
             panel1.Controls.Add(UC);
             panel1.Text = "添加医生";
         }
     }
     else
     {
         if (e.Node.Level == 0)
         {
             deptid = e.Node.Name;
             contextMenuStrip1.Items[1].Enabled = true;
             contextMenuStrip1.Items[2].Enabled = true;
         }
         else
         {
             name = e.Node.Text;
             id   = e.Node.Name;
             contextMenuStrip1.Items[1].Enabled = true;
             contextMenuStrip1.Items[2].Enabled = true;
             contextMenuStrip1.Items[3].Enabled = true;
         }
     }
 }