Esempio n. 1
0
        // ReSharper disable once InconsistentNaming
        public void UpdateUI(int value)
        {
            var dt = new SqlLoader().LoadPatient(_currentPatient.FacilityAccountId);

            if (dt?.Rows.Count > 0)
            {
                var row = dt.Rows[0];

                var now = DateTime.Now;

                _synchronizationContext.Post(new SendOrPostCallback(o =>
                {
                    labelRiskScore.Text          = row["PredictedProbNBR"].ToString();
                    labelFactor1.Text            = row["Factor1TXT"].ToString();
                    labelFactor2.Text            = row["Factor2TXT"].ToString();
                    labelFactor3.Text            = row["Factor3TXT"].ToString();
                    labelLastCalculatedDate.Text = row["LastCalculatedDTS"].ToString();
                    labelLastChecked.Text        = now.ToLongTimeString();
                    labelStatus.Text             = _logger.GetStatus();
                    progressBarStatus.Value      = realtimeProgress;
                }), value);
            }
            else
            {
                var now = DateTime.Now;

                _synchronizationContext.Post(new SendOrPostCallback(o =>
                {
                    labelLastChecked.Text   = now.ToLongTimeString();
                    labelStatus.Text        = _logger.GetStatus();
                    progressBarStatus.Value = realtimeProgress;
                }), value);
            }
        }
Esempio n. 2
0
        private void UpdatePatientRisk()
        {
            var dt = new SqlLoader().LoadPatient(_currentPatient.FacilityAccountId);

            if (dt?.Rows != null && dt.Rows.Count > 0)
            {
                var row = dt.Rows[0];
                labelRiskScore.Text          = row["PredictedProbNBR"].ToString();
                labelFactor1.Text            = row["Factor1TXT"].ToString();
                labelFactor2.Text            = row["Factor2TXT"].ToString();
                labelFactor3.Text            = row["Factor3TXT"].ToString();
                labelLastCalculatedDate.Text = row["LastCalculatedDTS"].ToString();
            }
        }