コード例 #1
0
        /// <summary>
        /// 初始化原始数据
        /// </summary>
        private void LoadDrugSplitProperty()
        {
            //药品信息实体
            Neusoft.HISFC.Models.Pharmacy.Item drugInfo;
            //临时变量,合成拆分属性
            string tempProperty = "";
            //获取全部配药属性
            ArrayList alProperty = drugManager.QueryDrugProperty();

            if (alProperty == null)
            {
                MessageBox.Show(Language.Msg("获取配药属性出错!") + drugManager.Err);
                return;
            }
            Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm(Language.Msg("正在加载药品配药属性信息..."));
            Application.DoEvents();
            foreach (Neusoft.FrameWork.Models.NeuObject info in alProperty)
            {
                switch (info.User01)
                {
                case "0":
                    tempProperty = "0不可拆分";
                    break;

                case "1":
                    tempProperty = "1可拆分不取整";
                    break;

                case "2":
                    tempProperty = "2可拆分上取整";
                    break;

                case "3":
                    tempProperty = "3不可拆分当日取整";
                    break;

                case "4":
                    tempProperty = "4可拆分按科室取整";
                    break;

                case "5":
                    tempProperty = "5可拆分按病区取整";
                    break;
                }
                //药品
                if (info.Memo == "0")
                {
                    //取药品字典信息
                    drugInfo = this.drugManager.GetItem(info.ID);
                    if (drugInfo == null)
                    {
                        continue;
                    }
                    //拆分属性
                    drugInfo.User01 = tempProperty;
                    //部门编码
                    drugInfo.Product.Company.ID = info.User02;

                    //drugInfo.Product.Company.Name = this.objHelper.GetObjectFromID(info.User02).Name;
                    drugInfo.Product.Company.Name = this.objHelper.GetName(info.User02);

                    //部门名称
                    this.AddRow(drugInfo, 0);
                }
                else//剂型
                {
                    drugInfo = new Neusoft.HISFC.Models.Pharmacy.Item();
                    //剂型编码
                    drugInfo.ID = info.ID;
                    //剂型名称
                    drugInfo.Name = info.Name;
                    //拆分属性
                    drugInfo.User01 = tempProperty;
                    //部门编码
                    drugInfo.Product.Company.ID = info.User02;
                    //部门名称
                    drugInfo.Product.Company.Name = this.objHelper.GetObjectFromID(info.User02).Name;
                    this.AddRow(drugInfo, 1);
                }
            }
            Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm();
        }