Exemplo n.º 1
0
        /// <summary>
        /// 采购单据查询
        /// </summary>
        protected override void QueryStock()
        {
            this.ShowStockData();

            Neusoft.HISFC.BizLogic.Material.Plan planManager = new Neusoft.HISFC.BizLogic.Material.Plan();

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

            if (al == null)
            {
                MessageBox.Show("获取采购单列表发生错误!" + planManager.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.User01;                       //供货公司名称
                this.neuSpread1_Sheet1.Cells[0, (int)ColumnSet.ColTargetID].Text   = info.Name;                         //供货公司编码
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 采购计划单据列表
        /// </summary>
        /// <param name="privDept">权限科室</param>
        /// <param name="planState">计划状态</param>
        public void ShowBuyPlanList(Neusoft.FrameWork.Models.NeuObject privDept, string planState)
        {
            this.Nodes.Clear();

            Neusoft.HISFC.BizLogic.Material.Plan planManager = new Neusoft.HISFC.BizLogic.Material.Plan();

            ArrayList alList = planManager.QueryInPLanList(privDept.ID, planState);

            if (alList == null)
            {
                System.Windows.Forms.MessageBox.Show("获取采购计划单列表发生错误" + planManager.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 == "3" || planState == "4" || planState == "5")
                    {
                        node.Text = info.ID + "  【采购单】";
                    }
                    else
                    {
                        node.Text = info.ID + "  【采购单】";
                    }

                    info.Memo = planState;

                    node.ImageIndex = 0;
                    node.Tag        = info;

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

                    temp = info.ID;
                }
                this.Nodes[0].ExpandAll();
                this.SelectedNode = this.Nodes[0];
            }
        }
Exemplo n.º 3
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.Material.Plan planManger = new Neusoft.HISFC.BizLogic.Material.Plan();

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

            if (alList == null)
            {
                System.Windows.Forms.MessageBox.Show("获取采购计划单列表发生错误" + planManger.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.User01;//【入库计划单号】+供货公司名称
                    node.SelectedImageIndex = node.ImageIndex;

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

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

                    this.Nodes[0].Nodes.Add(node);
                }
                this.Nodes[0].ExpandAll();
                this.SelectedNode = this.Nodes[0];
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// 设置目标科室
        /// </summary>
        /// <param name="isCompany">目标单位是否为供货公司 True 供货公司 False 院内科室 设为True时剩余参数无意义</param>
        /// <param name="isPrivInOut">是否维护的入出库科室列表 设为True时 科室类型参数无意义</param>
        /// <param name="companyType">供货公司类型 物资/药品/设备</param>
        /// <param name="deptType">院内科室类型</param>
        /// <returns>成功返回1 失败返回-1</returns>
        public int SetTargetDept(bool isCompany, bool isPrivInOut, Neusoft.HISFC.Models.IMA.EnumModuelType companyType, string deptType)
        {
            this.alTargetDept.Clear();

            this.lnbTarget.Visible     = true;
            this.cmbTargetDept.Visible = true;

            if (isCompany)
            {
                #region 加载供货公司  物资暂时使用药品的供货单位进行测试

                switch (companyType)
                {
                case Neusoft.HISFC.Models.IMA.EnumModuelType.Equipment:             //设备
                    break;

                case Neusoft.HISFC.Models.IMA.EnumModuelType.Material:              //物资
                    Neusoft.HISFC.BizLogic.Material.ComCompany matCompany = new Neusoft.HISFC.BizLogic.Material.ComCompany();
                    this.alTargetDept = matCompany.QueryCompany("1", "A");
                    if (this.alTargetDept == null)
                    {
                        MessageBox.Show("加载物资供货公司列表失败" + matCompany.Err);
                        return(-1);
                    }
                    break;
                    //case Neusoft.HISFC.Models.IMA.EnumModuelType.Phamacy:			 //药品
                    //    Neusoft.HISFC.BizLogic.Pharmacy.Constant phaConstantManager = new Neusoft.HISFC.BizLogic.Pharmacy.Constant();
                    //    this.alTargetDept = phaConstantManager.GetCompany("1");
                    //    if (this.alTargetDept == null)
                    //    {
                    //        MessageBox.Show("加载药品供货公司列表失败" + phaConstantManager.Err);
                    //        return -1;
                    //    }
                    //    break;
                }

                foreach (Neusoft.FrameWork.Models.NeuObject info in this.alTargetDept)
                {
                    info.Memo = "1";
                }

                #endregion
            }
            else
            {
                if (isPrivInOut)        //权限科室
                {
                    #region 取入出权限科室

                    ArrayList tempAl;
                    Neusoft.HISFC.BizLogic.Material.Plan privInOutManager = new Neusoft.HISFC.BizLogic.Material.Plan();
                    tempAl = privInOutManager.GetPrivInOutDeptList(this.deptInfo.ID, this.class2Priv.ID);
                    if (tempAl == null)
                    {
                        MessageBox.Show(privInOutManager.Err);
                        return(-1);
                    }
                    //由privInOutDept转换为neuobject存储
                    //Neusoft.FrameWork.Models.NeuObject offerInfo;
                    Neusoft.HISFC.Models.Base.DepartmentStat offerInfo;
                    Neusoft.HISFC.Models.Base.PrivInOutDept  privInOutDept;
                    for (int i = 0; i < tempAl.Count; i++)
                    {
                        privInOutDept       = tempAl[i] as Neusoft.HISFC.Models.Base.PrivInOutDept;
                        offerInfo           = new Neusoft.HISFC.Models.Base.DepartmentStat();
                        offerInfo.ID        = privInOutDept.Dept.ID;        //供货单位编码
                        offerInfo.Name      = privInOutDept.Dept.Name;      //供货单位名称
                        offerInfo.Memo      = privInOutDept.Memo;           //备注
                        offerInfo.SpellCode = privInOutDept.User01;
                        offerInfo.WBCode    = privInOutDept.User02;
                        offerInfo.UserCode  = privInOutDept.User03;
                        this.alTargetDept.Add(offerInfo);
                    }

                    #endregion
                }
                else
                {
                    #region 根据科室类别获取院内科室

                    Neusoft.HISFC.BizLogic.Manager.Department managerIntegrate = new Neusoft.HISFC.BizLogic.Manager.Department();
                    this.alTargetDept = managerIntegrate.GetDeptment(deptType);
                    if (this.alTargetDept == null)
                    {
                        MessageBox.Show("根据科室类别获取科室列表发生错误" + managerIntegrate.Err);
                        return(-1);
                    }
                    foreach (Neusoft.FrameWork.Models.NeuObject info in this.alTargetDept)
                    {
                        info.Memo = "0";
                        //info.User01 = mySpell.Get(info.Name).SpellCode;
                    }

                    #endregion
                }
            }

            if (this.isSetDefaultTargetDept)
            {
                if (this.targetDept.ID == "")
                {
                    if (this.alTargetDept.Count > 0)
                    {
                        if (this.localTargetDept != null && this.localTargetDept.ID != "")
                        {
                            this.TargetDept      = this.localTargetDept;
                            this.localTargetDept = null;
                        }
                        else
                        {
                            this.TargetDept = this.alTargetDept[0] as Neusoft.FrameWork.Models.NeuObject;
                        }
                    }
                }
            }

            return(1);
        }