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()); 
                            //}
                        }
                    }
                }
            }
        }
 protected void btnEdit_Click(object sender, EventArgs e)
 {
     toGetInfo getinfo = new toGetInfo();
     getinfo.setSchdID(hfSchdID.Value);
     getinfo.setSiteID(hfSIteID.Value);
     Response.Redirect("~/ProgramDirector/DirectorSurvey.aspx");
     Response.Cache.SetCacheability(HttpCacheability.NoCache);
     Response.Cache.SetExpires(DateTime.Now.AddDays(-1));
     Response.Cache.SetNoStore();   
 }
        protected void lnkbtnNewSurvey_Command(object sender, CommandEventArgs e)
        {
            toGetInfo getinfo = new toGetInfo();
            string schdid = e.CommandArgument.ToString();            
           
            string name = Page.User.Identity.Name;
            string userID = Membership.GetUser(name).ProviderUserKey.ToString();
            string sqlquerysiteID = " Select PD.Staff_ID, PD.SiteID From [ISBEPI_DEV].[dbo].[ProgramDirector] PD RIGHT JOIN " +
                                    "[ISBEPI_DEV].[dbo].Staff ST " +
                                    "ON PD.Staff_ID = ST.Staff_ID WHERE ST.UserId ='" + userID + "' ;";
            DataTable dt = DBHelper.GetDataTable(sqlquerysiteID);

            string sqlQueryGetSurveyStatus = "SELECT PD.Staff_ID, PD.Completed, PD.Schd_ID FROM  " +
                                                "[ISBEPI_DEV].[dbo].[Program_Director_Survey] PD WHERE PD.Schd_ID ='" + schdid + "'" +
                                                "AND PD.Staff_ID ='" + dt.Rows[0]["Staff_ID"].ToString() + "'";                                                
            DataTable dtgetStatus = DBHelper.GetDataTable(sqlQueryGetSurveyStatus);
            if (dtgetStatus.Rows.Count < 1)
            {
                //row = pd.Program_Director_Survey.NewRow();
                //row["Staff_ID"] = dt.Rows[0]["Staff_ID"].ToString();
                //row["Schd_ID"] = schdid;
                //row["StartedDate"] = DateTime.Now.ToShortDateString();
                //row["Completed"] = "Started";
                string sqlUpdate_NewRow = "INSERT INTO [ISBEPI_DEV].[dbo].[Program_Director_Survey] (Staff_ID, Schd_ID, StartedDate, Completed)"
                                         + " VALUES ('" + dt.Rows[0]["Staff_ID"].ToString() + "', '" + schdid + "', GETDATE(), 'Started');";
                int count = DBHelper.ExecuteSQL(sqlUpdate_NewRow);
                //pd.Program_Director_Survey.Rows.Add(row);
                //HVSurveyTableAdapters.Program_Director_SurveyTableAdapter PDSA = new HVSurveyTableAdapters.Program_Director_SurveyTableAdapter();
                //PDSA.Update(row);
                if (count > 0)
                {
                    toGetInfo setinfo = new toGetInfo();
                    setinfo.setSiteID(dt.Rows[0]["SiteID"].ToString());
                    Session["staffid"] = dt.Rows[0]["Staff_ID"].ToString();
                    setinfo.setSchdID(schdid);
                    setinfo.setStarted(false);
                    Response.Redirect("~/ProgramDirector/DirectorSurvey.aspx");
                }
                else
                {
                    Response.Redirect("~/UnauthorizedAccess.aspx");
                }
            }
            else
            {              
                toGetInfo setinfo = new toGetInfo();
                setinfo.setSiteID(dt.Rows[0]["SiteID"].ToString());
                Session["staffid"] = dt.Rows[0]["Staff_ID"].ToString();
                setinfo.setSchdID(schdid);
                setinfo.setStarted(true);
                Response.Redirect("~/ProgramDirector/DirectorSurvey.aspx");
            }
        }