Beispiel #1
0
        /// <summary>
        /// 模版选择
        /// </summary>
        /// <param name="privDept">权限科室</param>
        /// <param name="openType">模版类型</param>
        /// <remarks>{037D86BC-5E18-41dd-8D34-16D89C426B88}公开该方法,用于代码本地化时可以调用</remarks>
        /// <returns>成功返回模版信息  失败返回null</returns>
        public static ArrayList ChooseDrugStencil(string privDept, Neusoft.HISFC.Models.Pharmacy.EnumDrugStencil stencilType)
        {
            Neusoft.HISFC.BizLogic.Pharmacy.Constant consManager = new Neusoft.HISFC.BizLogic.Pharmacy.Constant();

            ArrayList alList = consManager.QueryDrugStencilList(privDept, stencilType);

            if (alList == null)
            {
                System.Windows.Forms.MessageBox.Show(Language.Msg("获取该类型模版发生错误" + consManager.Err));
                return(null);
            }
            if (alList.Count == 0)
            {
                System.Windows.Forms.MessageBox.Show(Language.Msg("无该类型模版数据"));
                return(null);
            }

            ArrayList alSelect = new ArrayList();

            Neusoft.FrameWork.Models.NeuObject selectObj = new Neusoft.FrameWork.Models.NeuObject();
            foreach (Neusoft.HISFC.Models.Pharmacy.DrugStencil temp in alList)
            {
                selectObj      = new Neusoft.FrameWork.Models.NeuObject();
                selectObj.ID   = temp.Stencil.ID;
                selectObj.Name = temp.Stencil.Name;
                selectObj.Memo = temp.OpenType.Name;

                alSelect.Add(selectObj);
            }

            string[] label   = { "模版编码", "模版名称", "模版类型" };
            float[]  width   = { 60F, 100F, 120F };
            bool[]   visible = { true, true, true, false, false, false };
            if (Neusoft.FrameWork.WinForms.Classes.Function.ChooseItem(alSelect, ref selectObj) == 0)
            {
                return(new ArrayList());
            }
            else
            {
                ArrayList alOpenDetail = new ArrayList();

                alOpenDetail = consManager.QueryDrugStencil(selectObj.ID);
                if (alOpenDetail == null)
                {
                    System.Windows.Forms.MessageBox.Show(Language.Msg(consManager.Err));
                    return(null);
                }

                return(alOpenDetail);
            }
        }