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();
            }
        }
        protected void lnkbtnReschedule1_Click(object sender, EventArgs e)
        {
            toGetInfo setinfo = new toGetInfo();

            MultiView1.ActiveViewIndex = 2;

            txtFNameV3.Text = setinfo.getValueFname();
            txtSiteNameV3.Text = setinfo.getValueSiteName();
            txtSiteAddressV3.Text = setinfo.getValueSiteAddress();
            txtCityV3.Text = setinfo.getValueCity();
            txtStateV3.Text = setinfo.getValueState();
            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;
            lblVisitDateV3.Visible = true;
            chkbxMiechvV3.Checked = setinfo.getMiechv();
            chkbxMiechvV3.Enabled = false;
            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;
        }
        protected void btnEdit_Click(object sender, EventArgs e)
        {
            toGetInfo setinfo = new toGetInfo();

            MultiView1.ActiveViewIndex = 2;

            txtFNameV3.Text = setinfo.getValueFname();
            txtSiteNameV3.Text = setinfo.getValueSiteName();
            txtSiteAddressV3.Text = setinfo.getValueSiteAddress();
            txtCityV3.Text = setinfo.getValueCity();
            txtStateV3.Text = setinfo.getValueState();
            txtPhoneNumberV3.Text = setinfo.getPhone();
            txtZipV3.Text = setinfo.getZip();
            txtZipV3.Enabled = true;
            txtPhoneNumberV3.Enabled = true;
            txtSiteAddressV3.Enabled = true;
            txtCityV3.Enabled = true;
            txtStateV3.Enabled = true;
            chkbxMiechvV3.Enabled = true;
            chkbxMiechvV3.Checked = setinfo.getMiechv();
            txtCalV3.Visible = false;
            lbltitleEditorReschedule.Text = "Edit Information";
            lblVisitDateV3.Visible = false;
            calV3.Visible = false;
            lnkbtnReschedule.Visible = false;
            lnkbtnSaveChanges.Visible = true;
        }