Exemplo n.º 1
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        string            szMessageDelete    = "";
        string            szMessageNotDelete = "";
        int               iReturnValue       = 0;
        Bill_Sys_DenialBO objDelete;

        for (int i = 0; i < grdDenialReasons.Rows.Count; i++)
        {
            CheckBox chkDelete1 = (CheckBox)grdDenialReasons.Rows[i].FindControl("ChkDenail");
            if (chkDelete1.Checked)
            {
                objDelete    = new Bill_Sys_DenialBO();
                iReturnValue = objDelete.DeleteenialMaster(grdDenialReasons.DataKeys[i]["DenialID"].ToString(), txtCompanyID.Text);

                if (iReturnValue == 1)
                {
                    if (szMessageDelete == "")
                    {
                        szMessageDelete = grdDenialReasons.DataKeys[i]["DenialReason"].ToString();
                    }
                    else
                    {
                        szMessageDelete = szMessageDelete + "," + grdDenialReasons.DataKeys[i]["DenialReason"].ToString();
                    }
                }
                else
                {
                    if (szMessageNotDelete == "")
                    {
                        szMessageNotDelete = grdDenialReasons.DataKeys[i]["DenialReason"].ToString();
                    }
                    else
                    {
                        szMessageNotDelete = szMessageNotDelete + "," + grdDenialReasons.DataKeys[i]["DenialReason"].ToString();
                    }
                }
            }
        }

        if (szMessageDelete != "")
        {
            ScriptManager.RegisterClientScriptBlock(this, GetType(), "Done", "alert('" + szMessageDelete + " -Denial Reasons Are Delete Successfully .');", true);
        }

        if (szMessageNotDelete != "")
        {
            ScriptManager.RegisterClientScriptBlock(this, GetType(), "Done", "alert('" + szMessageNotDelete + " Denial Reasons Are In Use');", true);
        }



        grdDenialReasons.XGridBindSearch();
    }
Exemplo n.º 2
0
    private void BindData()
    {
        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
        {
            _bill_Sys_DenialBO   = new Bill_Sys_DenialBO();
            grdDenial.DataSource = _bill_Sys_DenialBO.GET_Denial(Session["TM_SZ_BILL_ID"].ToString());
            grdDenial.DataBind();
            if (grdDenial.Items.Count == 0)
            {
                lblDenial.Text = "First Denial";
            }
            else if (grdDenial.Items.Count == 1)
            {
                lblDenial.Text = "Second Denial";
            }
            else if (grdDenial.Items.Count == 2)
            {
                lblDenial.Text    = "";
                txtReason.Visible = false;
                btnOK.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());
        }
    }
Exemplo n.º 3
0
    protected void btnOK_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());
        }
        try
        {
            _bill_Sys_DenialBO = new Bill_Sys_DenialBO();

            if (grdDenial.Items.Count == 0)
            {
                _bill_Sys_DenialBO.UpdateDenial(Session["TM_SZ_BILL_ID"].ToString(), 1, txtReason.Text, DateTime.Now.Date, "FirstDenial");
                BindData();
                //lblMsg.Text = "First denial saved successfully.";
            }
            else if (grdDenial.Items.Count == 1)
            {
                _bill_Sys_DenialBO.UpdateDenial(Session["TM_SZ_BILL_ID"].ToString(), 2, txtReason.Text, DateTime.Now.Date, "SecondDenial");
                BindData();
                //lblMsg.Text = "Second denial saved successfully.";
            }
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ss", "<script language='javascript'>  parent.document.getElementById('divid').style.visibility = 'hidden'; parent.document.getElementById('lblMsg').value='Denial added successfully.';</script>");
        }
        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.º 4
0
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        DenialBO = new Bill_Sys_DenialBO();
        int result = 0;

        if ((txtDenialID.Text.Trim() != "") && (txtDenialReason.Text.Trim() != ""))
        {
            result = DenialBO.UpdateDenialMaster(txtDenialID.Text, txtDenialReason.Text.Trim(), txtCompanyID.Text);
        }
        if (result > 0)
        {
            ScriptManager.RegisterClientScriptBlock(this, GetType(), "updateclick1", "alert('Denial Reason Updated Successfully');", true);
            txtDenialID.Text     = "";
            txtDenialReason.Text = "";
        }
        else
        {
            ScriptManager.RegisterClientScriptBlock(this, GetType(), "updateclick1", "alert('No Records Updated');", true);
        }
        grdDenialReasons.XGridBindSearch();
    }
Exemplo n.º 5
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        DenialBO = new Bill_Sys_DenialBO();
        int result = 0;

        if (txtDenialReason.Text.Trim() != "")
        {
            result = DenialBO.AddDenialMaster(txtDenialReason.Text.Trim(), txtCompanyID.Text);
        }
        if (result > 0)
        {
            ScriptManager.RegisterClientScriptBlock(this, GetType(), "addclick1", "alert('Denial Reason Added Successfully');", true);
            txtDenialID.Text     = "";
            txtDenialReason.Text = "";
        }
        else
        {
            ScriptManager.RegisterClientScriptBlock(this, GetType(), "addclick2", "alert('No Records Added. Please check that Denial Reason doesnot already exists');", true);
        }

        grdDenialReasons.XGridBindSearch();
    }