Exemplo n.º 1
0
    protected void grid_RowCommand(object sender, GridViewCommandEventArgs 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() == "CaseNO")
            {
                mbs.bl.connections.MyConnectionDAO obj = new mbs.bl.connections.MyConnectionDAO();
                obj.CaseID = e.CommandArgument.ToString();
                obj.CompanyConnectionFrom = szCompanyID;
                obj.CompanyConnectionTo   = extddlBillCompany.Text;

                mbs.bl.connections.MyConnections objService = new mbs.bl.connections.MyConnections();
                DtlView.DataSource = objService.GetConnectingPatientInformation(obj);
                DtlView.DataBind();

                if (objService.isShowVisits == true)
                {
                    //Visit grid set to bind
                    txtcaseId.Text         = obj.CaseID;
                    txtLoginCompanyId.Text = obj.CompanyConnectionFrom;
                    txtCompanyId.Text      = obj.CompanyConnectionTo;

                    tdvisit.Visible = true;
                    VisitGrid.XGridBind();
                    VisitGrid.Visible = true;
                }
                dvabc.Visible     = true;
                txtCompanyId.Text = extddlBillCompany.Text;
            }
            int index = 0;
            if (e.CommandName.ToString() == "ClientSideButton")
            {
                string caseid = "", caseno = "";

                index  = Convert.ToInt32(e.CommandArgument.ToString());
                caseid = grid.DataKeys[index][0].ToString();
                caseno = grid.DataKeys[index][3].ToString();

                Session["DocreadOnly"] = true;
                ScriptManager.RegisterStartupScript(this, GetType(), "MMss1231", "<script type='text/javascript'>window.open('../Document Manager/case/vb_CaseInformation.aspx?caseid=" + caseid + "&caseno=" + caseno + "', 'AdditionalData', 'width=1200,height=800,left=30,top=30,scrollbars=1');</script>", false);
            }

            if (e.CommandName.ToString() == "COPYDOC")
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "click", "showCopyDocPopup();", true);
                //ScriptManager.RegisterStartupScript(this, GetType(), "MMss1231", "showCopyDocPopup();", 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);
        }

        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemplo n.º 2
0
    private void BindPatients()
    {
        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
        {
            hdnCompanyid.Value = extddlBillCompany.Text;
            mbs.bl.connections.MyConnectionDAO obj = new mbs.bl.connections.MyConnectionDAO();
            obj.CompanyConnectionFrom = szCompanyID;
            obj.CompanyConnectionTo   = extddlBillCompany.Text;
            obj.CaseID = "";
            mbs.bl.connections.MyConnections objService = new mbs.bl.connections.MyConnections();

            if (extddlBillCompany.Text != "NA")
            {
                objService.GetConnectingPatientInformation(obj);
                objService.GetIsCopyAllowed(obj);
            }
            if (objService.isShowVisits == true)
            {
                //Missing procedure link gets visible
                lnkmissingProcode.Visible = true;
                Session["SHOW_LINKS"]     = "true";
            }
            else
            {
                lnkmissingProcode.Visible = false;
                Session["SHOW_LINKS"]     = "false";
            }
            if (objService.isCopyAllowed == true)
            {
                //copy button get visible
                btnCpy.Visible = true;
                grid.Columns[COL_PATIENT_COPY].Visible = true;
            }
            else
            {
                btnCpy.Visible = false;
                grid.Columns[COL_PATIENT_COPY].Visible = false;
            }

            pnlSrch.Visible        = true;
            txtCompanyId.Text      = extddlBillCompany.Text;
            txtLoginCompanyId.Text = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            grid.XGridBindSearch();

            if (extddlBillCompany.Text == "NA")
            {
                pnlSrch.Visible           = false;
                lnkmissingProcode.Visible = false;
                btnCpy.Visible            = 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);
        }

        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }