private void PopulateSelectList(ref DropDownList ddlControl, int parameterId)
        {
            ILabManager labMgr = (ILabManager)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabManager, BusinessProcess.Laboratory");

            List <ParameterResultOption> options = labMgr.GetParameterResultOption(parameterId);

            if (options != null)
            {
                options.OrderBy(o => o.Text);
                ddlControl.Items.Clear();
                ddlControl.ClearSelection();
                ddlControl.Items.Add(new ListItem("Select...", "-1"));

                foreach (ParameterResultOption option in options)
                {
                    ListItem item = (new ListItem(option.Text, option.Id.ToString()));
                    ddlControl.Items.Add(item);
                }
            }
        }
Esempio n. 2
0
        private void GetParameterDetails(int LabTestId, int parameterId)
        {
            TestParameter testParameter = mGr.GetLabTestParameterById(LabTestId, parameterId);

            ParameterId = testParameter.Id;
            if (testParameter.DataType == "SELECTLIST")
            {
                testParameter.ResultOption = mGr.GetParameterResultOption(testParameter.Id);
                this.ParamOptions          = testParameter.ResultOption;
                foreach (ParameterResultOption option in testParameter.ResultOption)
                {
                    lboxOptions.Items.Add(new ListItem(option.Text, option.Id.ToString()));
                }
                this.svUnits   = "none";
                this.svOptions = "";
            }
            else if (testParameter.DataType == "NUMERIC")
            {
                testParameter.ResultConfig = mGr.GetParameterConfig(testParameter.Id);
                if (null == testParameter.ResultConfig || testParameter.ResultConfig.Count() == 0)
                {
                }
                else
                {
                    this.UnitConfig = testParameter.ResultConfig;
                }
                this.svUnits   = "";
                this.svOptions = "none";
                this.BindParameterConfig();
            }


            labelName.Text     = textParameterName.Text = testParameter.Name;
            textReference.Text = labelReference.Text = testParameter.ReferenceId;
            ddlDataType.ClearSelection();
            ddlDataType.SelectedValue = testParameter.DataType;
            textRank.Text             = testParameter.Rank.ToString();
            labelDataType.Text        = ddlDataType.SelectedItem.Text;
            textLoincCode.Text        = labelLoincCode.Text = testParameter.LoincCode;
        }