Ejemplo n.º 1
0
        private void LoadExistingData()
        {
            DataSet theDSExistingForm = new DataSet();


            theDSExistingForm = CageScreeningManager.GetCageScreeningData(Convert.ToInt32(Session["PatientId"]), Convert.ToInt32(Session["PatientVisitId"]));

            if (theDSExistingForm.Tables[0].Rows.Count > 0)
            {
                if (!string.IsNullOrEmpty(theDSExistingForm.Tables[0].Rows[0]["CageAIDAlcohol"].ToString()))
                {
                    rdDCA.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["CageAIDAlcohol"].ToString();
                }
                if (!string.IsNullOrEmpty(theDSExistingForm.Tables[0].Rows[0]["CageAIDDrugs"].ToString()))
                {
                    rbuDrugs.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["CageAIDDrugs"].ToString();
                }
                if (!string.IsNullOrEmpty(theDSExistingForm.Tables[0].Rows[0]["CageAIDSmoke"].ToString()))
                {
                    rbSmoke.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["CageAIDSmoke"].ToString();
                }
                if (!string.IsNullOrEmpty(theDSExistingForm.Tables[0].Rows[0]["CageAIDQ1"].ToString()))
                {
                    rbodrinkdrug.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["CageAIDQ1"].ToString();
                }
                if (!string.IsNullOrEmpty(theDSExistingForm.Tables[0].Rows[0]["CageAIDQ2"].ToString()))
                {
                    rdbCriticDrinkDrug.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["CageAIDQ2"].ToString();
                }
                if (!string.IsNullOrEmpty(theDSExistingForm.Tables[0].Rows[0]["CageAIDQ3"].ToString()))
                {
                    rdbGuiltyDrinkDrug.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["CageAIDQ3"].ToString();
                }
                if (!string.IsNullOrEmpty(theDSExistingForm.Tables[0].Rows[0]["CageAIDQ4"].ToString()))
                {
                    rdbMorningDrinkDrug.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["CageAIDQ4"].ToString();
                }
                if (!string.IsNullOrEmpty(theDSExistingForm.Tables[0].Rows[0]["CageAIDScore"].ToString()))
                {
                    txtCageAIDScore.Text = theDSExistingForm.Tables[0].Rows[0]["CageAIDScore"].ToString();
                }
                if (!string.IsNullOrEmpty(theDSExistingForm.Tables[0].Rows[0]["CageAIDRisk"].ToString()))
                {
                    txtCAGEAID.Text = theDSExistingForm.Tables[0].Rows[0]["CageAIDRisk"].ToString();
                }
                if (!string.IsNullOrEmpty(theDSExistingForm.Tables[0].Rows[0]["CageAIDStopSmoking"].ToString()))
                {
                    rdbstopsmoking.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["CageAIDStopSmoking"].ToString();
                }
                if (!string.IsNullOrEmpty(theDSExistingForm.Tables[0].Rows[0]["Notes"].ToString()))
                {
                    txtNotes.Text = theDSExistingForm.Tables[0].Rows[0]["Notes"].ToString();
                }
            }
        }