protected void LinkButton2_Click(object sender, EventArgs e)
    {
        reset();
        int empId = Convert.ToInt32(Session["doctorId"].ToString());

        Doctor_AddOPDPrescriptionReportBL objAddOPDPrescriptionReportBL = new Doctor_AddOPDPrescriptionReportBL();
        string reportId = objAddOPDPrescriptionReportBL.Doctor_AddOPDPrescriptionReport(empId, appointmentToken);

        Common_GetEmployeeNameByIdBL objGetEmployeeNameByIdBL = new Common_GetEmployeeNameByIdBL();
        string empName = objGetEmployeeNameByIdBL.Common_GetEmployeeNameById(empId);

        Doctor_PrintOPDPrescriptionReportBL objPrintOPDPrescriptionReportBL = new Doctor_PrintOPDPrescriptionReportBL();

        byte[] file = objPrintOPDPrescriptionReportBL.Doctor_PrintOPDPrescriptionReport(reportId, appointmentToken,
                                                                                        empName, appointmentDate, appointmentTime, patientId.ToString(),
                                                                                        Label2.Text, objOPDTreatmentMedicineBOList, TextBox8.Text);

        Response.Clear();
        Response.ContentType = "application/pdf";
        Response.AddHeader("Content-Disposition", "attachment; filename=OPDPrescriptionReport.pdf");
        Response.ContentType = "application/pdf";
        Response.Buffer      = true;
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.BinaryWrite(file);
        Response.End();
        Response.Close();
    }
    protected void LinkButton2_Click(object sender, EventArgs e)
    {
        reset();
        int empId = Convert.ToInt32(Session["doctorId"].ToString());

        Doctor_AddOPDPrescriptionReportBL objAddOPDPrescriptionReportBL=new Doctor_AddOPDPrescriptionReportBL();
        string reportId = objAddOPDPrescriptionReportBL.Doctor_AddOPDPrescriptionReport(empId, appointmentToken);

        Common_GetEmployeeNameByIdBL objGetEmployeeNameByIdBL = new Common_GetEmployeeNameByIdBL();
        string empName=objGetEmployeeNameByIdBL.Common_GetEmployeeNameById(empId);

        Doctor_PrintOPDPrescriptionReportBL objPrintOPDPrescriptionReportBL = new Doctor_PrintOPDPrescriptionReportBL();
        byte[] file = objPrintOPDPrescriptionReportBL.Doctor_PrintOPDPrescriptionReport(reportId, appointmentToken,
            empName, appointmentDate, appointmentTime, patientId.ToString(),
            Label2.Text, objOPDTreatmentMedicineBOList, TextBox8.Text);

        Response.Clear();
        Response.ContentType = "application/pdf";
        Response.AddHeader("Content-Disposition", "attachment; filename=OPDPrescriptionReport.pdf");
        Response.ContentType = "application/pdf";
        Response.Buffer = true;
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.BinaryWrite(file);
        Response.End();
        Response.Close();
    }