Ejemplo n.º 1
0
        /// <summary>
        /// 入库计划单据列表
        /// </summary>
        /// <param name="privDept">权限科室</param>
        /// <param name="planState">计划状态</param>
        public void ShowInPlanList(Neusoft.FrameWork.Models.NeuObject privDept, string planState)
        {
            this.Nodes.Clear();

            Neusoft.HISFC.BizLogic.Pharmacy.Item itemManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item();

            ArrayList alList = itemManager.QueryInPLanList(privDept.ID, "0");

            if (alList == null)
            {
                System.Windows.Forms.MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("获取入库计划单列表发生错误" + itemManager.Err));
                return;
            }

            if (alList.Count == 0)
            {
                this.Nodes.Add(new System.Windows.Forms.TreeNode("没有入库计划单", 0, 0));
            }
            else
            {
                System.Windows.Forms.TreeNode parentNode = new System.Windows.Forms.TreeNode("入库计划单列表", 0, 0);
                this.Nodes.Add(parentNode);

                System.Windows.Forms.TreeNode node;
                string temp = "";
                foreach (Neusoft.FrameWork.Models.NeuObject info in alList)
                {
                    node = new System.Windows.Forms.TreeNode();

                    if (planState == "0")
                    {
                        node.Text = info.ID + "  【计划单】";
                    }
                    else
                    {
                        node.Text = info.ID + "  【采购单】";
                    }

                    node.ImageIndex         = 2;
                    node.SelectedImageIndex = 4;

                    info.Memo = planState;

                    node.Tag = info;

                    if (temp != info.ID)
                    {
                        parentNode.Nodes.Add(node);
                    }

                    temp = info.ID;
                }
                this.Nodes[0].ExpandAll();
                this.SelectedNode = this.Nodes[0];
            }
        }