//To Check Status Of MST_PACKET_REQUEST Table
    protected void Timer1_Tick(object sender, System.EventArgs e)
    {
        DataSet objDSLT = new DataSet();
        Bill_Sys_RequiredDocumentBO _RequsredDocumentBO = new Bill_Sys_RequiredDocumentBO();
        string PhisicalPath = "";

        objDSLT = _RequsredDocumentBO.GetBillPacketRequestErrorStatus(Session["PacketId"].ToString());
        if (objDSLT.Tables[0].Rows[0][0].ToString() == "False" && objDSLT.Tables[0].Rows[0][1].ToString() == "False")
        {
        }//Process is Not Complete
        else if (objDSLT.Tables[0].Rows[0][0].ToString() == "True" && objDSLT.Tables[0].Rows[0][1].ToString() == "False")
        {
            PhisicalPath = ConfigurationSettings.AppSettings["DocumentManagerURL"].ToString() + objDSLT.Tables[0].Rows[0][3];
            ScriptManager.RegisterClientScriptBlock(this, GetType(), "Msg", "window.open('" + PhisicalPath.ToString() + "'); ", true);
            Timer1.Enabled  = false;
            Image1.Visible  = false;
            Label15.Visible = false;
        }//Process Is Complete Without Error
        else if (objDSLT.Tables[0].Rows[0][0].ToString() == "False" && objDSLT.Tables[0].Rows[0][1].ToString() == "True")
        {
            Span1.InnerHtml = objDSLT.Tables[0].Rows[0][2].ToString();
            ScriptManager.RegisterClientScriptBlock(this, GetType(), "mm", "openErrorMessage();", true);
            Timer1.Enabled  = false;
            Image1.Visible  = false;
            Label15.Visible = false;
        }//Process Is Complete With Error
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ddlDateValues.Attributes.Add("onChange", "javascript:SetDate();");
        Bill_Sys_RequiredDocumentBO objDocumentBO = new Bill_Sys_RequiredDocumentBO();

        PacketID = objDocumentBO.Get_PacketId(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
        if (!IsPostBack)
        {
            ddlDateValues.SelectedValue = "1";
            txtFromDate.Text            = DateTime.Now.ToString("MM/dd/yyyy");
            txtToDate.Text = DateTime.Now.ToString("MM/dd/yyyy");

            txtCompanyID.Text = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;

            txtPacketId.Text         = objDocumentBO.Get_PacketId(txtCompanyID.Text);
            extddlSpeciality.Flag_ID = txtCompanyID.Text;


            if (((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_CHART_NO == "0")
            {
                grdPacketing.Columns[3].Visible = false;
            }
            BindGrid();
        }
    }
Example #3
0
    protected void Page_Load(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
        {
            this.con.SourceGrid              = grdPacketing;
            this.txtSearchBox.SourceGrid     = grdPacketing;
            this.grdPacketing.Page           = this.Page;
            this.grdPacketing.PageNumberList = this.con;
            this.Title = "Bill Packet";


            ddlDateValues.Attributes.Add("onChange", "javascript:SetDate();");
            ddlServiceDateValues.Attributes.Add("onChange", "javascript:SetServiceDate();");

            Bill_Sys_RequiredDocumentBO objDocumentBO = new Bill_Sys_RequiredDocumentBO();
            PacketID = objDocumentBO.Get_PacketId(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
            if (!IsPostBack)
            {
                ddlDateValues.SelectedValue = "1";
                txtFromDate.Text            = DateTime.Now.ToString("MM/dd/yyyy");
                txtToDate.Text           = DateTime.Now.ToString("MM/dd/yyyy");
                extddlBillStatus.Flag_ID = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                txtCompanyID.Text        = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;

                txtPacketId.Text         = objDocumentBO.Get_PacketId(txtCompanyID.Text);
                extddlSpeciality.Flag_ID = txtCompanyID.Text;


                if (((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_CHART_NO == "0")
                {
                    grdPacketing.Columns[2].Visible = false;
                }
                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());
        }
    }
    private void BindGrid()
    {
        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();

        try
        {
            DataSet objds = new DataSet();
            if ((txtFromDate.Text != "" && txtToDate.Text != "") && (extddlSpeciality.Text == "NA" || extddlSpeciality.Text == ""))
            {
                objds = _ReqDocBO.GetBillReportsByDate(txtCompanyID.Text, txtFromDate.Text, txtToDate.Text);
            }
            else if ((txtFromDate.Text == "" && txtToDate.Text == "") && (extddlSpeciality.Text != "NA"))
            {
                objds = _ReqDocBO.GetBillReportsBySpecialty(txtCompanyID.Text, extddlSpeciality.Text);
            }
            else if ((txtFromDate.Text != "" && txtToDate.Text != "") && (extddlSpeciality.Text != "NA"))
            {
                objds = _ReqDocBO.GetBillReportsByDateAndSpecialty(txtCompanyID.Text, txtFromDate.Text, txtToDate.Text, extddlSpeciality.Text);
            }
            else
            {
                objds = _ReqDocBO.GetBillReports(txtCompanyID.Text, txtFromDate.Text, txtToDate.Text, extddlSpeciality.Text);
            }
            //objds.Tables[0].Columns[13].ColumnMapping= System.Data.MappingType.Hidden;
            grdPacketing.DataSource = objds;
            grdExel.DataSource      = objds;
            grdPacketing.DataBind();
            grdExel.DataBind();
            Session["DataBind"] = objds;
        }
        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());
        }
    }
Example #5
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());
        }
    }
    //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());
        }
    }
    protected void grdDocumentGrid_ItemCommand(object sender, DataGridCommandEventArgs 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.Equals("Show Doc"))
            {
                string str = e.CommandArgument.ToString();
                Bill_Sys_RequiredDocumentBO billSysRequiredDocumentBO = new Bill_Sys_RequiredDocumentBO();
                string str1          = ConfigurationManager.AppSettings["DocumentManagerURL"].ToString();
                string imageFullPath = billSysRequiredDocumentBO.GetImageFullPath(str);
                if (imageFullPath == null || !(imageFullPath != "") || !(imageFullPath != "There is no row at position 0."))
                {
                    ScriptManager.RegisterStartupScript(this, base.GetType(), "opendocument", "alert('Document is not available. Please upload documents');", true);
                }
                else
                {
                    string str2 = string.Concat(str1, billSysRequiredDocumentBO.GetImageFullPath(str));
                    ScriptManager.RegisterStartupScript(this, base.GetType(), "opendocument", string.Concat("window.open('", str2, "', 'opendocument','channelmode=no,location=yes,toolbar=yes,menubar=1,resizable=1,scrollbars=1, width=600,height=550'); "), true);
                }
            }
        }
        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());
        }
    }
    //Wrote Function To Call Function To Save Request For Packeting
    protected void btnSend_Click(object sender, EventArgs e)
    {
        Bill_Sys_RequiredDocumentBO _RequsredDocumentBO = new Bill_Sys_RequiredDocumentBO();
        ArrayList objArrayL = new ArrayList();

        for (int i = 0; i < grdPacketing.Rows.Count; i++)
        {
            CheckBox chk = (CheckBox)grdPacketing.Rows[i].Cells[0].FindControl("chkSelect");
            if (chk.Checked == true)
            {
                Bill_Sys_Bill_Packet_Request _BillPacketRequest = new Bill_Sys_Bill_Packet_Request();
                _BillPacketRequest.SZ_CASE_ID     = grdPacketing.DataKeys[i][0].ToString();
                _BillPacketRequest.SZ_BILL_NUMBER = grdPacketing.DataKeys[i][1].ToString();
                objArrayL.Add(_BillPacketRequest);
            }
        }
        _RequsredDocumentBO.GetBillPacketRequest(((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, objArrayL);
        System.Threading.Thread.Sleep(500);
    }
    //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());
        }
    }
    protected void btnFileUpload_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
        {
            this._saveOperation = new SaveOperation();
            this._editOperation = new EditOperation();
            this._nf3Template   = new Bill_Sys_NF3_Template();
            string physicalPath = this._nf3Template.getPhysicalPath();
            for (int i = 0; i < this.grdDocumentGrid.Items.Count; i++)
            {
                System.Web.UI.WebControls.FileUpload fileUpload = (System.Web.UI.WebControls.FileUpload) this.grdDocumentGrid.Items[i].FindControl("fileuploadDocument");
                string str = "";
                if (fileUpload.FileName != "")
                {
                    Bill_Sys_RequiredDocumentBO billSysRequiredDocumentBO = new Bill_Sys_RequiredDocumentBO();
                    string nodePath = billSysRequiredDocumentBO.GetNodePath(this.grdDocumentGrid.Items[i].Cells[this.COL_I_NODE_TYPE_ID].Text, this.txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    nodePath = nodePath.Replace("\\", "/");
                    str      = string.Concat(physicalPath, nodePath);
                    if (!Directory.Exists(str))
                    {
                        Directory.CreateDirectory(str);
                    }
                    fileUpload.SaveAs(string.Concat(str, "/", fileUpload.FileName));
                    ArrayList arrayLists = new ArrayList();
                    arrayLists.Add(this.txtCaseID.Text);
                    arrayLists.Add(this.grdDocumentGrid.Items[i].Cells[18].Text.Replace("/", ""));
                    arrayLists.Add(((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    arrayLists.Add(fileUpload.FileName);
                    arrayLists.Add(string.Concat(nodePath, "/"));
                    arrayLists.Add(((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME);
                    arrayLists.Add(this.grdDocumentGrid.Items[i].Cells[this.COL_I_NODE_TYPE_ID].Text.ToString());

                    string str1 = this._nf3Template.SaveDocumentData(arrayLists);
                    if (!(this.grdDocumentGrid.Items[i].Cells[1].Text != "") || !(this.grdDocumentGrid.Items[i].Cells[1].Text != "&nbsp;"))
                    {
                        this.txtDocID.Text = this.grdDocumentGrid.Items[i].Cells[this.COL_I_DOCUMENT_TYPE_ID].Text;
                        if (!(this.grdDocumentGrid.Items[i].Cells[8].Text != "") || !(this.grdDocumentGrid.Items[i].Cells[8].Text != "&nbsp;"))
                        {
                            this.txtAssignOn.Text = "";
                        }
                        else
                        {
                            this.txtAssignOn.Text = this.grdDocumentGrid.Items[i].Cells[8].Text;
                        }
                        ExtendedDropDownList.ExtendedDropDownList extendedDropDownList = (ExtendedDropDownList.ExtendedDropDownList) this.grdDocumentGrid.Items[i].FindControl("extddlAssignTo");
                        if (!(extendedDropDownList.Text != "NA") || !(extendedDropDownList.Text != ""))
                        {
                            this.txtAssignTo.Text = "";
                        }
                        else
                        {
                            this.txtAssignTo.Text = extendedDropDownList.Text;
                        }
                        TextBox textBox = (TextBox)this.grdDocumentGrid.Items[i].FindControl("txtNotes");
                        if (textBox.Text == "")
                        {
                            this.txtNotes.Text = "";
                        }
                        else
                        {
                            this.txtNotes.Text = textBox.Text;
                        }
                        this.txtRecieved.Text        = "1";
                        this.txtImageId.Text         = str1;
                        this._saveOperation.WebPage  = this.Page;
                        this._saveOperation.Xml_File = "CaseTypeDocumentXML.xml";
                        this._saveOperation.SaveMethod();
                    }
                    else
                    {
                        this.txtDocID.Text = this.grdDocumentGrid.Items[i].Cells[1].Text;
                        if (!(this.grdDocumentGrid.Items[i].Cells[8].Text != "") || !(this.grdDocumentGrid.Items[i].Cells[8].Text != "&nbsp;"))
                        {
                            this.txtAssignOn.Text = "";
                        }
                        else
                        {
                            this.txtAssignOn.Text = this.grdDocumentGrid.Items[i].Cells[8].Text;
                        }
                        ExtendedDropDownList.ExtendedDropDownList extendedDropDownList1 = (ExtendedDropDownList.ExtendedDropDownList) this.grdDocumentGrid.Items[i].FindControl("extddlAssignTo");
                        if (!(extendedDropDownList1.Text != "NA") || !(extendedDropDownList1.Text != ""))
                        {
                            this.txtAssignTo.Text = "";
                        }
                        else
                        {
                            this.txtAssignTo.Text = extendedDropDownList1.Text;
                        }
                        TextBox textBox1 = (TextBox)this.grdDocumentGrid.Items[i].FindControl("txtNotes");
                        if (textBox1.Text == "")
                        {
                            this.txtNotes.Text = "";
                        }
                        else
                        {
                            this.txtNotes.Text = textBox1.Text;
                        }
                        this.txtRecieved.Text             = "1";
                        this.txtImageId.Text              = str1;
                        this._editOperation.WebPage       = this.Page;
                        this._editOperation.Xml_File      = "CaseTypeDocumentXML.xml";
                        this._editOperation.Primary_Value = this.grdDocumentGrid.Items[i].Cells[1].Text;
                        this._editOperation.UpdateMethod();
                    }
                }
            }
            this.BindCaseDocumentGrid();
            this.usrMessage.PutMessage("Changes to the server were made successfully");
            this.usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_UserMessage);
            this.usrMessage.Show();
        }
        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());
        }
    }
Example #11
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());
        }
    }
Example #12
0
    protected void btnUploadFile_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());
        }
        Bill_Sys_NF3_Template objNF3Template = new Bill_Sys_NF3_Template();

        _bill_Sys_BillingCompanyDetails_BO = new Bill_Sys_BillingCompanyDetails_BO();
        string strLinkPath = "";

        try
        {
            if (!fuUploadReport.HasFile)
            {
                Page.RegisterStartupScript("ss", "<script language='javascript'> alert('please select file from upload Report !');showUploadFilePopup();</script>");
                return;
            }
            String szDefaultPath    = objNF3Template.getPhysicalPath();
            int    ImageId          = 0;
            String szDestinationDir = "";

            szDestinationDir = objNF3Template.GetCompanyName(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
            _obj             = new Bill_Sys_BillTransaction_BO();
            Bill_Sys_RequiredDocumentBO bo = new Bill_Sys_RequiredDocumentBO();
            String NodeId     = _obj.GetNodeIDMST_Nodes(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, "NFPAY");
            string szNodePath = bo.GetNodePath(NodeId, ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
            szNodePath  = szNodePath.Replace("\\", "/");
            strLinkPath = szNodePath + "/" + fuUploadReport.FileName;
            if (!Directory.Exists(szDefaultPath + szNodePath + "/"))
            {
                Directory.CreateDirectory(szDefaultPath + szNodePath + "/");
            }
            //if (!File.Exists(szDefaultPath + szDestinationDir + fuUploadReport.FileName))
            //{
            fuUploadReport.SaveAs(szDefaultPath + szNodePath + "/" + fuUploadReport.FileName);
            // Start : Save report under document manager.

            //String NodeId = _obj.GetNodeID(txtCompanyID.Text, ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID.ToString(), "NFPAY");
            ArrayList objAL = new ArrayList();

            objAL.Add(((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID);
            objAL.Add(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);

            objAL.Add(fuUploadReport.FileName);
            objAL.Add(szNodePath + "/");
            objAL.Add(NodeId);
            objAL.Add("");
            objNF3Template.UpdateDocMgr(objAL);
            // End :   Save report under document manager.
            //}
            // Code To get Image Id Of Saved Record
            ArrayList objALImage = new ArrayList();
            objALImage.Add(((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID);
            objALImage.Add("");
            objALImage.Add(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
            objALImage.Add(fuUploadReport.FileName);
            objALImage.Add(szNodePath + "/");
            objALImage.Add(((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME.ToString());
            objALImage.Add(NodeId);
            string ImgId = objNF3Template.SaveDocumentData(objALImage);
            // End of Code

            //Function To Save Entry In Txn_Bil_Payment_Images Table
            ArrayList objarrtxnbill = new ArrayList();
            objarrtxnbill.Add(txtBillNo.Text);
            objarrtxnbill.Add(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
            objarrtxnbill.Add(ImgId);
            objarrtxnbill.Add(((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID);
            objarrtxnbill.Add(Session["payment_No"].ToString());
            _bill_Sys_BillingCompanyDetails_BO.InsertBillPaymentImages(objarrtxnbill);
            //End Of  Function
            BindGrid();
            usrMessage.PutMessage("File Upload Successfully");
            usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_UserMessage);
            usrMessage.Show();
            //lblMsg.Text = "File Upload Successfully";
            //lblMsg.Visible = true;
        }
        //Page.RegisterStartupScript("ss", "<script language = 'javascript'>alert('Report received 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());
        }
    }