Exemple #1
0
        private void OnWebSocketEvent(object data)
        {
            Console.WriteLine("data A6 ======== OK ");

            medCollectDTO = (MTMMedCollectDTO)data;

            String value = "收缩压:";

            value += medCollectDTO.systolicpressure;
            systolicpressure.Text = value;

            String diastolicpressureString = "舒张压:";

            diastolicpressureString += medCollectDTO.diastolicpressure;
            diastolicpressure.Text   = diastolicpressureString;

            if (medCollectDTO.allergicdrug.Count() > 0)
            {
                String resultValue = "";

                foreach (Allergicdrug item in medCollectDTO.allergicdrug)
                {
                    resultValue += item.drugname;
                    resultValue += "  ;";
                }
                isallergy.Text = resultValue;
            }

            mycontrol.ItemsSource = medCollectDTO.drugs;
            mycontrol.Items.Refresh();
        }
Exemple #2
0
        public void Start(object args)
        {
            if (null != args)
            {
                // to do 数据绑定
                medCollectDTO = (MTMMedCollectDTO)args;

                if (String.Equals("no", medCollectDTO.isfirst))
                {
                    if (medCollectDTO.drugs.Count() > 0)
                    {
                        // 只显示药物信息
                        allergyCanvas.Visibility = Visibility.Hidden;

                        bloodPressureCanvas.Visibility = Visibility.Hidden;

                        usedrugCanvas.Margin = new Thickness(700, 246, 102, 106);
                    }
                    else if (medCollectDTO.drugs.Count() == 0)
                    {
                    }
                }

                drugCount             = medCollectDTO.drugs.Count();
                mycontrol.ItemsSource = medCollectDTO.drugs;

                EventAggregator eventAggragator = ServiceLocator.Current.GetInstance <EventAggregator>();
                eventAggragator.GetEvent <WebSocketEvent>().Subscribe(OnWebSocketEvent);
            }
        }
Exemple #3
0
        public void Start(object args)
        {
            if (null != args)
            {
                //customInfo = (MTMCustInfo)args;
                // to do 数据绑定
                medCollectDTO = (MTMMedCollectDTO)args;

                mycontrol.ItemsSource = medCollectDTO.drugs;

                EventAggregator eventAggragator = ServiceLocator.Current.GetInstance <EventAggregator>();
                eventAggragator.GetEvent <WebSocketEvent>().Subscribe(OnWebSocketEvent);
            }
        }
Exemple #4
0
        private void OnWebSocketEvent(object data)
        {
            Console.WriteLine("data A6 ======== OK ");

            medCollectDTO = (MTMMedCollectDTO)data;

            String value = "收缩压:";

            value += medCollectDTO.systolicpressure;
            systolicpressure.Text = value;

            String diastolicpressureString = "舒张压:";

            diastolicpressureString += medCollectDTO.diastolicpressure;
            diastolicpressure.Text   = diastolicpressureString;

            if (medCollectDTO.allergicdrug.Count() > 0)
            {
                String resultValue = "";

                foreach (Allergicdrug item in medCollectDTO.allergicdrug)
                {
                    resultValue += item.drugname;
                    resultValue += "  ;\n";
                }
                isallergy.Text = resultValue;
            }
            else
            {
                isallergy.Text = "\n\n     无过敏药物";
            }

            mycontrol.ItemsSource = medCollectDTO.drugs;
            mycontrol.Items.Refresh();

            if (drugCount < medCollectDTO.drugs.Count())
            {
                scrollviewer.ScrollToBottom();
            }
            drugCount = medCollectDTO.drugs.Count();
            //drugId = "6924147659034";
            //DoWork();
        }