コード例 #1
0
    protected void btnRemove_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
        {
            // string str_GroupName = Session["GroupName"].ToString();
            for (int i = 0; i < GrdProcedureGroup.Rows.Count; i++)
            {
                CheckBox chkRemove = (CheckBox)GrdProcedureGroup.Rows[i].FindControl("chkRemove");
                if (chkRemove.Checked)
                {
                    ArrayList objAL = new ArrayList();
                    objAL.Add(extddlProCodeGroup.Text);
                    objAL.Add(txtCompanyID.Text);
                    objAL.Add("");
                    objAL.Add(GrdProcedureGroup.DataKeys[i]["SZ_PROCEDURE_GROUP_NAME"].ToString());
                    objAL.Add("DELETE_GROUP");
                    BindProcedureGroup obj = new BindProcedureGroup();
                    obj.DELETE_PROCEDURE_CODES(objAL);

                    //Bill_Sys_ProcedureCode_BO objProcBO = new Bill_Sys_ProcedureCode_BO();
                    //objProcBO.RemoveGroupProcedureCodes(objAL);
                }
            }
            lblMsg.Visible = true;
            lblMsg.Text    = "Procedure code group deleted successfully ...!";
            BindGrid();
            BindGroup();
            txtGroupName.Text               = "";
            txtGroupAmount.Text             = "";
            ProcedureDiv.Visible            = true;
            divGroupProcedureCode.InnerHtml = "<div style='margin-bottom: 10px;background-color:#B4DD82;font-size:medium'>Selected codes</div>";

            //extddlProCodeGroup.Text = "";
            //divGroupProcedureCode.InnerHtml = "";
            hdnProcedureCode.Value = "";
            btnAssign.Enabled      = true;
            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);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
コード例 #2
0
    protected void btnUpdate_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
        {
            ArrayList objAL1 = new ArrayList();
            objAL1.Add(extddlProCodeGroup.Text);
            objAL1.Add(txtCompanyID.Text);
            objAL1.Add("");
            objAL1.Add(txtGroupName.Text);
            objAL1.Add("DELETE_GROUP");
            BindProcedureGroup obj1 = new BindProcedureGroup();
            obj1.DELETE_PROCEDURE_CODES(objAL1);

            Session["Procedure_GroupID"] = "";
            Session["Procedure_GroupID"] = extddlProCodeGroup.Text;
            ProcedureDiv.Visible         = true;
            string[] arrspilt = hdnProcedureCode.Value.Split('~');

            bool _flag = false;
            for (int i = 0; i < arrspilt.Length - 1; i++)
            {
                string code = arrspilt[i].ToString();
                code = code.Replace("--", "").Trim();
                code = code.Replace(",", "").Trim();

                ArrayList objAL = new ArrayList();
                objAL.Add("");
                objAL.Add(code);
                objAL.Add(txtGroupName.Text);
                objAL.Add(txtCompanyID.Text);

                objAL.Add("ADD");
                objAL.Add(Session["Procedure_GroupID"].ToString());

                Bill_Sys_ProcedureCode_BO objProcBO = new Bill_Sys_ProcedureCode_BO();
                objProcBO.SaveUpdateGroupProcedureCodes(objAL);
                _flag = true;
            }

            if (_flag == true)
            {
                Bill_Sys_ProcedureCode_BO objProcBO = new Bill_Sys_ProcedureCode_BO();
                ArrayList objAL = new ArrayList();
                objAL.Add(txtGroupAmount.Text);
                objAL.Add(extddlProCodeGroup.Text);
                objAL.Add(txtCompanyID.Text);
                objAL.Add(txtGroupName.Text);
                objProcBO.SaveGroupProcedureCodeAmount(objAL);
            }

            lblMsg.Visible = true;
            lblMsg.Text    = "Procedure code group update successfully ...!";
            BindGrid();
            BindGroup();
            ClearControl();
            hdnProcedureCode.Value          = "";
            divGroupProcedureCode.InnerHtml = "<div style='margin-bottom: 10px;background-color:#B4DD82;font-size:medium'>Selected codes</div>";
            extddlProCodeGroup.Text         = Session["Procedure_GroupID"].ToString();
        }

        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);
        }

        divGroupProcedureCode.InnerHtml = "";
        hdnProcedureCode.Value          = "";
        btnAssign.Enabled = true;
        btnUpdate.Enabled = false;

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