protected void btnNVDA_Click(object sender, EventArgs e)
        {
            PanelNVDA1.Visible = true;
            string    NVDA2   = "SELECT VolunteerJoinActivities.V_ID, V_Name, V_LastName , V_MobileNo1, V_MobileNo2,V_Email From VolunteerJoinActivities, Volunteer,Activities WHERE VolunteerJoinActivities.V_ID = Volunteer.V_ID AND VolunteerJoinActivities.Activity_ID = Activities.Activity_ID AND Activity_Name = 'NVDA'  AND V_Status <> 'Deactive';";
            DataTable dtNVDA2 = dbconn.QueryExecuteScalar(NVDA2);

            GridViewNVDA1.DataSource = dtNVDA2;
            GridViewNVDA1.DataBind();
            dbconn.Close();
        }
        protected void SaveNVDA1_Click(object sender, EventArgs e)
        {
            CheckBox chkbox = new CheckBox();

            foreach (GridViewRow grdRow in GridViewNVDA1.Rows)
            {
                chkbox = (CheckBox)Convert.ChangeType(((CheckBox)grdRow.FindControl("chk")), typeof(CheckBox));
                if (chkbox.Checked)
                {
                    string keyID = (string)GridViewNVDA1.DataKeys[grdRow.RowIndex].Value.ToString();
                    string sqlSelectVolunteer = "Insert into VolunteerJoinActivities(V_ID,VJA_Status,Activity_ID) Values (" + keyID + ",'Selected'," + DetailsView1.SelectedValue + ") ;";
                    dbconn.QueryExecuteScalar(sqlSelectVolunteer);
                }
            }
            dbconn.Close();
            GridViewNVDA1.DataBind();
        }
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string id = GridView1.SelectedRow.Cells[1].Text;

            string    SearchType = "SELECT AT_ID FROM Activities WHERE Activity_ID = " + id + ";";
            DataTable dt         = dbconn.QueryExecuteScalar(SearchType);
            string    AT         = dt.Rows[0]["AT_ID"].ToString();

            if (AT == "1")
            {
                PanelHardAction.Visible = true;
            }
            else if (AT == "2")
            {
                PanelColdAction.Visible = true;
            }
            else
            {
                PanelBoth.Visible = true;
            }
            PanelCamDetail.Visible = true;
            Panel1.Visible         = false;
            Panel2.Visible         = false;



            string    ActivityID    = GridView1.SelectedRow.Cells[1].Text;
            string    MostActive1   = "SELECT Top 15 CountVolunteerJoinActivity.V_ID ,NoJoin, V_Name, V_LastName,V_MobileNo1, V_MobileNo2, V_Email FROM Volunteer, CountVolunteerJoinActivity WHERE CountVolunteerJoinActivity.V_ID = Volunteer.V_ID AND CountVolunteerJoinActivity.V_ID NOT IN (SELECT V_ID FROM VolunteerJoinActivities WHERE Activity_ID = " + ActivityID + ") ORDER BY NoJoin DESC;";
            DataTable dtMostActive1 = dbconn.QueryExecuteScalar(MostActive1);

            GridViewMostActive1.DataSource = dtMostActive1;
            GridViewMostActive1.DataBind();

            lblMostActive.Text = GridViewMostActive1.Rows.Count.ToString();



            lblMostActive2.Text = GridViewMostActive1.Rows.Count.ToString();

            string    NVDA2   = "SELECT VolunteerJoinActivities.V_ID, V_Name, V_LastName , V_MobileNo1, V_MobileNo2,V_Email From VolunteerJoinActivities, Volunteer,Activities WHERE VolunteerJoinActivities.V_ID = Volunteer.V_ID AND VolunteerJoinActivities.Activity_ID = Activities.Activity_ID AND Activity_Name = 'NVDA'  AND V_Status <> 'Deactive';";
            DataTable dtNVDA2 = dbconn.QueryExecuteScalar(NVDA2);

            GridViewNVDA1.DataSource = dtNVDA2;
            GridViewNVDA1.DataBind();

            lblNVDA.Text = GridViewNVDA1.Rows.Count.ToString();

            PanelMostActive3.Visible = true;
            //  string ActivityID = DetailsView1.DataKey.Value.ToString();
            string    MostActive3   = "SELECT Top 15 CountVolunteerJoinActivity.V_ID ,NoJoin, V_Name, V_LastName, V_MobileNo1, V_MobileNo2, V_Email FROM Volunteer, CountVolunteerJoinActivity WHERE CountVolunteerJoinActivity.V_ID = Volunteer.V_ID AND CountVolunteerJoinActivity.V_ID not in(SELECT VolunteerJoinActivities.V_ID FROM VolunteerJoinActivities WHERE Activity_ID = " + ActivityID + ") ORDER BY NoJoin DESC ;";
            DataTable dtMostActive3 = dbconn.QueryExecuteScalar(MostActive3);

            GridViewMostActive3.DataSource = dtMostActive3;
            GridViewMostActive3.DataBind();

            lblMostActive3.Text = GridViewMostActive3.Rows.Count.ToString();

            string    NVDA3   = "SELECT VolunteerJoinActivities.V_ID, V_Name, V_LastName , V_MobileNo1, V_MobileNo2,V_Email From VolunteerJoinActivities, Volunteer,Activities WHERE VolunteerJoinActivities.V_ID = Volunteer.V_ID AND VolunteerJoinActivities.Activity_ID = Activities.Activity_ID AND Activity_Name = 'NVDA'  AND V_Status <> 'Deactive';";
            DataTable dtNVDA3 = dbconn.QueryExecuteScalar(NVDA3);

            GridviewNVDA3.DataSource = dtNVDA3;
            GridviewNVDA3.DataBind();
            lblNVDA3.Text = GridviewNVDA3.Rows.Count.ToString();
            dbconn.Close();

            ddlSkillType.Items.Add(new ListItem("กรุณาเลือกประเภททักษะ", "0"));
            ddlSkill.Items.Add(new ListItem("กรุณาเลือกทักษะ", "0"));
            ddlSI1.Items.Add(new ListItem("กรุณาเลือกรายการทักษะ", "0"));
        }