예제 #1
0
        /// <summary>
        /// 采购计划单据列表
        /// </summary>
        /// <param name="privDept">权限科室</param>
        /// <param name="stockState">采购状态</param>
        public void ShowStockPlanList(Neusoft.FrameWork.Models.NeuObject privDept, string stockState)
        {
            //清空列表
            this.Nodes.Clear();

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

            //显示采购单列表  0 状态为入库计划单
            ArrayList alList = itemManager.QueryStockPLanCompanayList(privDept.ID, stockState);

            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
            {
                this.Nodes.Add(new System.Windows.Forms.TreeNode("采购计划单列表", 0, 0));
                foreach (Neusoft.FrameWork.Models.NeuObject info in alList)
                {
                    System.Windows.Forms.TreeNode node = new System.Windows.Forms.TreeNode();

                    node.Text               = "【" + info.ID + "】" + info.Name;//【入库计划单号】+供货公司名称
                    node.ImageIndex         = 2;
                    node.SelectedImageIndex = 4;

                    //初始入库计划制定时指定供货公司编码为'0000000000'
                    if (info.User01 == null || info.User01.Trim() == "")
                    {
                        info.User01 = "0000000000";
                    }

                    node.Tag = info;   //入库计划单号+供货公司ID

                    this.Nodes[0].Nodes.Add(node);
                }
                this.Nodes[0].ExpandAll();
                this.SelectedNode = this.Nodes[0];
            }
        }
예제 #2
0
        /// <summary>
        /// 采购单据查询
        /// </summary>
        protected override void QueryStock()
        {
            Neusoft.HISFC.BizLogic.Pharmacy.Item itemManager = new Neusoft.HISFC.BizLogic.Pharmacy.Item();

            ArrayList al = itemManager.QueryStockPLanCompanayList(this.DeptInfo.ID, "2");

            if (al == null)
            {
                MessageBox.Show(Language.Msg("获取采购单列表发生错误!" + itemManager.Err));
                return;
            }

            this.neuSpread1_Sheet1.Rows.Count = 0;

            foreach (Neusoft.FrameWork.Models.NeuObject info in al)
            {
                this.neuSpread1_Sheet1.Rows.Add(0, 1);

                this.neuSpread1_Sheet1.Cells[0, (int)ColumnSet.ColList].Text       = info.ID;       //采购单号
                this.neuSpread1_Sheet1.Cells[0, (int)ColumnSet.ColTargetName].Text = info.Name;     //供货公司名称
                this.neuSpread1_Sheet1.Cells[0, (int)ColumnSet.ColTargetID].Text   = info.User01;   //供货公司编码
            }
        }