示例#1
0
        /// <summary>
        /// 修改诊室
        /// </summary>
        private void ModifyRoom()
        {
            TreeNode node = this.neuTreeView1.SelectedNode;

            if (node == null || node.Tag == null)
            {
                MessageBox.Show("请选择一个诊室", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            if (node.Tag.GetType() != typeof(Neusoft.HISFC.Models.Nurse.Room))
            {
                return;
            }

            Neusoft.HISFC.Models.Nurse.Room info = node.Tag as Neusoft.HISFC.Models.Nurse.Room;
            Nurse.ucRoom ucRoom1 = new ucRoom();
            ucRoom1.StateFlag = "EDIT";
            ucRoom1.RoomInfo  = info;

            ucRoom1.init();
            if (Neusoft.FrameWork.WinForms.Classes.Function.PopShowControl(ucRoom1) == System.Windows.Forms.DialogResult.OK)
            {
                //this.RefreshRooms();
                //this.neuTreeView1.SelectedNode = node;
                //node.Expand();
                node.Text = ucRoom1.RoomInfo.Name;
                if (ucRoom1.RoomInfo.IsValid == "0")
                {
                    this.SetFp("停用");
                }
            }
            this.SetFp();
        }
示例#2
0
        /// <summary>
        /// 添加诊室
        /// </summary>
        private void AddRoom()
        {
            Nurse.ucRoom ucRoom1 = new ucRoom();
            ucRoom1.StateFlag = "ADD";

            TreeNode node = this.neuTreeView1.SelectedNode;

            if (node.Level == 0)
            {
                return;
            }
            if (node == null /*node.Tag == null*/)
            {
                MessageBox.Show("请选择一个护理站", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (node.Tag.GetType() != typeof(Neusoft.HISFC.Models.Base.Department))
            {
                return;
            }

            Neusoft.HISFC.Models.Base.Department info = node.Tag as Neusoft.HISFC.Models.Base.Department;
            ucRoom1.RoomInfo.Nurse = info;
            ucRoom1.init();

            if (Neusoft.FrameWork.WinForms.Classes.Function.PopShowControl(ucRoom1) == System.Windows.Forms.DialogResult.OK)
            {
                TreeNode node2 = new TreeNode(ucRoom1.RoomInfo.Name, 0, 0);
                node2.Tag = ucRoom1.RoomInfo;
                node2.ContextMenuStrip = this.contextMenuStrip1;
                node.Nodes.Add(node2);


                node.Expand();
            }
        }