Esempio n. 1
0
    protected void btnSoftDelete_Click(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());
        }
        CaseDetailsBO caseDetailsBO = new CaseDetailsBO();
        string        str           = "";

        try
        {
            for (int i = 0; i < this.grdPatientList.Rows.Count; i++)
            {
                if (((CheckBox)this.grdPatientList.Rows[i].FindControl("chkDelete")).Checked)
                {
                    if (!((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY)
                    {
                        LinkButton linkButton = (LinkButton)this.grdPatientList.Rows[i].Cells[2].FindControl("lnkSelectCase");
                        str = linkButton.Text.ToString();
                    }
                    else
                    {
                        LinkButton linkButton1 = (LinkButton)this.grdPatientList.Rows[i].Cells[3].FindControl("lnkSelectRCase");
                        str = linkButton1.Text.ToString();
                    }
                    caseDetailsBO.SoftDelete(str, this.txtCompanyID.Text, true);
                }
            }
            this.fillcontrol();
            this.grdPatientList.XGridBindSearch();
            Bill_Sys_PatientList.log.Debug("grdPatientList.XGridBindSearch() Completed.");
            this.clearcontrol();
            this.SoftDelete();
        }
        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());
        }
    }