Beispiel #1
0
        /// <summary>
        /// 初始化医嘱批次信息
        /// </summary>
        /// <returns></returns>
        private int InitOrderGroup()
        {
            Neusoft.HISFC.BizLogic.Pharmacy.Constant consManager = new Neusoft.HISFC.BizLogic.Pharmacy.Constant();

            List <Neusoft.HISFC.Models.Pharmacy.OrderGroup> orderGroupList = consManager.QueryOrderGroup();

            if (orderGroupList == null)
            {
                MessageBox.Show(Language.Msg("获取医嘱批次信息发生错误"));
                return(-1);
            }

            string[] strOrderGroup = new string[orderGroupList.Count + 1];
            strOrderGroup[0] = "全部";
            int i = 1;

            foreach (Neusoft.HISFC.Models.Pharmacy.OrderGroup info in orderGroupList)
            {
                strOrderGroup[i] = info.ID;
                i++;
            }

            this.cmbOrderGroup.Items.AddRange(strOrderGroup);

            string orderGroup = consManager.GetOrderGroup(consManager.GetDateTimeFromSysDateTime());

            if (orderGroup != "")
            {
                this.cmbOrderGroup.Text = orderGroup;
            }

            return(1);
        }
        private static string GetCompoundGroup(DateTime useTime)
        {
            if (orderGroupList == null)
            {
                Neusoft.HISFC.BizLogic.Pharmacy.Constant consManager = new Neusoft.HISFC.BizLogic.Pharmacy.Constant();
                orderGroupList = consManager.QueryOrderGroup();
            }

            DateTime juegeTime = new DateTime(2000, 12, 12, useTime.Hour, useTime.Minute, useTime.Second);

            if (orderGroupList != null)
            {
                foreach (Neusoft.HISFC.Models.Pharmacy.OrderGroup info in orderGroupList)
                {
                    if (juegeTime >= info.BeginTime && juegeTime <= info.EndTime)
                    {
                        return(info.ID);
                    }
                }
            }

            return("");
        }