Ejemplo n.º 1
0
        protected void getInsertData()
        {
            toGetInfo getinfo = new toGetInfo();
            hfSchdID.Value = getinfo.getSchdID();
            hfStaffID.Value = Session["Staff_ID"].ToString();
            Session["Staff_ID"] = null;
            hfSIteID.Value = getinfo.getValueSiteID();
            getinfo.setSchdID(null);
            getinfo.setSiteID(null);

            string sqlquery = "SELECT * FROM [ISBEPI_DEV].[dbo].[Program_Director_Survey] WHERE [ISBEPI_DEV].[dbo].[Program_Director_Survey].[Schd_ID]='" + hfSchdID.Value + "' AND Staff_ID='" + hfStaffID.Value + "'";
            DataTable dt = DBHelper.GetDataTable(sqlquery);

            if (hfSchdID.Value.Length > 0 && hfSIteID.Value.Length > 0 && hfStaffID.Value.Length > 0)
            {
                for (int r = 0; r < dt.Rows.Count; r++)
                {

                    if (dt.Rows[r]["Schd_ID"].ToString() == hfSchdID.Value && dt.Rows[r]["Staff_ID"].ToString() == hfStaffID.Value)
                    {
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q1"].ToString()))
                        {
                            txtQ1.Text = dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q1"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q2"].ToString()))
                        {
                            rdobtnlstQ2.SelectedValue = dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q2"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q3"].ToString()))
                        {
                            txtQ3.Text = dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q3"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q4"].ToString()))
                        {
                            rdobtnlstQ4.SelectedValue = dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q4"].ToString();
                            if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q4_Other"].ToString()))
                            {
                                txtQ4Explain.Text = dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q4_Other"].ToString();
                            }
                        }

                        if (Convert.ToBoolean(dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q5_Yes_or_no"].ToString()))
                        {
                            rdobtnlst_Yes_or_No.SelectedValue = "1";
                        }
                        else
                        {
                            rdobtnlst_Yes_or_No.SelectedValue = "0";
                        }

                        //if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q5_Yes_or_no"].ToString()))
                        //{
                        //    rdobtnlst_Yes_or_No.SelectedValue = dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q5_Yes_or_no"].ToString();
                        //}

                        if (rdobtnlst_Yes_or_No.SelectedValue == "1")
                        {
                            chkbxlstQ5.DataBind();
                            txtQ5Explain.Visible = true;
                            chkbxlstQ5.Visible = true;

                            for (int x = 0; x < chkbxlstQ5.Items.Count; x++)
                            {
                                int add = x + 1;
                                //if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q5_" + add].ToString()))
                                //{
                                chkbxlstQ5.Items[x].Selected = Convert.ToBoolean(dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q5_" + add].ToString());
                                //}
                            }
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q5_5_OTher"].ToString()) && !string.IsNullOrEmpty(dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q5_5"].ToString()))
                        {
                            txtQ5Explain.Text = dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q5_5_OTher"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q6"].ToString()))
                        {
                            rdobtnlstQ6.SelectedValue = dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q6"].ToString();

                            if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q6_Other"].ToString()))
                            {
                                txtQ6Explain.Text = dt.Rows[r]["PD_DEMOGRAPHICS_BASICPROGRAMINFORMATION_Q6_Other"].ToString();
                            }
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q7"].ToString()))
                        {
                            txtQ7.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q7"].ToString();
                        }

                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q8_1"].ToString()))
                        {
                            txtQ8_1.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q8_1"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q8_2"].ToString()))
                        {
                            txtQ8_2.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q8_2"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q8_3"].ToString()))
                        {
                            txtQ8_3.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q8_3"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q8_4"].ToString()))
                        {
                            txtQ8_4.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q8_4"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q8_5"].ToString()))
                        {
                            txtQ8_5.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q8_5"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q8_6"].ToString()))
                        {
                            txtQ8_6.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q8_6"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q8_7"].ToString()))
                        {
                            txtQ8_7.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q8_7"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q8_Total"].ToString()))
                        {
                            txtQ8_Total.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q8_Total"].ToString();
                        }

                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q9_1"].ToString()))
                        {
                            txtQ9_1.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q9_1"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q9_2"].ToString()))
                        {
                            txtQ9_2.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q9_2"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q9_3"].ToString()))
                        {
                            txtQ9_3.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q9_3"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q9_4"].ToString()))
                        {
                            txtQ9_4.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q9_4"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q9_5"].ToString()))
                        {
                            txtQ9_5.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q9_5"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q9_6"].ToString()))
                        {
                            txtQ9_6.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q9_6"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q9_Total"].ToString()))
                        {
                            txtQ9_Total.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q9_Total"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q10_1"].ToString())
                            && !string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q10_2"].ToString())
                            && !string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q10_3"].ToString())
                            && !string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q10_4"].ToString())
                            && !string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q10_5"].ToString())
                            && !string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q10_Total"].ToString()))
                        {
                            txtQ10_1.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q10_1"].ToString();
                            txtQ10_2.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q10_2"].ToString();
                            txtQ10_3.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q10_3"].ToString();
                            txtQ10_4.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q10_4"].ToString();
                            txtQ10_5.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q10_5"].ToString();
                            txtQ10_Total.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q10_Total"].ToString();
                        }
                        chkbxlstQ11.DataBind();
                        for (int x = 0; x < chkbxlstQ11.Items.Count; x++)
                        {
                            int add = x + 1;
                            //if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q11_" + add].ToString()))
                            //{
                                chkbxlstQ11.Items[x].Selected = Convert.ToBoolean(dt.Rows[r]["PD_FAMILYINFORMATION_Q11_" + add].ToString());
                            //}                           
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_FAMILYINFORMATION_Q11_6_other"].ToString()))
                        {
                            txtQ11_Other.Text = dt.Rows[r]["PD_FAMILYINFORMATION_Q11_6_other"].ToString();
                        }
                        //Q19_1
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_1"].ToString()))
                        {
                            rdobtnlstQ19_1_1.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_1"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_2"].ToString()))
                        {
                            rdobtnlstQ19_1_2.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_2"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_3"].ToString()))
                        {
                            rdobtnlstQ19_1_3.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_3"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_4"].ToString()))
                        {
                            rdobtnlstQ19_1_4.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_4"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_5"].ToString()))
                        {
                            rdobtnlstQ19_1_5.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_5"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_6"].ToString()))
                        {
                            rdobtnlstQ19_1_6.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_6"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_7"].ToString()))
                        {
                            rdobtnlstQ19_1_7.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_7"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_8"].ToString()))
                        {
                            rdobtnlstQ19_1_8.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_8"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_9"].ToString()))
                        {
                            rdobtnlstQ19_1_9.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_1_CHILDDEVELOPMENT_9"].ToString();
                        }

                        //Q19_2
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_1"].ToString()))
                        {
                            rdobtnlstQ19_2_1.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_1"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_2"].ToString()))
                        {
                            rdobtnlstQ19_2_2.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_2"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_3"].ToString()))
                        {
                            rdobtnlstQ19_2_3.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_3"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_4"].ToString()))
                        {
                            rdobtnlstQ19_2_4.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_4"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_5"].ToString()))
                        {
                            rdobtnlstQ19_2_5.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_5"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_6"].ToString()))
                        {
                            rdobtnlstQ19_2_6.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_6"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_7"].ToString()))
                        {
                            rdobtnlstQ19_2_7.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_7"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_8"].ToString()))
                        {
                            rdobtnlstQ19_2_8.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_8"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_9"].ToString()))
                        {
                            rdobtnlstQ19_2_9.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_9"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_10"].ToString()))
                        {
                            rdobtnlstQ19_2_10.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_10"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_11"].ToString()))
                        {
                            rdobtnlstQ19_2_11.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_11"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_12"].ToString()))
                        {
                            rdobtnlstQ19_2_12.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_12"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_13"].ToString()))
                        {
                            rdobtnlstQ19_2_13.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_13"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_14"].ToString()))
                        {
                            rdobtnlstQ19_2_14.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_14"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_15"].ToString()))
                        {
                            rdobtnlstQ19_2_15.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_2_CHILDHEALTHANDSAFETY_15"].ToString();
                        }

                        //Q19_3
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_3_PARENTCHILDRELATINONSHIPS_1"].ToString()))
                        {
                            rdobtnlstQ19_3_1.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_3_PARENTCHILDRELATINONSHIPS_1"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_3_PARENTCHILDRELATINONSHIPS_2"].ToString()))
                        {
                            rdobtnlstQ19_3_2.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_3_PARENTCHILDRELATINONSHIPS_2"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_3_PARENTCHILDRELATINONSHIPS_3"].ToString()))
                        {
                            rdobtnlstQ19_3_3.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_3_PARENTCHILDRELATINONSHIPS_3"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_3_PARENTCHILDRELATINONSHIPS_4"].ToString()))
                        {
                            rdobtnlstQ19_3_4.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_3_PARENTCHILDRELATINONSHIPS_4"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_INITIALTRAINING_Q19_3_PARENTCHILDRELATINONSHIPS_5"].ToString()))
                        {
                            rdobtnlstQ19_3_5.SelectedValue = dt.Rows[r]["PD_INITIALTRAINING_Q19_3_PARENTCHILDRELATINONSHIPS_5"].ToString();
                        }

                        //Q20_1
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_1"].ToString()))
                        {
                            rdobtnlstQ20_1_1.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_1"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_2"].ToString()))
                        {
                            rdobtnlstQ20_1_2.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_2"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_3"].ToString()))
                        {
                            rdobtnlstQ20_1_3.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_3"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_4"].ToString()))
                        {
                            rdobtnlstQ20_1_4.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_4"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_5"].ToString()))
                        {
                            rdobtnlstQ20_1_5.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_5"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_6"].ToString()))
                        {
                            rdobtnlstQ20_1_6.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_6"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_7"].ToString()))
                        {
                            rdobtnlstQ20_1_7.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_7"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_8"].ToString()))
                        {
                            rdobtnlstQ20_1_8.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_8"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_9"].ToString()))
                        {
                            rdobtnlstQ20_1_9.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_1_CHILDDEVELOPMENT_9"].ToString();
                        }

                        //Q20_2
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_1"].ToString()))
                        {
                            rdobtnlstQ20_2_1.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_1"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_2"].ToString()))
                        {
                            rdobtnlstQ20_2_2.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_2"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_3"].ToString()))
                        {
                            rdobtnlstQ20_2_3.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_3"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_4"].ToString()))
                        {
                            rdobtnlstQ20_2_4.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_4"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_5"].ToString()))
                        {
                            rdobtnlstQ20_2_5.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_5"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_6"].ToString()))
                        {
                            rdobtnlstQ20_2_6.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_6"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_7"].ToString()))
                        {
                            rdobtnlstQ20_2_7.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_7"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_8"].ToString()))
                        {
                            rdobtnlstQ20_2_8.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_8"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_9"].ToString()))
                        {
                            rdobtnlstQ20_2_9.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_9"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_10"].ToString()))
                        {
                            rdobtnlstQ20_2_10.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_10"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_11"].ToString()))
                        {
                            rdobtnlstQ20_2_11.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_11"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_12"].ToString()))
                        {
                            rdobtnlstQ20_2_12.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_12"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_13"].ToString()))
                        {
                            rdobtnlstQ20_2_13.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_13"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_14"].ToString()))
                        {
                            rdobtnlstQ20_2_14.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_14"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_15"].ToString()))
                        {
                            rdobtnlstQ20_2_15.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_2_CHILDHEALTHANDSAFETY_15"].ToString();
                        }

                        //Q20_3
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_3_PARENTCHILDRELATINONSHIPS_1"].ToString()))
                        {
                            rdobtnlstQ20_3_1.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_3_PARENTCHILDRELATINONSHIPS_1"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_3_PARENTCHILDRELATINONSHIPS_2"].ToString()))
                        {
                            rdobtnlstQ20_3_2.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_3_PARENTCHILDRELATINONSHIPS_2"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_3_PARENTCHILDRELATINONSHIPS_3"].ToString()))
                        {
                            rdobtnlstQ20_3_3.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_3_PARENTCHILDRELATINONSHIPS_3"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_3_PARENTCHILDRELATINONSHIPS_4"].ToString()))
                        {
                            rdobtnlstQ20_3_4.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_3_PARENTCHILDRELATINONSHIPS_4"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_ONGOINGTRAINING_Q20_3_PARENTCHILDRELATINONSHIPS_5"].ToString()))
                        {
                            rdobtnlstQ20_3_5.SelectedValue = dt.Rows[r]["PD_ONGOINGTRAINING_Q20_3_PARENTCHILDRELATINONSHIPS_5"].ToString();
                        }

                        //Q21_1
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_1"].ToString()))
                        {
                            rdobtnlstQ21_1_1.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_1"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_2"].ToString()))
                        {
                            rdobtnlstQ21_1_2.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_2"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_3"].ToString()))
                        {
                            rdobtnlstQ21_1_3.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_3"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_4"].ToString()))
                        {
                            rdobtnlstQ21_1_4.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_4"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_5"].ToString()))
                        {
                            rdobtnlstQ21_1_5.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_5"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_6"].ToString()))
                        {
                            rdobtnlstQ21_1_6.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_6"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_7"].ToString()))
                        {
                            rdobtnlstQ21_1_7.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_7"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_8"].ToString()))
                        {
                            rdobtnlstQ21_1_8.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_8"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_9"].ToString()))
                        {
                            rdobtnlstQ21_1_9.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_1_CHILDDEVELOPMENT_9"].ToString();
                        }

                        //Q21_2
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_1"].ToString()))
                        {
                            rdobtnlstQ21_2_1.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_1"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_2"].ToString()))
                        {
                            rdobtnlstQ21_2_2.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_2"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_3"].ToString()))
                        {
                            rdobtnlstQ21_2_3.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_3"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_4"].ToString()))
                        {
                            rdobtnlstQ21_2_4.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_4"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_5"].ToString()))
                        {
                            rdobtnlstQ21_2_5.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_5"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_6"].ToString()))
                        {
                            rdobtnlstQ21_2_6.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_6"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_7"].ToString()))
                        {
                            rdobtnlstQ21_2_7.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_7"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_8"].ToString()))
                        {
                            rdobtnlstQ21_2_8.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_8"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_9"].ToString()))
                        {
                            rdobtnlstQ21_2_9.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_9"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_10"].ToString()))
                        {
                            rdobtnlstQ21_2_10.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_10"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_11"].ToString()))
                        {
                            rdobtnlstQ21_2_11.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_11"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_12"].ToString()))
                        {
                            rdobtnlstQ21_2_12.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_12"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_13"].ToString()))
                        {
                            rdobtnlstQ21_2_13.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_13"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_14"].ToString()))
                        {
                            rdobtnlstQ21_2_14.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_14"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_15"].ToString()))
                        {
                            rdobtnlstQ21_2_15.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_2_CHILDHEALTHANDSAFETY_15"].ToString();
                        }

                        //Q21_3
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_3_PARENTCHILDRELATINONSHIPS_1"].ToString()))
                        {
                            rdobtnlstQ21_3_1.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_3_PARENTCHILDRELATINONSHIPS_1"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_3_PARENTCHILDRELATINONSHIPS_2"].ToString()))
                        {
                            rdobtnlstQ21_3_2.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_3_PARENTCHILDRELATINONSHIPS_2"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_3_PARENTCHILDRELATINONSHIPS_3"].ToString()))
                        {
                            rdobtnlstQ21_3_3.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_3_PARENTCHILDRELATINONSHIPS_3"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_3_PARENTCHILDRELATINONSHIPS_4"].ToString()))
                        {
                            rdobtnlstQ21_3_4.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_3_PARENTCHILDRELATINONSHIPS_4"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_3_PARENTCHILDRELATINONSHIPS_5"].ToString()))
                        {
                            rdobtnlstQ21_3_5.SelectedValue = dt.Rows[r]["PD_PROGRAMMATERIAL_Q21_3_PARENTCHILDRELATINONSHIPS_5"].ToString();
                        }

                        if (Convert.ToBoolean(dt.Rows[r]["PD_WRITTENPOLICIESANDPROCEDURES_22"].ToString()))
                        {
                            rdobtnlstQ22.DataBind();
                            rdobtnlstQ22.SelectedValue = "1";

                            if (rdobtnlstQ22.SelectedValue == "1")
                            {
                                chkbxlstQ23.Enabled = false;
                                rdobtnlstQ24.Enabled = false;
                                ddlYear.Enabled = false;
                                ddlMonth.Enabled = false;
                                Q23.Visible = true;
                                Q24.Visible = true;
                                Q25.Visible = true;

                                chkbxlstQ23.DataBind();
                                for (int x = 0; x < chkbxlstQ23.Items.Count; x++)
                                {
                                    int add = x + 1;
                                    //if (!string.IsNullOrEmpty(dt.Rows[r]["PD_WRITTENPOLICIESANDPROCEDURES_Q23_" + add].ToString()))
                                    //{
                                        chkbxlstQ23.Items[x].Selected = Convert.ToBoolean(dt.Rows[r]["PD_WRITTENPOLICIESANDPROCEDURES_Q23_" + add].ToString());
                                    //}
                                }
                            }
                            else
                            {
                                chkbxlstQ23.Enabled = false;
                                rdobtnlstQ24.Enabled = false;
                                ddlYear.Enabled = false;
                                ddlMonth.Enabled = false;
                                Q23.Visible = false;
                                Q24.Visible = false;
                                Q25.Visible = false;
                            }
                        }
                        else
                        {
                            rdobtnlstQ22.DataBind();
                            rdobtnlstQ22.SelectedValue = "0";
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_WRITTENPOLICIESANDPROCEDURES_Q24"].ToString()))
                        {
                            rdobtnlstQ24.DataBind();
                            rdobtnlstQ24.SelectedValue = dt.Rows[r]["PD_WRITTENPOLICIESANDPROCEDURES_Q24"].ToString();
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_WRITTENPOLICIESANDPROCEDURES_Q25"].ToString()))
                        {
                            string getQ25Ans = dt.Rows[r]["PD_WRITTENPOLICIESANDPROCEDURES_Q25"].ToString();
                            if (!string.IsNullOrEmpty(getQ25Ans))
                            {
                                string[] q25ans = getQ25Ans.Split(',');

                                ddlMonth.SelectedItem.Text = q25ans[0].ToString();
                                ddlYear.SelectedItem.Text = q25ans[1].ToString();
                            }
                        }
                        // txtQ25.Text = dt.Rows[r]["PD_WRITTENPOLICIESANDPROCEDURES_Q24"].ToString();


                        if (Convert.ToBoolean(dt.Rows[r]["PD_WRITTENPOLICIESANDPROCEDURES_Q26"].ToString()))
                        {
                            rdobtnlstQ26.DataBind();
                            rdobtnlstQ26.SelectedValue = "1";//dt.Rows[r]["PD_WRITTENPOLICIESANDPROCEDURES_Q26"].ToString();
                            if (rdobtnlstQ26.SelectedValue == "1")
                            {
                                txtQ26Explain.Text = dt.Rows[r]["PD_WRITTENPOLICIESANDPROCEDURES_Q26_Describe"].ToString();
                            }
                        }
                        else
                        {
                            rdobtnlstQ26.DataBind();
                            rdobtnlstQ26.SelectedValue = "0";
                        }

                        //if (!string.IsNullOrEmpty(dt.Rows[r]["PD_WRITTENPOLICIESANDPROCEDURES_Q26"].ToString()))
                        //{
                        //    rdobtnlstQ26.DataBind();
                        //    rdobtnlstQ26.SelectedValue = dt.Rows[r]["PD_WRITTENPOLICIESANDPROCEDURES_Q26"].ToString();
                        //    if (rdobtnlstQ26.SelectedValue == "1")
                        //    {
                        //        txtQ26Explain.Text = dt.Rows[r]["PD_WRITTENPOLICIESANDPROCEDURES_Q26_Describe"].ToString();
                        //    }
                        //}
                        chkbxlstQ27.DataBind();
                        for (int x = 0; x < chkbxlstQ27.Items.Count; x++)
                        {
                            int add = x + 1;
                            //if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DataCollectionProcess_Q27_" + add].ToString()))
                            //{
                                chkbxlstQ27.Items[x].Selected = Convert.ToBoolean(dt.Rows[r]["PD_DataCollectionProcess_Q27_" + add].ToString());
                            //}
                        }
                        if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DataCollectionProcess_Q27_other"].ToString()))
                        {
                            txtQ27Explain.Text = dt.Rows[r]["PD_DataCollectionProcess_Q27_other"].ToString();
                        }

                        chkbxlstQ28.DataBind();
                        for (int x = 0; x < chkbxlstQ28.Items.Count; x++)
                        {
                            int add = x + 1;
                            //if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DataCollectionProcess_Q28_" + add].ToString()))
                            //{
                                chkbxlstQ28.Items[x].Selected = Convert.ToBoolean(dt.Rows[r]["PD_DataCollectionProcess_Q28_" + add].ToString()); 
                            //}
                        }

                        chkbxlstQ29.DataBind();
                        for (int x = 0; x < chkbxlstQ29.Items.Count; x++)
                        {
                            int add = x + 1;
                            //if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DataCollectionProcess_Q29_" + add].ToString()))
                            //{
                                chkbxlstQ29.Items[x].Selected = Convert.ToBoolean(dt.Rows[r]["PD_DataCollectionProcess_Q29_" + add].ToString()); 
                            //}
                        }

                        chkbxlstQ30.DataBind();
                        for (int x = 0; x < chkbxlstQ30.Items.Count; x++)
                        {
                            int add = x + 1;
                            //if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DataCollectionProcess_Q30_" + add].ToString()))
                            //{
                                chkbxlstQ30.Items[x].Selected = Convert.ToBoolean(dt.Rows[r]["PD_DataCollectionProcess_Q30_" + add].ToString()); 
                            //}
                        }

                        chkbxlstQ31.DataBind();
                        for (int x = 0; x < chkbxlstQ31.Items.Count; x++)
                        {
                            int add = x + 1;
                            //if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DataCollectionProcess_Q31_" + add].ToString()))
                            //{
                                chkbxlstQ31.Items[x].Selected = Convert.ToBoolean(dt.Rows[r]["PD_DataCollectionProcess_Q31_" + add].ToString()); 
                            //}
                        }

                        chkbxlstQ32.DataBind();
                        for (int x = 0; x < chkbxlstQ32.Items.Count; x++)
                        {
                            int add = x + 1;
                            //if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DataCollectionProcess_Q32_" + add].ToString()))
                            //{
                            chkbxlstQ32.Items[x].Selected = Convert.ToBoolean(dt.Rows[r]["PD_DataCollectionProcess_Q32_" + add].ToString()); 
                            //}
                        }

                        chkbxlstQ33.DataBind();
                        for (int x = 0; x < chkbxlstQ33.Items.Count; x++)
                        {
                            int add = x + 1;
                            //if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DataCollectionProcess_Q33_" + add].ToString()))
                            //{
                                chkbxlstQ33.Items[x].Selected = Convert.ToBoolean(dt.Rows[r]["PD_DataCollectionProcess_Q33_" + add].ToString()); 
                            //}
                        }

                        chkbxlstQ34.DataBind();
                        for (int x = 0; x < chkbxlstQ34.Items.Count; x++)
                        {
                            int add = x + 1;
                            //if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DataCollectionProcess_Q34_" + add].ToString()))
                            //{
                            chkbxlstQ34.Items[x].Selected = Convert.ToBoolean(dt.Rows[r]["PD_DataCollectionProcess_Q34_" + add].ToString()); 
                            //}
                        }

                        chkbxlstQ35.DataBind();
                        for (int x = 0; x < chkbxlstQ35.Items.Count; x++)
                        {
                            int add = x + 1;
                            //if (!string.IsNullOrEmpty(dt.Rows[r]["PD_DataCollectionProcess_Q35_" + add].ToString()))
                            //{
                            chkbxlstQ35.Items[x].Selected = Convert.ToBoolean(dt.Rows[r]["PD_DataCollectionProcess_Q35_" + add].ToString()); 
                            //}
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
 protected void lnkbtnPIQRI_Click(object sender, EventArgs e)
 {
     toGetInfo getinfo = new toGetInfo();
     Session["SchdId"] = getinfo.getSchdID();
     Response.Redirect("~/PIQRIFinalTool/FinalTool.aspx");
 }
Ejemplo n.º 3
0
        protected void lnkbtnPICC_Click(object sender, EventArgs e)
        {
            PICCTool.StoreInfo getinfo = new PICCTool.StoreInfo();

            getinfo.setvalue_Address(txtSiteAddress.Text.Trim());
            getinfo.setvalue_Assessor(txtFName.Text.Trim());
            getinfo.setvalue_ProgramName(txtSiteName.Text.Trim());
            getinfo.setvalue_VisitDate(txtVisitingdate.Text.Trim());
            toGetInfo getschid = new toGetInfo();
            Session["SchdId"] = getschid.getSchdID();
            Response.Redirect("~/PICCTool/PICCTool.aspx");
        }
Ejemplo n.º 4
0
 protected void lnkbtnReschedule_Click(object sender, EventArgs e)
 {
     toGetInfo getinfo = new toGetInfo();
     //getting selected row
     string sqlquery2 = "SELECT [ISBEPI_DEV].[dbo].[UserNames].Name, [ISBEPI_DEV].[dbo].[Scheduling].[NameID],[ISBEPI_DEV].[dbo].[Sites].Sites, [ISBEPI_DEV].[dbo].[Scheduling].VisitDate,[ISBEPI_DEV].[dbo].[Scheduling].Schd_ID, [ISBEPI_DEV].[dbo].[Scheduling].Status, [ISBEPI_DEV].[dbo].[Sites].SiteID "
                + "FROM [ISBEPI_DEV].[dbo].[Scheduling] JOIN [ISBEPI_DEV].[dbo].[UserNames] "
                + "ON [ISBEPI_DEV].[dbo].[UserNames].NameID=[ISBEPI_DEV].[dbo].[Scheduling].[NameID] JOIN [ISBEPI_DEV].[dbo].[Sites] "
            + "ON [ISBEPI_DEV].[dbo].[Sites].SiteID = [ISBEPI_DEV].[dbo].[Scheduling].SiteID "
              + "WHERE [ISBEPI_DEV].[dbo].[Scheduling].Schd_ID ='" + getinfo.getSchdID() + "';";
     DataTable dt2 = DBHelper.GetDataTable(sqlquery2);
     string nameID = dt2.Rows[0]["NameID"].ToString();
     string siteID = dt2.Rows[0]["SiteID"].ToString();
     //reschedule info
     DateTime date = Convert.ToDateTime(txtCalV3.Text).Date;
     string sqlInsert = string.Format("UPDATE [ISBEPI_DEV].[dbo].[Scheduling] SET VisitDate ='" + date.ToShortDateString() + "',Status='Pending'"
         + " , [LastActivity] = '" + DateTime.Now + "' WHERE Schd_ID ='" + getinfo.getSchdID() + "';");
     int count = DBHelper.ExecuteSQL(sqlInsert);
     if (count == 1)
     {
         string strMsg = "<h3 class='errormsgSuccess'>The schedule is successful!</h3>";
         Label lbl = new Label();
         lbl.Text = strMsg;
         PHError2.Controls.Add(lbl);
         //System.Web.HttpContext.Current.Response.Write("<Script Language='JavaScript'>window.alert('" + strMsg + "');</script>");
         lnkbtnConfirm.Enabled = true;
         setDefaultView();
     }
     else
     {
         string strMsg = "<h3 class='errormsg'>The schedule is not successful!</h3>";
         Label lbl = new Label();
         lbl.Text = strMsg;
         PHError2.Controls.Add(lbl);
         //System.Web.HttpContext.Current.Response.Write("<Script Language='JavaScript'>window.alert('" + strMsg + "');</script>");
     }
 }
Ejemplo n.º 5
0
        protected void lnkbtnStausChange_Click(object sender, EventArgs e)
        {
            if (chkbxChangeStatus.Checked == true)
            {
                //
                toGetInfo getinfo = new toGetInfo();
                string schdID = getinfo.getSchdID();

                string sqlqueryUpdate = "UPDATE [ISBEPI_DEV].[dbo].[Scheduling] " +
                                        "SET [ISBEPI_DEV].[dbo].[Scheduling].[Status]='Closed'" +
                                        " WHERE [ISBEPI_DEV].[dbo].[Scheduling].[Schd_ID]='" + schdID + "';";
                int count = DBHelper.ExecuteSQL(sqlqueryUpdate);

                if (count > 0)
                {
                    chkbxChangeStatus.Checked = false;
                    string strMsg = "The changes you made is successful!";
                    Label lbl = new Label();
                    lbl.Text = strMsg;
                    PHError3.Controls.Add(lbl);
                    //System.Web.HttpContext.Current.Response.Write("<Script Language='JavaScript'>window.alert('" + strMsg + "');</script>");
                    MultiView1.ActiveViewIndex = 3;
                }
            }
        }
Ejemplo n.º 6
0
 protected void lnkbtnVisiting_Click(object sender, EventArgs e)
 {
     toGetInfo getinfo = new toGetInfo();
     Session["SchdId"] = getinfo.getSchdID();
     Response.Redirect("~/PIQRIInterview/default.aspx");
 }
Ejemplo n.º 7
0
        protected void lnkbtnStatus_Click(object sender, EventArgs e)
        {
            MultiView1.ActiveViewIndex = 3;
            toGetInfo getinfo = new toGetInfo();
            string schdID = getinfo.getSchdID();
            string sqlquery = "SELECT SCHD.Schd_ID, SCHD.SiteID, SCHD.VisitDate, UN.Name,PDS.Completed, coalesce( HVS.Survey_Count, 0) AS NumberOFSurvey " +
                                        "FROM Scheduling SCHD RIGHT JOIN UserNames UN " +
                                        "ON SCHD.NameID = UN.NameID " +
                                        "LEFT JOIN Program_Director_Survey PDS " +
                                        "ON PDS.Schd_ID = SCHD.Schd_ID " +
                                        "LEFT JOIN (SELECT COUNT(*) AS Survey_Count, Schd_ID " +
                                        "FROM HomeVisitorSiteVisitSurvey WHERE  Schd_ID =Schd_ID " +
                                        "GROUP BY Schd_ID) AS HVS ON HVS.Schd_ID = SCHD.Schd_ID " +
                                        "WHERE SCHD.Schd_ID= '" + schdID + "' " +
                                        "GROUP BY SCHD.Schd_ID, SCHD.SiteID, SCHD.VisitDate, UN.Name,PDS.Completed, HVS.Survey_Count";
            DataTable dtGetTable = DBHelper.GetDataTable(sqlquery);
            string schdid = dtGetTable.Rows[0]["Schd_ID"].ToString();
            string sqlquerystatus = "  SELECT SCHD.STATUS FROM [ISBEPI_DEV].[dbo].[Scheduling] SCHD WHERE SCHD.Schd_ID ='" + schdid + "'";
            DataTable dtGetTableStatus = DBHelper.GetDataTable(sqlquerystatus);
            if ((dtGetTable.Rows.Count > 0) && (dtGetTableStatus.Rows.Count > 0))
            {
                if (dtGetTableStatus.Rows[0]["Status"].ToString() != "Closed")
                {
                    lblStatus.Text = "Active";//dtGetTableStatus.Rows[0]["Status"].ToString();
                }
                else
                {
                    lblStatus.Text = "Closed";
                }

                lblStatusMonitorName.Text = dtGetTable.Rows[0]["Name"].ToString();
                if (dtGetTable.Rows[0]["Completed"].ToString() == "Completed")
                {
                    lblStatusPD.Text = "Yes";
                }
                else
                {
                    lblStatusPD.Text = "NO";
                }
                lblStausHVS.Text = dtGetTable.Rows[0]["NumberOFSurvey"].ToString();
                lblStatusSIteName.Text = getinfo.getValueSiteName();
            }
        }
Ejemplo n.º 8
0
 protected void lnkbtnConfirm_Click(object sender, EventArgs e)
 {
     toGetInfo getinfo = new toGetInfo();
     //getting selected row
     string sqlquery2 = "SELECT UN.Name, ST.Sites,SCHD.VisitDate,SCHD.Status, St.City_or_location, ST.SiteID, UN.NameID "
                     + " FROM [ISBEPI_DEV].[dbo].[Scheduling] SCHD JOIN [ISBEPI_DEV].[dbo].[UserNames] UN "
                     + "ON UN.NameID=SCHD.[NameID] JOIN [ISBEPI_DEV].[dbo].[Sites] ST "
                   + "ON ST.SiteID = SCHD.SiteID WHERE SCHD.Schd_ID ='" + getinfo.getSchdID() + "';";
     DataTable dt2 = DBHelper.GetDataTable(sqlquery2);
     string nameID = dt2.Rows[0]["NameID"].ToString();
     string siteID = dt2.Rows[0]["SiteID"].ToString();
     //Updating Confirmation
     string sqlInsert = string.Format("UPDATE [ISBEPI_DEV].[dbo].[Scheduling] SET VisitDate ='" + txtVisitingdate.Text + "',Status='Confirmed'"
          + ", [LastActivity] = '" + DateTime.Now + "' WHERE Schd_ID ='" + getinfo.getSchdID() + "';");
     int count = DBHelper.ExecuteSQL(sqlInsert);
     if (count == 1)
     {
         string strMsg = "<h3 class='errormsgSuccess'>The Confirmation is successful!</h3>";
         Label lbl = new Label();
         lbl.Text = strMsg;
         PHError1.Controls.Add(lbl);
         //System.Web.HttpContext.Current.Response.Write("<Script Language='JavaScript'>window.alert('" + strMsg + "');</script>");
         setDefaultView();
     }
     else
     {
         string strMsg = "The Confirmation is not successful!";
         Label lbl = new Label();
         lbl.Text = strMsg;
         PHError1.Controls.Add(lbl);
         //System.Web.HttpContext.Current.Response.Write("<Script Language='JavaScript'>window.alert('" + strMsg + "');</script>");
     }
 }
Ejemplo n.º 9
0
        protected void lnkbtnDateSchedule_Command(object sender, CommandEventArgs e)
        {
            string schdID = e.CommandArgument.ToString();
            toGetInfo setinfo = new toGetInfo();
            setinfo.setSchdID(schdID);

            string sqlquery = "SELECT [ISBEPI_DEV].[dbo].[UserNames].Name, [ISBEPI_DEV].[dbo].[Sites].Sites,[ISBEPI_DEV].[dbo].[Sites].PhoneNumber,[ISBEPI_DEV].[dbo].[Sites].ZipCode,[ISBEPI_DEV].[dbo].[Sites].MICEHV, [ISBEPI_DEV].[dbo].[Scheduling].VisitDate,[ISBEPI_DEV].[dbo].[Scheduling].Schd_ID, [ISBEPI_DEV].[dbo].[Scheduling].Status, [ISBEPI_DEV].[dbo].[Sites].SiteID, "
                       + "[ISBEPI_DEV].[dbo].[Sites].Site_Address, [ISBEPI_DEV].[dbo].[Sites].City, [ISBEPI_DEV].[dbo].[Sites].State FROM [ISBEPI_DEV].[dbo].[Scheduling] JOIN [ISBEPI_DEV].[dbo].[UserNames] "
                       + "ON [ISBEPI_DEV].[dbo].[UserNames].NameID=[ISBEPI_DEV].[dbo].[Scheduling].[NameID] JOIN [ISBEPI_DEV].[dbo].[Sites] "
                   + "ON [ISBEPI_DEV].[dbo].[Sites].SiteID = [ISBEPI_DEV].[dbo].[Scheduling].SiteID "
                     + "WHERE [ISBEPI_DEV].[dbo].[Scheduling].Schd_ID ='" + setinfo.getSchdID() + "';";
            DataTable dt = DBHelper.GetDataTable(sqlquery);
            if (dt.Rows.Count > 0)
            {
                toGetInfo getuserInfo = new toGetInfo();
                getuserInfo.setVlaue(dt.Rows[0]["Name"].ToString(), dt.Rows[0]["SiteID"].ToString(), dt.Rows[0]["Sites"].ToString(), dt.Rows[0]["Site_Address"].ToString(), dt.Rows[0]["City"].ToString(), dt.Rows[0]["State"].ToString(), dt.Rows[0]["VisitDate"].ToString(), dt.Rows[0]["Status"].ToString(), dt.Rows[0]["PhoneNumber"].ToString(), dt.Rows[0]["ZipCode"].ToString(), Convert.ToBoolean(dt.Rows[0]["MICEHV"].ToString()));
                MultiView1.ActiveViewIndex = 2;
                txtFNameV3.Text = dt.Rows[0]["Name"].ToString();
                txtSiteNameV3.Text = dt.Rows[0]["Sites"].ToString();
                lbltitleEditorReschedule.Text = "<div> <h4 class='users'>Schedule Information</h1></div>";
                //calV3.SelectedDate = calV3;
                txtCalV3.Text = null;
                lnkbtnSaveChanges.Visible = false;
                lnkbtnReschedule.Visible = true;
                txtCalV3.Visible = true;
                calV3.Visible = true;
                txtSiteAddressV3.Enabled = false;
                txtStateV3.Enabled = false;
                txtCityV3.Enabled = false;
                txtPhoneNumberV3.Text = setinfo.getPhone();
                txtZipV3.Text = setinfo.getZip();
                txtZipV3.Enabled = false;
                txtPhoneNumberV3.Enabled = false;
                chkbxMiechvV3.Enabled = false;
                chkbxMiechvV3.Checked = setinfo.getMiechv();
            }
        }
Ejemplo n.º 10
0
        protected void dispalyView2info()
        {
            MultiView1.ActiveViewIndex = 1;
            toGetInfo setinfo = new toGetInfo();
            string sqlquery = "SELECT [ISBEPI_DEV].[dbo].[UserNames].Name, [ISBEPI_DEV].[dbo].[Sites].Sites, [ISBEPI_DEV].[dbo].[Scheduling].VisitDate,[ISBEPI_DEV].[dbo].[Sites].PhoneNumber,[ISBEPI_DEV].[dbo].[Sites].ZipCode, [ISBEPI_DEV].[dbo].[Sites].MICEHV,[ISBEPI_DEV].[dbo].[Scheduling].Schd_ID, [ISBEPI_DEV].[dbo].[Scheduling].Status, [ISBEPI_DEV].[dbo].[Sites].SiteID, "
                       + "[ISBEPI_DEV].[dbo].[Sites].Site_Address, [ISBEPI_DEV].[dbo].[Sites].City, [ISBEPI_DEV].[dbo].[Sites].State FROM [ISBEPI_DEV].[dbo].[Scheduling] JOIN [ISBEPI_DEV].[dbo].[UserNames] "
                       + "ON [ISBEPI_DEV].[dbo].[UserNames].NameID=[ISBEPI_DEV].[dbo].[Scheduling].[NameID] JOIN [ISBEPI_DEV].[dbo].[Sites] "
                   + "ON [ISBEPI_DEV].[dbo].[Sites].SiteID = [ISBEPI_DEV].[dbo].[Scheduling].SiteID "
                     + "WHERE [ISBEPI_DEV].[dbo].[Scheduling].Schd_ID ='" + setinfo.getSchdID() + "';";
            DataTable dt2 = DBHelper.GetDataTable(sqlquery);
            txtSiteName.Text = dt2.Rows[0]["Sites"].ToString().Replace("amp;", string.Empty);
            txtFName.Text = dt2.Rows[0]["Name"].ToString();

            string status = dt2.Rows[0]["Status"].ToString();
            string siteID = dt2.Rows[0]["SiteID"].ToString();
            string address = dt2.Rows[0]["Site_Address"].ToString();
            string city = dt2.Rows[0]["City"].ToString();
            string state = dt2.Rows[0]["State"].ToString();
            string phone = dt2.Rows[0]["PhoneNumber"].ToString();
            txtPhoneNumber.Text = phone;
            string zip = dt2.Rows[0]["ZipCode"].ToString();
            txtZipV2.Text = zip;
            bool miechv = Convert.ToBoolean(dt2.Rows[0]["MICEHV"].ToString());
            chkbxMiechv.Checked = miechv;
            txtSiteAddress.Text = address;
            txtState.Text = state;
            txtCity.Text = city;
            if (dt2.Rows[0]["VisitDate"].ToString().Length > 1)
            {
                visitdate = DateTime.Parse(dt2.Rows[0]["VisitDate"].ToString()).ToShortDateString();
                txtVisitingdate.Text = visitdate;
            }
            else
            {
                txtVisitingdate.Text = null;
            }
            toGetInfo getuserInfo = new toGetInfo();
            getuserInfo.setVlaue(txtFName.Text, siteID, txtSiteName.Text, address, city, state, visitdate, status, phone, zip, miechv);



            if (status == "Confirmed" || txtVisitingdate.Text.Length < 1)
            {
                lnkbtnConfirm.Enabled = false;
            }
            else if (status == "Closed" || txtVisitingdate.Text.Length < 1)
            {
                lnkbtnConfirm.Enabled = false;
            }
            if (Roles.IsUserInRole(Page.User.Identity.Name, "Administrator"))
            {
                lnkbtnVisiting.Enabled = true;
                if (status == "Confirmed"
                    && (DateTime.Parse(visitdate)) <= DateTime.Parse(DateTime.Now.ToShortDateString().ToString()))
                {
                    lnkbtnConfirm.Enabled = false;
                    lnkbtnVisiting.Enabled = true;
                }
                else if (status == "Closed")
                {
                    lnkbtnConfirm.Enabled = false;
                    lnkbtnVisiting.Enabled = false;
                }
            }
            else if (!Roles.IsUserInRole(Page.User.Identity.Name, "Administrator"))
            {
                lnkbtnVisiting.Enabled = false;
                if (status == "Confirmed"
                    && (DateTime.Parse(visitdate) <= DateTime.Parse(DateTime.Now.ToShortDateString().ToString())))
                {
                    lnkbtnConfirm.Enabled = false;
                    lnkbtnVisiting.Enabled = true;
                }
                else if (status == "Closed")
                {
                    lnkbtnConfirm.Enabled = false;
                    lnkbtnVisiting.Enabled = false;
                }
            }
        }