protected void grdBills_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Edit")
     {
         int num = Convert.ToInt32(e.CommandArgument.ToString());
         this._bill_Sys_Case            = new Bill_Sys_Case();
         this._bill_Sys_Case.SZ_CASE_ID = this.grdBills.DataKeys[num]["sz_case_id"].ToString();
         CaseDetailsBO       sbo  = new CaseDetailsBO();
         Bill_Sys_CaseObject obj2 = new Bill_Sys_CaseObject();
         obj2.SZ_PATIENT_ID             = sbo.GetCasePatientID(this._bill_Sys_Case.SZ_CASE_ID, "");
         obj2.SZ_CASE_ID                = this._bill_Sys_Case.SZ_CASE_ID;
         obj2.SZ_COMAPNY_ID             = sbo.GetPatientCompanyID(obj2.SZ_PATIENT_ID);
         obj2.SZ_PATIENT_NAME           = sbo.GetPatientName(obj2.SZ_PATIENT_ID);
         obj2.SZ_CASE_NO                = this.grdBills.DataKeys[num]["sz_case_no"].ToString();
         this.Session["CASEINFO"]       = this._bill_Sys_Case;
         this.Session["CASE_OBJECT"]    = obj2;
         this.Session["PassedCaseID"]   = this._bill_Sys_Case.SZ_CASE_ID;
         this.Session["SZ_BILL_NUMBER"] = this.grdBills.DataKeys[num]["sz_bill_number"].ToString();
         base.Response.Redirect("Bill_Sys_BillTransaction.aspx?Type=Search", false);
     }
 }
    protected void grdAllReports_ItemCommand(object source, DataGridCommandEventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            if (e.CommandName.ToString() == "CaseSearch")
            {
                if (this.txtSearchOrder.Text != string.Concat(e.CommandArgument, " ASC"))
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " ASC");
                }
                else
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " DESC");
                }
                this.BindGrid();
            }
            if (e.CommandName.ToString() == "PatientNameSearch")
            {
                if (this.txtSearchOrder.Text != string.Concat(e.CommandArgument, " ASC"))
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " ASC");
                }
                else
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " DESC");
                }
                this.BindGrid();
            }
            if (e.CommandName.ToString() == "EventDateSearch")
            {
                if (this.txtSearchOrder.Text != string.Concat(e.CommandArgument, " DESC"))
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " DESC");
                }
                else
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " ASC");
                }
                this.BindGrid();
            }
            if (e.CommandName.ToString() == "DoctorNameSearch")
            {
                if (this.txtSearchOrder.Text != string.Concat(e.CommandArgument, " ASC"))
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " ASC");
                }
                else
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " DESC");
                }
                this.BindGrid();
            }
            if (e.CommandName.ToString() == "SpecialitySearch")
            {
                if (this.txtSearchOrder.Text != string.Concat(e.CommandArgument, " ASC"))
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " ASC");
                }
                else
                {
                    this.txtSearchOrder.Text = string.Concat(e.CommandArgument, " DESC");
                }
                this.BindGrid();
            }
            if (e.CommandName.ToString() == "CaseID")
            {
                this.Session["CASE_OBJECT"] = "";
                Bill_Sys_Case billSysCase = new Bill_Sys_Case()
                {
                    SZ_CASE_ID = e.Item.Cells[0].Text.ToString()
                };
                CaseDetailsBO caseDetailsBO = new CaseDetailsBO();
                //Bill_Sys_CaseObject billSysCaseObject = new Bill_Sys_CaseObject();
                // {
                Bill_Sys_CaseObject billSysCaseObject = new Bill_Sys_CaseObject();
                billSysCaseObject.SZ_PATIENT_ID   = e.Item.Cells[11].Text.ToString();
                billSysCaseObject.SZ_CASE_ID      = e.Item.Cells[0].Text.ToString();
                billSysCaseObject.SZ_COMAPNY_ID   = caseDetailsBO.GetPatientCompanyID(billSysCaseObject.SZ_PATIENT_ID);
                billSysCaseObject.SZ_PATIENT_NAME = caseDetailsBO.GetPatientName(billSysCaseObject.SZ_PATIENT_ID);
                billSysCaseObject.SZ_CASE_NO      = e.Item.Cells[10].Text.ToString();
                //};
                this.Session["CASE_OBJECT"]  = billSysCaseObject;
                this.Session["CASEINFO"]     = billSysCase;
                this.Session["PassedCaseID"] = e.Item.Cells[0].Text.ToString();
                string str = e.Item.Cells[0].Text.ToString();
                this.Session["QStrCaseID"]   = str;
                this.Session["Case_ID"]      = str;
                this.Session["Archived"]     = "0";
                this.Session["QStrCID"]      = str;
                this.Session["SelectedID"]   = str;
                this.Session["DM_User_Name"] = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                this.Session["User_Name"]    = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                this.Session["SN"]           = "0";
                this.Session["LastAction"]   = "vb_CaseInformation.aspx";
                base.Response.Redirect("AJAX%20Pages/Bill_Sys_CaseDetails.aspx", false);
            }
            if (e.CommandName == "Group Service")
            {
                Bill_Sys_Case billSysCase1 = new Bill_Sys_Case()
                {
                    SZ_CASE_ID = e.CommandArgument.ToString()
                };
                CaseDetailsBO       caseDetailsBO1     = new CaseDetailsBO();
                Bill_Sys_CaseObject billSysCaseObject1 = new Bill_Sys_CaseObject();
                // {
                billSysCaseObject1.SZ_PATIENT_ID   = e.Item.Cells[11].Text.ToString();
                billSysCaseObject1.SZ_CASE_ID      = e.CommandArgument.ToString();
                billSysCaseObject1.SZ_COMAPNY_ID   = caseDetailsBO1.GetPatientCompanyID(billSysCaseObject1.SZ_PATIENT_ID);
                billSysCaseObject1.SZ_PATIENT_NAME = caseDetailsBO1.GetPatientName(billSysCaseObject1.SZ_PATIENT_ID);
                billSysCaseObject1.SZ_CASE_NO      = e.Item.Cells[10].Text.ToString();
                // };
                this.Session["CASE_OBJECT"]  = billSysCaseObject1;
                this.Session["CASEINFO"]     = billSysCase1;
                this.Session["PassedCaseID"] = e.CommandArgument.ToString();
                string str1 = e.CommandArgument.ToString();
                this.Session["QStrCaseID"]   = str1;
                this.Session["Case_ID"]      = str1;
                this.Session["Archived"]     = "0";
                this.Session["QStrCID"]      = str1;
                this.Session["SelectedID"]   = str1;
                this.Session["DM_User_Name"] = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                this.Session["User_Name"]    = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                this.Session["SN"]           = "0";
                this.Session["LastAction"]   = "vb_CaseInformation.aspx";
                Type     type      = base.GetType();
                string[] strArrays = new string[] { "setDiv('", e.Item.Cells[1].Text.ToString(), "',EID='", e.Item.Cells[17].Text.ToString(), "');" };
                ScriptManager.RegisterStartupScript(this, type, "starScript", string.Concat(strArrays), true);
                this.BindGrid();
            }
            if (e.CommandName == "Document Manager")
            {
                Bill_Sys_Case billSysCase2 = new Bill_Sys_Case()
                {
                    SZ_CASE_ID = e.CommandArgument.ToString()
                };
                CaseDetailsBO       caseDetailsBO2     = new CaseDetailsBO();
                Bill_Sys_CaseObject billSysCaseObject2 = new Bill_Sys_CaseObject();
                //{
                billSysCaseObject2.SZ_PATIENT_ID   = e.Item.Cells[11].Text.ToString();
                billSysCaseObject2.SZ_CASE_ID      = e.CommandArgument.ToString();
                billSysCaseObject2.SZ_COMAPNY_ID   = caseDetailsBO2.GetPatientCompanyID(billSysCaseObject2.SZ_PATIENT_ID);
                billSysCaseObject2.SZ_PATIENT_NAME = caseDetailsBO2.GetPatientName(billSysCaseObject2.SZ_PATIENT_ID);
                billSysCaseObject2.SZ_CASE_NO      = e.Item.Cells[10].Text.ToString();
                //};
                this.Session["CASE_OBJECT"]  = billSysCaseObject2;
                this.Session["CASEINFO"]     = billSysCase2;
                this.Session["PassedCaseID"] = e.CommandArgument.ToString();
                string str2 = "";
                string str3 = e.CommandArgument.ToString();
                this.Session["QStrCaseID"]   = str3;
                this.Session["Case_ID"]      = str3;
                this.Session["Archived"]     = "0";
                this.Session["QStrCID"]      = str3;
                this.Session["SelectedID"]   = str3;
                this.Session["DM_User_Name"] = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                this.Session["User_Name"]    = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                this.Session["SN"]           = "0";
                this.Session["LastAction"]   = "vb_CaseInformation.aspx";
                str2 = "Document Manager/case/vb_CaseInformation.aspx";
                base.Response.Write(string.Concat("<script language='javascript'>window.open('", str2, "', 'AdditionalData');</script>"));
            }
            if (e.CommandName == "Display Diag Code")
            {
                this.objAL = new ArrayList();
                this.objAL.Add(e.Item.Cells[0].Text.ToString());
                this.objAL.Add(e.Item.Cells[1].Text.ToString());
                this.objAL.Add("");
                this.objAL.Add(((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                this.BindGrid_DisplayDiagonosisCode(this.objAL);
                this.Session["DIAGINFO"] = this.objAL;
            }
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Beispiel #3
0
    protected void grdAllReports_ItemCommand(object source, DataGridCommandEventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            #region "Document Manager"
            if (e.CommandName == "Document Manager")
            {
                // Create Session for document Manager
                Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = e.CommandArgument.ToString();
                CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                _bill_Sys_CaseObject.SZ_PATIENT_ID   = e.Item.Cells[2].Text.ToString();
                _bill_Sys_CaseObject.SZ_CASE_ID      = e.CommandArgument.ToString();
                _bill_Sys_CaseObject.SZ_COMAPNY_ID   = _caseDetailsBO.GetPatientCompanyID(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_CASE_NO      = e.Item.Cells[13].Text.ToString();//13
                Session["CASE_OBJECT"]  = _bill_Sys_CaseObject;
                Session["CASEINFO"]     = _bill_Sys_Case;
                Session["PassedCaseID"] = e.CommandArgument.ToString();
                String szURL    = "";
                String szCaseID = e.CommandArgument.ToString();
                Session["QStrCaseID"]   = szCaseID;
                Session["Case_ID"]      = szCaseID;
                Session["Archived"]     = "0";
                Session["QStrCID"]      = szCaseID;
                Session["SelectedID"]   = szCaseID;
                Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["SN"]           = "0";
                Session["LastAction"]   = "vb_CaseInformation.aspx";
                szURL = "Document Manager/case/vb_CaseInformation.aspx";
                //    Response.Write("<script language='javascript'>window.open('" + szURL + "', 'AdditionalData', 'width=1200,height=800,left=30,top=30');</script>");
                Response.Write("<script language='javascript'>window.open('" + szURL + "', 'AdditionalData');</script>");
            }
            #endregion

            #region "Display Diagnosis Code"
            if (e.CommandName == "Display Diag Code")
            {
                objAL = new ArrayList();
                objAL.Add(e.Item.Cells[0].Text.ToString());
                objAL.Add(e.Item.Cells[1].Text.ToString());
                objAL.Add("");
                objAL.Add(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                BindGrid_DisplayDiagonosisCode(objAL);
                Session["DIAGINFO"] = objAL;
            }
            #endregion

            #region "Add Diagnosis Code"
            if (e.CommandName == "Add Diagnosis Code")
            {
                objAL = new ArrayList();
                objAL.Add(e.Item.Cells[0].Text.ToString());
                objAL.Add(e.Item.Cells[1].Text.ToString());
                objAL.Add(e.Item.Cells[2].Text.ToString());
                objAL.Add(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                Session["DIAGINFO"] = objAL;
                ScriptManager.RegisterStartupScript(this, this.GetType(), "starScript", "showDiagnosisCodePopup();", true);
            }
            #endregion

            #region "Open Case Details"
            if (e.CommandName == "Open Case")
            {
                Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = e.CommandArgument.ToString();
                CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                _bill_Sys_CaseObject.SZ_PATIENT_ID   = e.Item.Cells[2].Text.ToString();
                _bill_Sys_CaseObject.SZ_CASE_ID      = e.CommandArgument.ToString();
                _bill_Sys_CaseObject.SZ_COMAPNY_ID   = _caseDetailsBO.GetPatientCompanyID(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_CASE_NO      = e.Item.Cells[13].Text.ToString();//13
                Session["CASE_OBJECT"]  = _bill_Sys_CaseObject;
                Session["CASEINFO"]     = _bill_Sys_Case;
                Session["PassedCaseID"] = e.CommandArgument.ToString();
                String szURL    = "";
                String szCaseID = e.CommandArgument.ToString();
                Session["QStrCaseID"]   = szCaseID;
                Session["Case_ID"]      = szCaseID;
                Session["Archived"]     = "0";
                Session["QStrCID"]      = szCaseID;
                Session["SelectedID"]   = szCaseID;
                Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["SN"]           = "0";
                Session["LastAction"]   = "vb_CaseInformation.aspx";
                szURL = "Document Manager/case/vb_CaseInformation.aspx";
                Response.Redirect("Bill_Sys_CaseDetails.aspx", false);
            }
            #endregion


            #region "Add Group Service"

            if (e.CommandName == "Group Service")
            {
                Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = e.CommandArgument.ToString();
                CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                _bill_Sys_CaseObject.SZ_PATIENT_ID   = e.Item.Cells[2].Text.ToString();
                _bill_Sys_CaseObject.SZ_CASE_ID      = e.CommandArgument.ToString();
                _bill_Sys_CaseObject.SZ_COMAPNY_ID   = _caseDetailsBO.GetPatientCompanyID(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_CASE_NO      = e.Item.Cells[13].Text.ToString();//13
                Session["CASE_OBJECT"]  = _bill_Sys_CaseObject;
                Session["CASEINFO"]     = _bill_Sys_Case;
                Session["PassedCaseID"] = e.CommandArgument.ToString();
                String szURL    = "";
                String szCaseID = e.CommandArgument.ToString();
                Session["QStrCaseID"]   = szCaseID;
                Session["Case_ID"]      = szCaseID;
                Session["Archived"]     = "0";
                Session["QStrCID"]      = szCaseID;
                Session["SelectedID"]   = szCaseID;
                Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["SN"]           = "0";
                Session["LastAction"]   = "vb_CaseInformation.aspx";
                szURL = "Document Manager/case/vb_CaseInformation.aspx";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "starScript", "setDiv('" + e.Item.Cells[1].Text.ToString() + "',EID='" + e.Item.Cells[15].Text.ToString() + "');", true); //15
            }

            #endregion
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            //txtChequeNumber.Attributes.Add("onblur", "javascript:return FromDateValidation(this);");

            btnSave.Attributes.Add("onclick", "return ooValidate();");

            btnUpdate.Attributes.Add("onclick", "return formValidator('frmPaymentTrans','txtChequeNumber,txtChequeDate,txtChequeAmount,txtPaymentType');");
            txtCompanyID.Text = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            btnLitigation.Attributes.Add("onclick", "return AddComment();");
            btnWriteoff.Attributes.Add("onclick", "return AddComment();");
            //billsearch ajax page
            if (Request.QueryString["csid"] != null)
            {
                Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                string        szCaseId       = Request.QueryString["csid"];

                string szBollNo = Request.QueryString["bno"];


                string szBalance = Request.QueryString["bal"];

                _bill_Sys_Case.SZ_CASE_ID = szCaseId;
                CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                _bill_Sys_CaseObject.SZ_PATIENT_ID   = _caseDetailsBO.GetCasePatientID(_bill_Sys_Case.SZ_CASE_ID, "");
                _bill_Sys_CaseObject.SZ_CASE_ID      = szCaseId;
                _bill_Sys_CaseObject.SZ_COMAPNY_ID   = _caseDetailsBO.GetPatientCompanyID(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_CASE_NO      = _caseDetailsBO.GetCaseNo(_bill_Sys_CaseObject.SZ_CASE_ID, _bill_Sys_CaseObject.SZ_COMAPNY_ID);
                Session["CASE_OBJECT"]    = _bill_Sys_CaseObject;
                Session["CASEINFO"]       = _bill_Sys_Case;
                Session["PassedCaseID"]   = szCaseId;
                Session["SZ_BILL_NUMBER"] = szBollNo;

                Session["PassedBillID"] = szBollNo;
                Session["Balance"]      = szBalance;
            }

            txtUserId.Text = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID;
            txtBillNo.Text = Session["PassedBillID"].ToString();


            if (!IsPostBack)
            {
                lblCaseNo.Text     = txtBillNo.Text;
                txtBalance.Text    = Session["Balance"].ToString();
                lblPosteddate.Text = DateTime.Today.ToShortDateString();
                BindGrid();
                getVisitDate();
                btnUpdate.Enabled = false;
            }
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }

        #region "check version readonly or not"
        string app_status = ((Bill_Sys_BillingCompanyObject)Session["APPSTATUS"]).SZ_READ_ONLY.ToString();
        if (app_status.Equals("True"))
        {
            Bill_Sys_ChangeVersion cv = new Bill_Sys_ChangeVersion(this.Page);
            cv.MakeReadOnlyPage("Bill_Sys_PaymentTransactions.aspx");
        }
        #endregion
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
    protected void grdBillReportDetails_ItemCommand(object source, DataGridCommandEventArgs e)
    {//Logging Start
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            if (e.CommandName.ToString() == "view")
            {
                Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = e.Item.Cells[0].Text.ToString();
                CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                _bill_Sys_CaseObject.SZ_PATIENT_ID   = e.Item.Cells[1].Text.ToString();
                _bill_Sys_CaseObject.SZ_CASE_ID      = e.Item.Cells[0].Text.ToString();
                _bill_Sys_CaseObject.SZ_COMAPNY_ID   = _caseDetailsBO.GetPatientCompanyID(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_CASE_NO      = e.Item.Cells[4].Text.ToString();
                Session["CASE_OBJECT"]    = _bill_Sys_CaseObject;
                Session["CASEINFO"]       = _bill_Sys_Case;
                Session["PassedCaseID"]   = e.Item.Cells[0].Text;
                Session["SZ_BILL_NUMBER"] = e.CommandArgument;
                Response.Redirect("Bill_Sys_BillTransaction.aspx?Type=Search", false);
            }
            else if (e.CommandName.ToString() == "Document Manager")
            {
                // Create Session for document Manager
                Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = e.Item.Cells[0].Text.ToString();
                CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                _bill_Sys_CaseObject.SZ_PATIENT_ID   = e.Item.Cells[1].Text.ToString();
                _bill_Sys_CaseObject.SZ_CASE_ID      = e.Item.Cells[0].Text.ToString();
                _bill_Sys_CaseObject.SZ_COMAPNY_ID   = _caseDetailsBO.GetPatientCompanyID(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                _bill_Sys_CaseObject.SZ_CASE_NO      = e.Item.Cells[4].Text.ToString();
                Session["CASE_OBJECT"]  = _bill_Sys_CaseObject;
                Session["CASEINFO"]     = _bill_Sys_Case;
                Session["PassedCaseID"] = e.Item.Cells[0].Text;
                String szURL    = "";
                String szCaseID = e.Item.Cells[0].Text;
                Session["QStrCaseID"]   = szCaseID;
                Session["Case_ID"]      = szCaseID;
                Session["Archived"]     = "0";
                Session["QStrCID"]      = szCaseID;
                Session["SelectedID"]   = szCaseID;
                Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["SN"]           = "0";
                Session["LastAction"]   = "vb_CaseInformation.aspx";
                szURL = "Document Manager/case/vb_CaseInformation.aspx";
                //    Response.Write("<script language='javascript'>window.open('" + szURL + "', 'AdditionalData', 'width=1200,height=800,left=30,top=30');</script>");
                Response.Write("<script language='javascript'>window.open('" + szURL + "', 'AdditionalData');</script>");
            }
            if (e.CommandName.ToString() == "Generate bill")
            {
                #region "Logic to view bills"
                Bill_Sys_NF3_Template objNF3Template = new Bill_Sys_NF3_Template();
                DataSet objDS = new DataSet();
                objDS = objNF3Template.getBillList(e.Item.Cells[5].Text);
                if (objDS.Tables[0].Rows.Count > 1)
                {
                    grdViewBills.DataSource = objDS;
                    grdViewBills.DataBind();
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "starScript", "showviewBills();", true);
                }
                else if (objDS.Tables[0].Rows.Count == 1)
                {
                    string szBillName = objDS.Tables[0].Rows[0]["PATH"].ToString();
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "starScript", "window.open('" + szBillName + "');", true);
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "starScript", "alert('No bill generated ...!');", true);
                }

                #endregion
            }

            if (e.CommandName.ToString() == "CaseSearch")
            {
                if (txtSearchOrder.Text == e.CommandArgument + " ASC")
                {
                    txtSearchOrder.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSearchOrder.Text = e.CommandArgument + " ASC";
                }
                BindGrid();
            }

            if (e.CommandName.ToString() == "PatientNameSearch")
            {
                if (txtSearchOrder.Text == e.CommandArgument + " ASC")
                {
                    txtSearchOrder.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSearchOrder.Text = e.CommandArgument + " ASC";
                }
                BindGrid();
            }
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("../Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }