Пример #1
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
        {
            if (Session["PacketDoc"] != null)
            {
                _ReqDocBO = new Bill_Sys_RequiredDocumentBO();
                _ReqDocEO = new REQUIREDDOCUMENT_EO();
                ArrayList objarr         = new ArrayList();
                string    szOpenFilePath = "";
                objarr = (ArrayList)(Session["PacketDoc"]);

                _ReqDocEO = _ReqDocBO.MergeDocument(objarr);

                if (_ReqDocEO.SZ_OPEN_FILE_PATH != "")
                {
                    szOpenFilePath = _ReqDocEO.SZ_OPEN_FILE_PATH;
                    szOpenFilePath = ApplicationSettings.GetParameterValue("DocumentManagerURL") + szOpenFilePath;
                    ScriptManager.RegisterClientScriptBlock(this, GetType(), "mm", "window.open('" + szOpenFilePath.ToString() + "');", true);
                }
                string szBillNO = Session["BillNo"].ToString();
                Bill_Sys_RequiredDocumentBO objDocumentBO1 = new Bill_Sys_RequiredDocumentBO();
                objDocumentBO1.Set_PacketId(txtCompanyID.Text, szBillNO, txtPacketId.Text, ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID);
                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());
        }
    }
Пример #2
0
    //protected void grdPacketing_ItemCommand(object source, DataGridCommandEventArgs e)
    //{
    //    _ReqDocBO = new Bill_Sys_RequiredDocumentBO();
    //    _ReqDocEO = new REQUIREDDOCUMENT_EO();
    //    ArrayList objarr = new ArrayList();
    //    string szOpenFilePath = "";
    //    string _CompanyName = "";
    //    try
    //    {
    //        #region "Create Packet"
    //        if (e.CommandName.ToString() == "CreatePacket")
    //        {
    //            if (!txtPacketId.Text.Equals(""))
    //            {
    //                _CompanyName = Convert.ToString(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_NAME);
    //                objarr.Add(e.Item.Cells[13].Text);//caseID
    //                objarr.Add(e.Item.Cells[14].Text);//Bill Number
    //                objarr.Add(txtCompanyID.Text);//companyID
    //                objarr.Add(_CompanyName);//companyName
    //                _ReqDocEO = _ReqDocBO.CheckExists(objarr);
    //                Session["PacketDoc"] = objarr;

    //                if (_ReqDocEO.SZ_ERROR_MSG != "")
    //                {
    //                    msgPatientExists.InnerHtml = _ReqDocEO.SZ_ERROR_MSG;
    //                    Page.RegisterStartupScript("mm", "<script language='javascript'>openExistsPage();</script>");
    //                }
    //                else
    //                {
    //                    _ReqDocEO = _ReqDocBO.MergeDocument(objarr);
    //                    ///set paket bill status id to bill number --atul
    //                    Bill_Sys_RequiredDocumentBO objDocumentBO1 = new Bill_Sys_RequiredDocumentBO();
    //                    objDocumentBO1.Set_PacketId(txtCompanyID.Text, e.Item.Cells[14].Text, txtPacketId.Text, ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID);
    //                    BindGrid();
    //                }

    //                if (_ReqDocEO.SZ_OPEN_FILE_PATH != "")
    //                {
    //                    szOpenFilePath = _ReqDocEO.SZ_OPEN_FILE_PATH;
    //                    szOpenFilePath = ConfigurationSettings.AppSettings["DocumentManagerURL"].ToString() + szOpenFilePath;
    //                    Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "window.open('" + szOpenFilePath.ToString() + "'); ", true);
    //                }


    //            }
    //            else
    //            {
    //                 msgPatientExists.InnerHtml = "You don't have bill status for packeting,you can not create packet.Please enter bill status for packeting.";
    //                Page.RegisterStartupScript("mm", "<script language='javascript'>openExistsPage();</script>");

    //            }

    //      }
    //        #endregion

    //      #region "Grid Sort"

    //      DataView dv;
    //        DataSet ds = new DataSet();
    //        ds = (DataSet)Session["DataBind"];
    //        dv = ds.Tables[0].DefaultView;

    //        if (e.CommandName.ToString() == "Bill No")
    //        {
    //            if (txtSort.Text == e.CommandArgument + " ASC")
    //            {
    //                txtSort.Text = e.CommandArgument + "  DESC";
    //            }
    //            else
    //            {
    //                txtSort.Text = e.CommandArgument + " ASC";
    //            }

    //        }
    //        else if (e.CommandName.ToString() == "Bill Date")
    //        {
    //            if (txtSort.Text == e.CommandArgument + " ASC")
    //            {
    //                txtSort.Text = e.CommandArgument + " DESC";
    //            }
    //            else
    //            {
    //                txtSort.Text = e.CommandArgument + " ASC";
    //            }

    //        }
    //        else if (e.CommandName.ToString() == "Chart No")
    //        {

    //            if (txtSort.Text == e.CommandArgument + " ASC")
    //            {
    //                txtSort.Text = e.CommandArgument + " DESC";
    //            }
    //            else
    //            {
    //                txtSort.Text = e.CommandArgument + " ASC";
    //            }

    //        }
    //        else if (e.CommandName.ToString() == "Patient Name")
    //        {

    //            if (txtSort.Text == e.CommandArgument + " ASC")
    //            {
    //                txtSort.Text = e.CommandArgument + " DESC";
    //            }
    //            else
    //            {
    //                txtSort.Text = e.CommandArgument + " ASC";
    //            }

    //        }
    //        else if (e.CommandName.ToString() == "Reffering Office")
    //        {

    //            if (txtSort.Text == e.CommandArgument + " ASC")
    //            {
    //                txtSort.Text = e.CommandArgument + " DESC";
    //            }
    //            else
    //            {
    //                txtSort.Text = e.CommandArgument + " ASC";
    //            }

    //        }
    //        else if (e.CommandName.ToString() == "Insurance Company")
    //        {

    //            if (txtSort.Text == e.CommandArgument + " ASC")
    //            {
    //                txtSort.Text = e.CommandArgument + " DESC";
    //            }
    //            else
    //            {
    //                txtSort.Text = e.CommandArgument + " ASC";
    //            }
    //        }
    //        else if (e.CommandName.ToString() == "Insurance Claim No")
    //        {

    //            if (txtSort.Text == e.CommandArgument + " ASC")
    //            {
    //                txtSort.Text = e.CommandArgument + " DESC";
    //            }
    //            else
    //            {
    //                txtSort.Text = e.CommandArgument + " ASC";
    //            }
    //        }
    //        else if (e.CommandName.ToString() == "Speciality")
    //        {

    //            if (txtSort.Text == e.CommandArgument + " ASC")
    //            {
    //                txtSort.Text = e.CommandArgument + " DESC";
    //            }
    //            else
    //            {
    //                txtSort.Text = e.CommandArgument + " ASC";
    //            }
    //        }
    //        else if (e.CommandName.ToString() == "Case No")
    //        {

    //            if (txtSort.Text == e.CommandArgument + " ASC")
    //            {
    //                txtSort.Text = e.CommandArgument + " DESC";
    //            }
    //            else
    //            {
    //                txtSort.Text = e.CommandArgument + " ASC";
    //            }
    //        }
    //        else if (e.CommandName.ToString() == "Bill Amt")
    //        {

    //            if (txtSort.Text == e.CommandArgument + " ASC")
    //            {
    //                txtSort.Text = e.CommandArgument + " DESC";
    //            }
    //            else
    //            {
    //                txtSort.Text = e.CommandArgument + " ASC";
    //            }
    //        }

    //        dv.Sort = txtSort.Text;
    //        grdPacketing.DataSource = dv;
    //        grdExel.DataSource = dv;
    //        grdExel.DataBind();
    //        grdPacketing.DataBind();
    //      #endregion


    //    }
    //    catch (Exception ex)
    //    {

    //        throw;
    //    }

    //}

    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
        {
            if (Session["PacketDoc"] != null)
            {
                _ReqDocBO = new Bill_Sys_RequiredDocumentBO();
                _ReqDocEO = new REQUIREDDOCUMENT_EO();
                ArrayList objarr         = new ArrayList();
                string    szOpenFilePath = "";
                objarr = (ArrayList)(Session["PacketDoc"]);

                _ReqDocEO = _ReqDocBO.MergeDocument(objarr);


                //    if (_ReqDocEO.SZ_OPEN_FILE_PATH != "")
                //{
                szOpenFilePath = _ReqDocEO.SZ_OPEN_FILE_PATH;
                szOpenFilePath = ConfigurationSettings.AppSettings["DocumentManagerURL"].ToString() + szOpenFilePath;
                Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "window.open('" + szOpenFilePath.ToString() + "'); ", true);
                //}
            }
            System.Threading.Thread.Sleep(500);
        }
        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());
        }
    }
Пример #3
0
    //end

    protected void grdPacketing_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());
        }
        _ReqDocBO = new Bill_Sys_RequiredDocumentBO();
        _ReqDocEO = new REQUIREDDOCUMENT_EO();
        ArrayList objarr         = new ArrayList();
        string    szOpenFilePath = "";
        string    _CompanyName   = "";
        int       index          = 0;

        try
        {
            #region "Create Packet"
            if (e.CommandName.ToString() == "CreatePacket")
            {
                if (!txtPacketId.Text.Equals(""))
                {
                    index        = Convert.ToInt32(e.CommandArgument);
                    _CompanyName = Convert.ToString(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_NAME);
                    objarr.Add(grdPacketing.DataKeys[index][0].ToString()); //caseID
                    objarr.Add(grdPacketing.DataKeys[index][1].ToString()); //Bill Number
                    objarr.Add(txtCompanyID.Text);                          //companyID
                    objarr.Add(_CompanyName);                               //companyName
                    _ReqDocEO            = _ReqDocBO.CheckExists(objarr);
                    Session["PacketDoc"] = objarr;

                    if (_ReqDocEO.SZ_ERROR_MSG != "")
                    {
                        msgPatientExists.InnerHtml = _ReqDocEO.SZ_ERROR_MSG;
                        //Page.RegisterStartupScript("mm", "<script language='javascript'>openExistsPage();</script>");
                        ScriptManager.RegisterClientScriptBlock(this, GetType(), "mm", "openExistsPage();", true);
                    }
                    else
                    {
                        _ReqDocEO = _ReqDocBO.MergeDocument(objarr);
                        ///set paket bill status id to bill number --atul
                        Bill_Sys_RequiredDocumentBO objDocumentBO1 = new Bill_Sys_RequiredDocumentBO();
                        objDocumentBO1.Set_PacketId(txtCompanyID.Text, grdPacketing.DataKeys[index][1].ToString(), txtPacketId.Text, ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID);
                        BindGrid();
                    }

                    if (_ReqDocEO.SZ_OPEN_FILE_PATH != "")
                    {
                        szOpenFilePath = _ReqDocEO.SZ_OPEN_FILE_PATH;
                        szOpenFilePath = ConfigurationSettings.AppSettings["DocumentManagerURL"].ToString() + szOpenFilePath;
                        //Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "window.open('" + szOpenFilePath.ToString() + "'); ", true);
                        ScriptManager.RegisterClientScriptBlock(this, GetType(), "Msg", "window.open('" + szOpenFilePath.ToString() + "'); ", true);
                    }
                }
                else
                {
                    msgPatientExists.InnerHtml = "You don't have bill status for packeting,you can not create packet.Please enter bill status for packeting.";
                    Page.RegisterStartupScript("mm", "<script language='javascript'>openExistsPage();</script>");
                }
            }
            #endregion

            #region "Grid Sort"

            DataView dv;
            DataSet  ds = new DataSet();
            ds = (DataSet)Session["DataBind"];
            dv = ds.Tables[0].DefaultView;

            if (e.CommandName.ToString() == "Bill No")
            {
                if (txtSort.Text == e.CommandArgument + " ASC")
                {
                    txtSort.Text = e.CommandArgument + "  DESC";
                }
                else
                {
                    txtSort.Text = e.CommandArgument + " ASC";
                }
            }
            else if (e.CommandName.ToString() == "Bill Date")
            {
                if (txtSort.Text == e.CommandArgument + " ASC")
                {
                    txtSort.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSort.Text = e.CommandArgument + " ASC";
                }
            }
            else if (e.CommandName.ToString() == "Chart No")
            {
                if (txtSort.Text == e.CommandArgument + " ASC")
                {
                    txtSort.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSort.Text = e.CommandArgument + " ASC";
                }
            }
            else if (e.CommandName.ToString() == "Patient Name")
            {
                if (txtSort.Text == e.CommandArgument + " ASC")
                {
                    txtSort.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSort.Text = e.CommandArgument + " ASC";
                }
            }
            else if (e.CommandName.ToString() == "Reffering Office")
            {
                if (txtSort.Text == e.CommandArgument + " ASC")
                {
                    txtSort.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSort.Text = e.CommandArgument + " ASC";
                }
            }
            else if (e.CommandName.ToString() == "Insurance Company")
            {
                if (txtSort.Text == e.CommandArgument + " ASC")
                {
                    txtSort.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSort.Text = e.CommandArgument + " ASC";
                }
            }
            else if (e.CommandName.ToString() == "Insurance Claim No")
            {
                if (txtSort.Text == e.CommandArgument + " ASC")
                {
                    txtSort.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSort.Text = e.CommandArgument + " ASC";
                }
            }
            else if (e.CommandName.ToString() == "Speciality")
            {
                if (txtSort.Text == e.CommandArgument + " ASC")
                {
                    txtSort.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSort.Text = e.CommandArgument + " ASC";
                }
            }
            else if (e.CommandName.ToString() == "Case No")
            {
                if (txtSort.Text == e.CommandArgument + " ASC")
                {
                    txtSort.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSort.Text = e.CommandArgument + " ASC";
                }
            }
            else if (e.CommandName.ToString() == "Bill Amt")
            {
                if (txtSort.Text == e.CommandArgument + " ASC")
                {
                    txtSort.Text = e.CommandArgument + " DESC";
                }
                else
                {
                    txtSort.Text = e.CommandArgument + " ASC";
                }
            }

            dv.Sort = txtSort.Text;
            grdPacketing.DataSource = dv;
            grdExel.DataSource      = dv;
            grdExel.DataBind();
            grdPacketing.DataBind();
            #endregion

            if (e.CommandName.ToString() == "PLS")
            {
                index = Convert.ToInt32(e.CommandArgument);
                string divname = "div";

                divname = divname + grdPacketing.DataKeys[index][0].ToString();
                GridView   gv    = (GridView)grdPacketing.Rows[index].FindControl("GridView2");
                LinkButton plus  = (LinkButton)grdPacketing.Rows[index].FindControl("lnkP");
                LinkButton minus = (LinkButton)grdPacketing.Rows[index].FindControl("lnkM");

                _ReqDocBO = new Bill_Sys_RequiredDocumentBO();
                DataSet objds = new DataSet();
                objds = _ReqDocBO.GetBillReports(txtCompanyID.Text, txtFromDate.Text, txtToDate.Text, "PG000000000000000164");


                gv.DataSource = objds;
                gv.DataBind();
                ScriptManager.RegisterClientScriptBlock(this, GetType(), "mp", "ShowChildGrid('" + divname + "') ;", true);
                plus.Visible  = false;
                minus.Visible = true;
            }
            if (e.CommandName.ToString() == "MNS")
            {
                index = Convert.ToInt32(e.CommandArgument);
                string divname = "div";

                divname = divname + grdPacketing.DataKeys[index][0].ToString();
                LinkButton plus  = (LinkButton)grdPacketing.Rows[index].FindControl("lnkP");
                LinkButton minus = (LinkButton)grdPacketing.Rows[index].FindControl("lnkM");


                ScriptManager.RegisterClientScriptBlock(this, GetType(), "mm", "HideChildGrid('" + divname + "') ;", true);
                plus.Visible  = true;
                minus.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());
        }
    }
Пример #4
0
    protected void grdPacketing_RowCommand(object source, 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());
        }
        _ReqDocBO = new Bill_Sys_RequiredDocumentBO();
        _ReqDocEO = new REQUIREDDOCUMENT_EO();
        ArrayList objarr         = new ArrayList();
        string    szOpenFilePath = "";
        string    _CompanyName   = "";
        int       RowIndex;

        try
        {
            #region "Create Packet"
            if (e.CommandName.ToString() == "CreatePacket")
            {
                RowIndex = Convert.ToInt32(e.CommandArgument.ToString());

                if (!txtPacketId.Text.Equals(""))
                {
                    _CompanyName = Convert.ToString(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_NAME);
                    objarr.Add(grdPacketing.DataKeys[RowIndex][0].ToString()); //caseID
                    objarr.Add(grdPacketing.DataKeys[RowIndex][1].ToString()); //Bill Number
                    objarr.Add(txtCompanyID.Text);                             //companyID
                    objarr.Add(_CompanyName);                                  //companyName
                    _ReqDocEO            = _ReqDocBO.CheckExists(objarr);
                    Session["PacketDoc"] = objarr;
                    Session["BillNo"]    = grdPacketing.DataKeys[RowIndex][1].ToString();


                    if (_ReqDocEO.SZ_ERROR_MSG != "")
                    {
                        msgPatientExists.InnerHtml = _ReqDocEO.SZ_ERROR_MSG;
                        ScriptManager.RegisterClientScriptBlock(this, GetType(), "mm", "openExistsPage();", true);
                        //Page.RegisterStartupScript("mm", "<script language='javascript'>openExistsPage();</script>");
                    }
                    else
                    {
                        _ReqDocEO = _ReqDocBO.MergeDocument(objarr);
                        ///set paket bill status id to bill number --atul
                        Bill_Sys_RequiredDocumentBO objDocumentBO1 = new Bill_Sys_RequiredDocumentBO();
                        objDocumentBO1.Set_PacketId(txtCompanyID.Text, grdPacketing.DataKeys[RowIndex][1].ToString(), txtPacketId.Text, ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID);
                        BindGrid();
                    }

                    if (_ReqDocEO.SZ_OPEN_FILE_PATH != "")
                    {
                        szOpenFilePath = _ReqDocEO.SZ_OPEN_FILE_PATH;
                        szOpenFilePath = ApplicationSettings.GetParameterValue("DocumentManagerURL") + szOpenFilePath;
                        ScriptManager.RegisterClientScriptBlock(this, GetType(), "Msg", "window.open('" + szOpenFilePath.ToString() + "'); ", true);
                        //Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "window.open('" + szOpenFilePath.ToString() + "'); ", true);
                    }
                }
                else
                {
                    msgPatientExists.InnerHtml = "You don't have bill status for packeting,you can not create packet.Please enter bill status for packeting.";
                    Page.RegisterStartupScript("mm", "<script language='javascript'>openExistsPage();</script>");
                }
            }
            #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());
        }
    }