protected void btnRevert_Click1(object sender, EventArgs e)
 {
     for (int j = 0; j < grdProcesureCode.Items.Count; j++)
     {
         CheckBox chkDelete1 = (CheckBox)grdProcesureCode.Items[j].FindControl("chkSelect");
         if (chkDelete1.Checked && grdProcesureCode.Items[j].Cells[11].Text.Trim().ToString().Equals("Received Report"))
         {
             Bill_Sys_ReportBO objUpdateReport = new Bill_Sys_ReportBO();
             objUpdateReport.RevertReport(Convert.ToInt32(grdProcesureCode.Items[j].Cells[1].Text.Trim().ToString()));
             #region Activity_Log
             this._DAO_NOTES_EO = new DAO_NOTES_EO();
             this._DAO_NOTES_EO.SZ_MESSAGE_TITLE = "REP_REVERT";
             this._DAO_NOTES_EO.SZ_ACTIVITY_DESC = "Procedure Id  : " + grdProcesureCode.Items[j].Cells[1].Text.Trim().ToString() + " Report Revrted . ";
             this._DAO_NOTES_BO               = new DAO_NOTES_BO();
             this._DAO_NOTES_EO.SZ_USER_ID    = (((Bill_Sys_UserObject)HttpContext.Current.Session["USER_OBJECT"]).SZ_USER_ID);
             this._DAO_NOTES_EO.SZ_CASE_ID    = this._DAO_NOTES_EO.SZ_CASE_ID = (((Bill_Sys_CaseObject)HttpContext.Current.Session["CASE_OBJECT"]).SZ_CASE_ID);
             this._DAO_NOTES_EO.SZ_COMPANY_ID = ((Bill_Sys_BillingCompanyObject)HttpContext.Current.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
             this._DAO_NOTES_BO.SaveActivityNotes(this._DAO_NOTES_EO);
             #endregion
             lblMsg.Text    = "Report Reverted Successfully";
             lblMsg.Visible = true;
         }
     }
     GetProcedureList(txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
 }
    protected void btnRevert_Click(object sender, EventArgs e)
    {
        //revert the recored
        for (int j = 0; j < grdReceivedeport.Items.Count; j++)
        {
            CheckBox chkDelete1 = (CheckBox)grdReceivedeport.Items[j].FindControl("chkUpdateStatus");
            if (chkDelete1.Checked)
            {
                Bill_Sys_ReportBO objUpdateReport = new Bill_Sys_ReportBO();
                objUpdateReport.RevertReport(Convert.ToInt32(grdReceivedeport.Items[j].Cells[10].Text.Trim().ToString()));
            }
        }



        //binding grid agin whith new value
        string            szCmpId       = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID.ToString();
        Bill_Sys_ReportBO objReport     = new Bill_Sys_ReportBO();
        DataSet           dsOfficeName1 = new DataSet();

        dsOfficeName1 = objReport.GetReceived_Report(szCmpId, txtFromDate.Text, txtToDate.Text, txtPatientName.Text, ddlOffice.SelectedValue);

        DataView dv1;

        dv1      = dsOfficeName1.Tables[0].DefaultView;
        dv1.Sort = "DATE_OF_REFERRAL_PROC,PATIENT_NAME ASC";

        grdReceivedeport.DataSource = dv1;
        grdExel.DataSource          = dv1;
        Session["OfficeData"]       = dsOfficeName1;
        grdReceivedeport.DataBind();
        grdExel.DataBind();
        if ((((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_CHART_NO != "1"))
        {
            grdReceivedeport.Columns[2].Visible = false;
            grdExel.Columns[2].Visible          = false;
        }
    }