protected void BSRefresh_Click(object sender, EventArgs e)
        {
            conn.Open();
            SqlCommand query = new SqlCommand("SELECT RecordId,OpdId,PatientName,DepartmentName,DoctorName,Status FROM Appointment JOIN Patients ON Appointment.OpdId = Patients.OpdNo and DoctorName like '%'+@Docname+'%' and DepartmentName like '%'+@Deptname+'%' and OpdId like'%'+@opd+'%' and PatientName like '%'+@record+'%' and AppointmentDate = (SELECT CAST(GETDATE() AS Date))", conn);

            query.Parameters.AddWithValue("Docname", "");
            query.Parameters.AddWithValue("Deptname", "");
            query.Parameters.AddWithValue("opd", "");
            query.Parameters.AddWithValue("record", "");
            DataTable      dt  = new DataTable();
            SqlDataAdapter sda = new SqlDataAdapter(query);

            sda.Fill(dt);
            GridTodayAppoint.DataSource = dt;
            GridTodayAppoint.DataBind();
            BSearch.Enabled           = true;
            BSRefresh.Enabled         = false;
            BSRefresh.BackColor       = System.Drawing.Color.White;
            BSRefresh.ForeColor       = System.Drawing.Color.DarkGray;
            BSearch.BackColor         = Color.FromName("#c23838");
            BSearch.ForeColor         = Color.FromName("#fff");
            TodayAppointPanel.Visible = true;
            RecordsPanel.Visible      = false;
            PatientsPanel.Visible     = false;
        }
        private void LoadPage()
        {
            conn.Open();
            SqlDataAdapter da = new SqlDataAdapter("SELECT RecordId,OpdId,PatientName,DepartmentName,DoctorName,Status FROM Appointment JOIN Patients ON Appointment.OpdId = Patients.OpdNo and AppointmentDate = (SELECT CAST(GETDATE() AS Date))", conn);
            DataTable      dt = new DataTable();

            da.Fill(dt);
            GridTodayAppoint.DataSource = dt;
            GridTodayAppoint.DataBind();
            conn.Close();
            BSearch.Enabled     = true;
            BSRefresh.Enabled   = false;
            BSRefresh.BackColor = System.Drawing.Color.White;
            BSRefresh.ForeColor = System.Drawing.Color.DarkGray;
            BSearch.BackColor   = Color.FromName("#c23838");
            BSearch.ForeColor   = Color.FromName("#fff");
        }