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());
        }
        objNF3Template = new Bill_Sys_NF3_Template();
        try
        {
            if (!fuUploadReport.HasFile)
            {
                Page.RegisterStartupScript("ss", "<script language='javascript'> alert('please select file from upload Report !');showUploadFilePopup();</script>");
                return;
            }
            string extension = "";
            string result    = "";
            extension = Path.GetExtension(fuUploadReport.FileName);
            result    = Path.GetFileNameWithoutExtension(fuUploadReport.FileName);
            string FileName      = result + "_" + DateTime.Now.ToString("MMddyyyysstt") + extension;
            String szDefaultPath = objNF3Template.getPhysicalPath();
            int    ImageId       = 0;
            foreach (DataGridItem drg in grdProcesureCode.Items)
            {
                CheckBox drp = (CheckBox)drg.Cells[0].FindControl("chkSelect");
                if (drp.Checked == true)
                {
                    String szDestinationDir = "";

                    if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true && ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID == (((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID))
                    {
                        szDestinationDir = objNF3Template.GetCompanyName(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    }
                    else
                    {
                        szDestinationDir = objNF3Template.GetCompanyName(((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID);
                    }
                    szDestinationDir = szDestinationDir + "/" + ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID + "/No Fault File/Medicals/" + drg.Cells[12].Text + "/";

                    strLinkPath = szDestinationDir + FileName;
                    if (!Directory.Exists(szDefaultPath + szDestinationDir))
                    {
                        Directory.CreateDirectory(szDefaultPath + szDestinationDir);
                    }
                    //if (!File.Exists(szDefaultPath + szDestinationDir + fuUploadReport.FileName))
                    //{
                    fuUploadReport.SaveAs(szDefaultPath + szDestinationDir + FileName);
                    // Start : Save report under document manager.

                    ArrayList objAL = new ArrayList();
                    if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true && ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID == (((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID))
                    {
                        objAL.Add(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    }
                    else
                    {
                        objAL.Add(((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID);
                    }

                    objAL.Add(((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID);
                    objAL.Add(FileName);
                    objAL.Add(szDestinationDir);
                    objAL.Add(((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME);
                    objAL.Add(drg.Cells[12].Text);
                    ImageId = objNF3Template.saveReportInDocumentManager(objAL);
                    // End :   Save report under document manager.
                    //}
                }
            }

            Bill_Sys_ReferalEvent _bill_Sys_ReferalEvent;
            ArrayList             arrOBJ;
            foreach (DataGridItem drg in grdProcesureCode.Items)
            {
                CheckBox drp = (CheckBox)drg.Cells[0].FindControl("chkSelect");
                if (drp.Checked == true)
                {
                    _bill_Sys_ProcedureCode_BO = new Bill_Sys_ProcedureCode_BO();
                    _bill_Sys_ProcedureCode_BO.UpdateReportProcedureCodeList(Convert.ToInt32(drg.Cells[1].Text), strLinkPath, ImageId);
                }
            }
            GetProcedureList(txtCaseID.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
            lblMsg.Text    = "Report Received 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());
        }
    }
    protected void btnUploadFile_Click(object sender, EventArgs e)
    {//Logging Start
        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();

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

            Bill_Sys_BillTransaction_BO _obj = new Bill_Sys_BillTransaction_BO();

            string NodeId = _obj.GetNodeIDMST_Nodes(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, Session["NODETYPE"].ToString());

            RequiredDocuments.Bill_Sys_RequiredDocumentBO bo = new RequiredDocuments.Bill_Sys_RequiredDocumentBO();
            string szNodePath = bo.GetNodePath(NodeId, ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
            szDestinationDir = szNodePath + "\\";
            szDestinationDir = szDestinationDir.Replace("\\", "/");
            strLinkPath      = szDestinationDir + fuUploadReport.FileName;
            if (!Directory.Exists(szDefaultPath + szDestinationDir))
            {
                Directory.CreateDirectory(szDefaultPath + szDestinationDir);
            }

            fuUploadReport.SaveAs(szDefaultPath + szDestinationDir + fuUploadReport.FileName);


            ArrayList objAL = new ArrayList();

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

            objAL.Add(fuUploadReport.FileName);
            objAL.Add(szDestinationDir);
            objAL.Add(((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME.ToString());
            objAL.Add(NodeId);


            string ImgId = objNF3Template.SaveDocumentData(objAL);

            if (!ImgId.Equals(""))
            {
                objNF3Template.InsertPaymentImage(Session["BillNo"].ToString(), txtCompanyID.Text, ImgId, ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID, Session["VERID"].ToString(), "VERIFICATIONPOPUP");
            }

            usrMessage1.PutMessage("File Upload Successfully!");
            usrMessage1.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_UserMessage);
            usrMessage1.Show();

            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());
            }
        }
    }
Esempio n. 3
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());
        }

        bool docSelected = true;

        try
        {
            bool chkDocCategory = true;


            if (extddlSpecialty.Visible && extddlSpecialty.Text == "NA")
            {
                ScriptManager.RegisterClientScriptBlock(this, GetType(), "ds42d", "alert('Please Select Specialty.');", true);

                return;
            }
            for (int i = 0; i < grdViewDocuments.Items.Count; i++)
            {
                if (((CheckBox)(grdViewDocuments.Items[i].Cells[0].FindControl("chkView"))).Checked == true)
                {
                    docSelected = true;
                    if (((DropDownList)(grdViewDocuments.Items[i].Cells[4].FindControl("ddlreport"))).SelectedValue == "8")
                    {
                        chkDocCategory = false;
                    }
                }
            }
            if (chkDocCategory == false)
            {
                ScriptManager.RegisterClientScriptBlock(this, GetType(), "ds42d", "alert('Please Select Document Category.');", true);

                return;
            }


            // ScriptManager.RegisterClientScriptBlock(this, GetType(), "ds4", "alert('Doctor assign successfully.');", true);
            if (docSelected == true)
            {
                objNF3Template = new Bill_Sys_NF3_Template();
                String szDefaultPath = objNF3Template.getPhysicalPath();
                int    ImageId       = 0;
                string PathNotFound  = "";
                foreach (DataGridItem drg in grdViewDocuments.Items)
                {
                    CheckBox     drp       = (CheckBox)drg.Cells[0].FindControl("chkView");
                    DropDownList drpReport = (DropDownList)drg.Cells[0].FindControl("ddlreport");
                    if (drp.Checked == true)
                    {
                        String szDestinationDir = "";

                        //if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
                        if (objSessionBillingCompany.BT_REFERRING_FACILITY == true)
                        {
                            //szDestinationDir = objNF3Template.GetCompanyName(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                            szDestinationDir = objNF3Template.GetCompanyName(objSessionBillingCompany.SZ_COMPANY_ID);
                        }
                        else
                        {
                            //szDestinationDir = objNF3Template.GetCompanyName(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                            szDestinationDir = objNF3Template.GetCompanyName(objSessionBillingCompany.SZ_COMPANY_ID);
                        }
                        // szDestinationDir = szDestinationDir + "/" + txtCaseId.Text + "/No Fault File/Medicals/" + txtSpecility.Text + "/";
                        if (drpReport.SelectedValue == "0")
                        {
                            szDestinationDir = szDestinationDir + "/" + txtCaseID.Text + "/No Fault File/Medicals/" + hdnmdltxtSpeciality.Text + "/";
                        }
                        else if (drpReport.SelectedValue == "1")
                        {
                            szDestinationDir = szDestinationDir + "/" + txtCaseID.Text + "/No Fault File/Medicals/" + hdnmdltxtSpeciality.Text + "/Referral/";
                        }

                        else if (drpReport.SelectedValue == "2")
                        {
                            szDestinationDir = szDestinationDir + "/" + txtCaseID.Text + "/No Fault File/AOB/";
                        }
                        else if (drpReport.SelectedValue == "3")
                        {
                            szDestinationDir = szDestinationDir + "/" + txtCaseID.Text + "/No Fault File/Comp Authorization/";
                        }
                        else if (drpReport.SelectedValue == "4")
                        {
                            szDestinationDir = szDestinationDir + "/" + txtCaseID.Text + "/No Fault File/HIPPA Consent/";
                        }
                        else if (drpReport.SelectedValue == "5")
                        {
                            szDestinationDir = szDestinationDir + "/" + txtCaseID.Text + "/No Fault File/Lien Form/";
                        }
                        else if (drpReport.SelectedValue == "6")
                        {
                            szDestinationDir = szDestinationDir + "/" + txtCaseID.Text + "/No Fault File/MISC/";
                        }
                        else if (drpReport.SelectedValue == "7")
                        {
                            szDestinationDir = szDestinationDir + "/" + txtCaseID.Text + "/No Fault File/MISC/";
                        }


                        strLinkPath = drg.Cells[2].Text + drg.Cells[3].Text;
                        if (!Directory.Exists(szDefaultPath + szDestinationDir))
                        {
                            Directory.CreateDirectory(szDefaultPath + szDestinationDir);
                        }



                        Bill_Sys_FileType_Settings _Bill_Sys_FileType_Settings = new Bill_Sys_FileType_Settings();
                        DataSet dscode = new DataSet();
                        dscode = _Bill_Sys_FileType_Settings.GET_IMAGE_ID(txtEventProcID.Text, drg.Cells[3].Text, txtCompanyID.Text);
                        if (dscode.Tables[0].Rows.Count > 0)
                        {
                            for (int i = 0; i < dscode.Tables[0].Rows.Count; i++)
                            {
                                ArrayList arr = new ArrayList();
                                arr.Add(dscode.Tables[0].Rows[i]["I_ID"].ToString());
                                arr.Add(txtEventProcID.Text);
                                _Bill_Sys_FileType_Settings.LhrDeleteDocuments(arr);
                            }

                            for (int i = 0; i < dscode.Tables[0].Rows.Count; i++)
                            {
                                // Bill_Sys_FileType_Settings _Bill_Sys_FileType_Settings = new Bill_Sys_FileType_Settings();
                                DataSet dsimageid = new DataSet();
                                dsimageid = _Bill_Sys_FileType_Settings.GET_IMAGE_ID_LHR(dscode.Tables[0].Rows[i]["I_IMAGE_ID"].ToString());
                                string sz_path = ConfigurationManager.AppSettings["BASEPATH"].ToString() + dscode.Tables[0].Rows[0]["SZ_FILE_PATH"].ToString() + dscode.Tables[0].Rows[0]["SZ_FILE_NAME"].ToString();
                                string szFinal = sz_path.Replace("/", "\\");
                                if (dsimageid.Tables[0].Rows.Count > 0)
                                {
                                }
                                else
                                {
                                    ArrayList arr = new ArrayList();
                                    arr.Add(dscode.Tables[0].Rows[i]["I_IMAGE_ID"].ToString());
                                    arr.Add(drg.Cells[3].Text);
                                    _Bill_Sys_FileType_Settings.Deletelhrdocuments(arr);
                                    string FinalPath = "";
                                    //szDefaultPath;
                                    try
                                    {
                                        System.IO.File.Move(@szFinal, @szFinal + ".deleted");
                                    }
                                    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);
                                    }
                                }
                            }
                        }


                        if (File.Exists(szDefaultPath + strLinkPath))
                        {
                            File.Copy(szDefaultPath + strLinkPath, szDefaultPath + szDestinationDir + drg.Cells[3].Text, true);
                            ArrayList objAL = new ArrayList();
                            //if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
                            if (objSessionBillingCompany.BT_REFERRING_FACILITY == true)
                            {
                                objAL.Add(objSessionBillingCompany.SZ_COMPANY_ID);
                            }
                            else
                            {
                                //objAL.Add(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                                objAL.Add(objSessionBillingCompany.SZ_COMPANY_ID);
                            }

                            objAL.Add(txtCaseID.Text);
                            objAL.Add(drg.Cells[3].Text);
                            objAL.Add(szDestinationDir);
                            //objAL.Add(((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME);
                            objAL.Add(objSessionUser.SZ_USER_NAME);
                            objAL.Add(hdnmdltxtSpeciality.Text);
                            // ImageId = objNF3Template.saveReportInDocumentManager(objAL);

                            if (drpReport.SelectedValue == "0")
                            {
                                ImageId = objNF3Template.saveReportInDocumentManager(objAL);
                            }
                            else if (drpReport.SelectedValue == "1")
                            {
                                ImageId = objNF3Template.saveReportInDocumentManager_Referral(objAL);
                            }
                            else if (drpReport.SelectedValue == "2")
                            {
                                ImageId = objNF3Template.saveReportInDocumentManager_AOB(objAL);
                            }
                            else if (drpReport.SelectedValue == "3")
                            {
                                ImageId = objNF3Template.saveReportInDocumentManager_NFCA(objAL);
                            }
                            else if (drpReport.SelectedValue == "4")
                            {
                                ImageId = objNF3Template.saveReportInDocumentManager_NFHC(objAL);
                            }
                            else if (drpReport.SelectedValue == "5")
                            {
                                ImageId = objNF3Template.saveReportInDocumentManager_NFLF(objAL);
                            }
                            else if (drpReport.SelectedValue == "6")
                            {
                                ImageId = saveReportInDocumentManager_NFMIS(objAL);
                            }
                            else if (drpReport.SelectedValue == "7")
                            {
                                if (File.Exists(szDefaultPath + strLinkPath))
                                {
                                    string szImgID           = "";
                                    string szDestinationDir2 = "";
                                    szDestinationDir2 = drg.Cells[2].Text.Replace("/", "\\");
                                    szImgID           = objNF3Template.GetImageID(drg.Cells[3].Text, drg.Cells[2].Text, szDestinationDir2);
                                    ImageId           = Convert.ToInt32(szImgID);
                                }
                            }

                            if ((ImageId.ToString().Trim() != "0") && (ImageId.ToString().Trim() != ""))
                            {
                                _bill_Sys_ProcedureCode_BO = new Bill_Sys_ProcedureCode_BO();
                                _bill_Sys_ProcedureCode_BO.assignLHRDocument(objAL, ImageId, drpReport.SelectedValue, Convert.ToInt32(txtEventProcID.Text));
                            }

                            // End :   Save report under document manager.
                            //}
                            if (drpReport.SelectedValue == "0")
                            {
                                Bill_Sys_ReferalEvent _bill_Sys_ReferalEvent;
                                ArrayList             arrOBJ;

                                _bill_Sys_ProcedureCode_BO = new Bill_Sys_ProcedureCode_BO();
                                _bill_Sys_ProcedureCode_BO.UpdateReportProcedureCodeList(Convert.ToInt32(txtEventProcID.Text), strLinkPath, ImageId);
                            }
                            //ScriptManager.RegisterClientScriptBlock(this, GetType(), "ds7", "alert('Document Received  successfully.');", true);
                        }
                        else
                        {
                            if (PathNotFound == "")
                            {
                                PathNotFound = szDefaultPath + strLinkPath + ",\n";
                            }
                            else
                            {
                                PathNotFound = PathNotFound + szDefaultPath + strLinkPath + ",\n";
                            }
                        }
                    }
                }
                if (PathNotFound != "")
                {
                    usrMessage.PutMessage("These file are not available.");
                    usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_ErrorMessage);
                    usrMessage.Show();

                    // ScriptManager.RegisterClientScriptBlock(this, GetType(), "ds10", "alert('These file are not available');", true);
                    return;
                }
            }
            string notAdded = "";
            if (notAdded == "")
            {
                usrMessage.PutMessage(" Document Saved  successfully.");
            }
            usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_UserMessage);
            usrMessage.Show();
            //ScriptManager.RegisterClientScriptBlock(this, GetType(), "ds28", "alert('Saved  successfully.');", 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());
        }
    }
Esempio n. 4
0
    protected void btnDelete_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 = new CaseDetailsBO();
        Bill_Sys_NF3_Template objNF3Template = new Bill_Sys_NF3_Template();

        try
        {
            bool flagdelete = false;
            foreach (DataGridItem grdItem in grdCaseMaster.Items)
            {
                CheckBox chkDelete = (CheckBox)grdItem.FindControl("chkHardDelete");
                if (chkDelete.Checked)
                {
                    LinkButton lnk = (LinkButton)grdItem.FindControl("lnkSelectCase");
                    _caseDetailsBO.HardDelete(lnk.CommandArgument.ToString(), txtCompanyID.Text);

                    flagdelete = true;
                    String szDefaultPath    = objNF3Template.getPhysicalPath();
                    String szDestinationDir = "";

                    if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true && ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID == (((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID))
                    {
                        szDestinationDir = objNF3Template.GetCompanyName(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    }
                    else
                    {
                        szDestinationDir = objNF3Template.GetCompanyName(grdItem.Cells[31].Text);
                    }
                    szDestinationDir = szDestinationDir + "/" + lnk.CommandArgument.ToString();

                    if (Directory.Exists(szDefaultPath + szDestinationDir))
                    {
                        string[] files = Directory.GetFiles(szDefaultPath + szDestinationDir, "*.*", SearchOption.AllDirectories);
                        foreach (string file in files)
                        {
                            System.IO.File.Delete(file);
                        }

                        Directory.Delete(szDefaultPath + szDestinationDir, true);
                    }
                    this._DAO_NOTES_EO = new DAO_NOTES_EO();
                    this._DAO_NOTES_EO.SZ_MESSAGE_TITLE = "CASE_DELETED";
                    this._DAO_NOTES_EO.SZ_ACTIVITY_DESC = "Case Id " + lnk.CommandArgument.ToString() + "deleted.";
                    this._DAO_NOTES_BO               = new DAO_NOTES_BO();
                    this._DAO_NOTES_EO.SZ_USER_ID    = (((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID);
                    this._DAO_NOTES_EO.SZ_CASE_ID    = (((Bill_Sys_CaseObject)this.Session["CASE_OBJECT"]).SZ_CASE_ID);
                    this._DAO_NOTES_EO.SZ_COMPANY_ID = this.txtCompanyID.Text;
                    this._DAO_NOTES_BO.SaveActivityNotes(this._DAO_NOTES_EO);
                }
            }

            if (flagdelete == true)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "mm", "<script language='javascript'>alert('Case deleted successfully');</script>");
            }
            BindGrid();
        }
        catch (Exception ex)
        {
            log.Debug("Shared_MasterPage. Method - Page_Load : " + ex.Message.ToString());
            log.Debug("Shared_MasterPage. Method - Page_Load : " + ex.StackTrace.ToString());
            log.Debug("Shared_MasterPage. Method - Page_Load : " + ex.InnerException.Message.ToString());
            log.Debug("Shared_MasterPage. Method - Page_Load : " + ex.InnerException.StackTrace.ToString());
            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());
        }
    }
    public ArrayList FillPDFValue(SpecialityPDFFill p_objSepcialityPDF)
    {
        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());
        }
        string sz_CompanyID    = "";
        string sz_ComapanyName = "";

        if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true && ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID != ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID)
        {
            sz_CompanyID = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID;
            Bill_Sys_NF3_Template obj = new Bill_Sys_NF3_Template();
            sz_ComapanyName = obj.GetCompanyName(sz_CompanyID);
        }
        else
        {
            sz_CompanyID    = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            sz_ComapanyName = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_NAME;
        }

        string sz_CaseID = p_objSepcialityPDF.sz_Session_Id;

        PDFValueReplacement.PDFValueReplacement objValueReplacement = new PDFValueReplacement.PDFValueReplacement();
        string pdffilepath;
        string strGenFileName   = "";
        String szOpenFilePath   = "";
        String szDestinationDir = "";

        try
        {
            Bill_Sys_NF3_Template objNF3Template = new Bill_Sys_NF3_Template();
            string xmlpath = ConfigurationManager.AppSettings[p_objSepcialityPDF.sz_XMLPath].ToString();
            string pdfpath = ConfigurationManager.AppSettings[p_objSepcialityPDF.sz_PDFPath].ToString();

            String szDefaultPath = p_objSepcialityPDF.sz_CompanyName + "/" + sz_CaseID + "/Packet Document/";
            szDestinationDir = p_objSepcialityPDF.sz_CompanyName + "/" + sz_CaseID + "/MRI/";

            strGenFileName = objValueReplacement.ReplacePDFvalues(xmlpath, pdfpath, txtId.Text, p_objSepcialityPDF.sz_CompanyName, sz_CaseID);

            if (File.Exists(objNF3Template.getPhysicalPath() + szDefaultPath + strGenFileName))
            {
                if (!Directory.Exists(objNF3Template.getPhysicalPath() + szDestinationDir))
                {
                    Directory.CreateDirectory(objNF3Template.getPhysicalPath() + szDestinationDir);
                }
                File.Copy(objNF3Template.getPhysicalPath() + szDefaultPath + strGenFileName, objNF3Template.getPhysicalPath() + szDestinationDir + strGenFileName);
            }

            Bill_Sys_CheckoutBO objCheckoutBO = new Bill_Sys_CheckoutBO();
            ArrayList           objAL         = new ArrayList();
            objAL.Add(sz_CaseID);
            objAL.Add(strGenFileName);
            objAL.Add(szDestinationDir);
            objAL.Add(p_objSepcialityPDF.SZ_USER_NAME);
            objAL.Add(sz_CompanyID);
            objAL.Add(txtId.Text);


            szOpenFilePath = ConfigurationSettings.AppSettings["DocumentManagerURL"].ToString() + szDestinationDir + strGenFileName;
            ArrayList al = new ArrayList();
            al.Add(strGenFileName);
            al.Add(szOpenFilePath);
            al.Add(szDestinationDir);
            return(al);
        }
        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);
        }

        return(null);

        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (rdoPregnant.SelectedValue.ToString().Equals(""))
        {
            txtPregnant.Text = "-1";
        }
        else
        {
            txtPregnant.Text = rdoPregnant.SelectedValue;
        }

        if (rdoIvContrast.SelectedValue.ToString().Equals(""))
        {
            txtIvContrast.Text = "-1";
        }
        else
        {
            txtIvContrast.Text = rdoIvContrast.SelectedValue;
        }



        _saveOperation          = new SaveOperation();
        _saveOperation.WebPage  = this.Page;
        _saveOperation.Xml_File = "Test_Facility_Intake.xml";
        _saveOperation.SaveMethod();
        Bill_Sys_CheckoutBO _objCheckoutBO = new Bill_Sys_CheckoutBO();

        if (_objCheckoutBO.ChekIntakeMriPath(Convert.ToInt32(txtId.Text)))
        {
            if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true && ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID != ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID)
            {
                sz_CompanyID = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID;
                Bill_Sys_NF3_Template obj1 = new Bill_Sys_NF3_Template();
                sz_ComapanyName = obj1.GetCompanyName(sz_CompanyID);
            }
            else
            {
                sz_CompanyID    = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                sz_ComapanyName = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_NAME;
            }

            SpecialityPDFFill spf = new SpecialityPDFFill();
            ArrayList         obj = new ArrayList();
            spf.sz_EventID     = "";
            spf.sz_CompanyID   = sz_CompanyID;
            spf.sz_CompanyName = sz_ComapanyName;

            spf.sz_XMLPath = "MRI_INTAKE_XML_Path";
            spf.sz_PDFPath = "MRI_INTAKE_PDF_Path";

            spf.sz_Session_Id      = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
            spf.SZ_USER_NAME       = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
            spf.SZ_SPECIALITY_NAME = "MRI";
            obj = FillPDFValue(spf);
            //Response.Redirect(obj[1].ToString(), false);
            //Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "window.open('" + obj[1] + "'); ", true);
            ////Response.Write("<script>window.open('" + obj[1] + "')</script>");
            //Response.Redirect(obj[1].ToString(), false);
            //Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "window.open('" + obj[1] + "'); ", true);
            //Response.Write("<script>window.open('" + obj[1] + "')</script>");

            Response.Write("<script>window.open('" + obj[1] + "')</script>");
            spf.sz_Session_Id      = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
            spf.sz_CompanyID       = sz_CompanyID;
            spf.sz_EventID         = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
            spf.SZ_PT_FILE_NAME    = obj[0].ToString();
            spf.SZ_PT_FILE_PATH    = obj[2].ToString();
            spf.SZ_SPECIALITY_CODE = "ININT";
            spf.SZ_SPECIALITY_NAME = "Intake Sheet";
            spf.SZ_USER_NAME       = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
            spf.savePDFForminDocMang(spf);
        }
        else
        {
            // Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "window.open('Bill_Sys_AC_Accu_Initial_Doctor_sign.aspx','Sign','toolbar=no,directories=no,menubar=no,scrollbars=no,status=no,resizable=no,width=700,height=575'); ", true);
            Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "window.open('MRISignature.aspx','Sign','toolbar=no,directories=no,menubar=no,scrollbars=yes,status=no,resizable=yes,width=1400,height=750'); ", true);
        }

        //Response.Redirect("Bill_Sys_Test_Facility_Intake_Signature.aspx");
    }
Esempio n. 7
0
    protected void btnUploadFile_Click(object sender, EventArgs e)
    {//Logging Start
        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();
        Boolean flag       = false;
        Boolean updateflag = false;
        string  ImgId      = "";

        try
        {
            if (rdbpombills.SelectedValue == "0")
            {
                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);
                DataSet ds = objNF3Template.GetPomCaseId(Session["UPLOADPOMID"].ToString(), ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);

                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    String sz_Case_Id = ds.Tables[0].Rows[i]["SZ_CASE_ID"].ToString();
                    string szSpecID   = ds.Tables[0].Rows[i]["sz_speciality_id"].ToString();

                    _obj = new Bill_Sys_BillTransaction_BO();
                    string szNodeType = _obj.GetNodeType(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, szSpecID, sz_Case_Id);
                    string NodeId     = _obj.GetNodeIDMST_Nodes(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, szNodeType);
                    RequiredDocuments.Bill_Sys_RequiredDocumentBO bo = new RequiredDocuments.Bill_Sys_RequiredDocumentBO();
                    //   string szNodePath = bo.GetNodePath(NodeId, sz_Case_Id, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    szDestinationDir = "";
                    szDestinationDir = objNF3Template.GetCompanyName(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    szDestinationDir = szDestinationDir + "\\POM receive\\" + Session["UPLOADPOMID"].ToString() + "\\";
                    szDestinationDir = szDestinationDir.Replace("\\", "/");
                    strLinkPath      = szDestinationDir + fuUploadReport.FileName;
                    if (!updateflag)
                    {
                        if (!Directory.Exists(szDefaultPath + szDestinationDir))
                        {
                            Directory.CreateDirectory(szDefaultPath + szDestinationDir);
                        }
                        fuUploadReport.SaveAs(szDefaultPath + szDestinationDir + fuUploadReport.FileName);
                        updateflag = true;
                    }

                    // Start : Save report under document manager.

                    ArrayList objAL = new ArrayList();

                    objAL.Add(sz_Case_Id);
                    objAL.Add("");
                    objAL.Add(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);

                    objAL.Add(fuUploadReport.FileName);
                    objAL.Add(szDestinationDir);
                    objAL.Add(((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME.ToString());
                    objAL.Add(NodeId);

                    ImgId = objNF3Template.SaveDocumentData(objAL);


                    // End :   Save report under document manager.
                    if (!flag)
                    {
                        if (Session["POMSTATUS"].ToString().Equals("1"))
                        {
                            objNF3Template.UpdateReportPomPath(fuUploadReport.FileName, szDestinationDir, ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID, Session["UPLOADPOMID"].ToString(), ImgId, "VPOMR");
                        }
                        else
                        {
                            objNF3Template.UpdateReportPomPath(fuUploadReport.FileName, szDestinationDir, ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID, Session["UPLOADPOMID"].ToString(), ImgId, "POM");
                        }
                        flag = true;
                    }
                }

                // End :   Save report under document manager.


                usrMessage.PutMessage("File Upload Successfully");
                usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_UserMessage);
                usrMessage.Show();

                //fillControl();

                fillControl();
                this.con.SourceGrid              = grdPomReport;
                this.txtSearchBox.SourceGrid     = grdPomReport;
                this.grdPomReport.Page           = this.Page;
                this.grdPomReport.PageNumberList = this.con;
                grdPomReport.XGridKey            = "Report_pom";
                grdPomReport.XGridBindSearch();
            }
            else
            {
                _objReport = new Bill_Sys_ReportBO();
                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 = "";
                DataSet dspomother       = new DataSet();
                //  szDestinationDir = objNF3Template.GetCompanyName(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                dspomother = _objReport.GetPomotherCaseId(Session["UPLOADPOMID"].ToString(), ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);

                for (int i = 0; i < dspomother.Tables[0].Rows.Count; i++)
                {
                    String sz_Case_Id = dspomother.Tables[0].Rows[i]["SZ_CASE_ID"].ToString();
                    string szSpecID   = dspomother.Tables[0].Rows[i]["sz_speciality_id"].ToString();

                    _obj = new Bill_Sys_BillTransaction_BO();
                    string szNodeType = _obj.GetNodeType(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, szSpecID, sz_Case_Id);
                    string NodeId     = _obj.GetNodeIDMST_Nodes(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, szNodeType);
                    RequiredDocuments.Bill_Sys_RequiredDocumentBO bo = new RequiredDocuments.Bill_Sys_RequiredDocumentBO();
                    //   string szNodePath = bo.GetNodePath(NodeId, sz_Case_Id, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    szDestinationDir = "";
                    szDestinationDir = objNF3Template.GetCompanyName(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    szDestinationDir = szDestinationDir + "\\POM receive\\" + Session["UPLOADPOMID"].ToString() + "\\";
                    szDestinationDir = szDestinationDir.Replace("\\", "/");
                    strLinkPath      = szDestinationDir + fuUploadReport.FileName;
                    if (!updateflag)
                    {
                        if (!Directory.Exists(szDefaultPath + szDestinationDir))
                        {
                            Directory.CreateDirectory(szDefaultPath + szDestinationDir);
                        }
                        fuUploadReport.SaveAs(szDefaultPath + szDestinationDir + fuUploadReport.FileName);
                        updateflag = true;
                    }

                    // Start : Save report under document manager.

                    ArrayList objAL = new ArrayList();

                    objAL.Add(sz_Case_Id);
                    objAL.Add("");
                    objAL.Add(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);

                    objAL.Add(fuUploadReport.FileName);
                    objAL.Add(szDestinationDir);
                    objAL.Add(((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME.ToString());
                    objAL.Add(NodeId);

                    ImgId = objNF3Template.SaveDocumentData(objAL);


                    // End :   Save report under document manager.
                    if (!flag)
                    {
                        if (Session["POMSTATUS"].ToString().Equals("1"))
                        {
                            _objReport.UpdateReportPomOtherPath(fuUploadReport.FileName, szDestinationDir, ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID, Session["UPLOADPOMID"].ToString(), ImgId, "VPOMR");
                        }
                        else
                        {
                            _objReport.UpdateReportPomOtherPath(fuUploadReport.FileName, szDestinationDir, ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID, Session["UPLOADPOMID"].ToString(), ImgId, "POM");
                        }
                        flag = true;
                    }
                }

                // End :   Save report under document manager.


                usrMessage.PutMessage("File Upload Successfully");
                usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_UserMessage);
                usrMessage.Show();

                fillControl();
                this.con.SourceGrid              = grdPomReport;
                this.txtSearchBox.SourceGrid     = grdPomReport;
                this.grdPomReport.Page           = this.Page;
                this.grdPomReport.PageNumberList = this.con;
                grdPomReport.XGridKey            = "Report_Pom_Other";
                grdPomReport.XGridBindSearch();
            }
        }


        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 btnSubmit_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());
        }
        _saveOperation = new SaveOperation();
        try
        {
            CheckRadio();


            _saveOperation.WebPage  = this.Page;
            _saveOperation.Xml_File = "MRI_Questionary.xml";
            _saveOperation.SaveMethod();


            Bill_Sys_CheckoutBO _objCheckoutBO = new Bill_Sys_CheckoutBO();
            if (_objCheckoutBO.ChekMRIQuestionaire(Convert.ToInt32(TXT_EVENT_ID.Text)))
            {
                if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true && ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID != ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID)
                {
                    sz_CompanyID = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID;
                    Bill_Sys_NF3_Template obj1 = new Bill_Sys_NF3_Template();
                    sz_ComapanyName = obj1.GetCompanyName(sz_CompanyID);
                }
                else
                {
                    sz_CompanyID    = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                    sz_ComapanyName = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_NAME;
                }

                SpecialityPDFFill spf = new SpecialityPDFFill();
                ArrayList         obj = new ArrayList();
                spf.sz_EventID     = "";
                spf.sz_CompanyID   = sz_CompanyID;
                spf.sz_CompanyName = sz_ComapanyName;

                spf.sz_XMLPath = "MRI_QUESTIONAIRE_XML_Path";
                spf.sz_PDFPath = "MRI_QUESTIONAIRE_PDF_Path";

                spf.sz_Session_Id      = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                spf.SZ_USER_NAME       = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                spf.SZ_SPECIALITY_NAME = "MRI";
                obj = FillPDFValue(spf);
                //Response.Redirect(obj[1].ToString(), false);
                //Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "window.open('" + obj[1] + "'); ", true);
                Response.Write("<script>window.open('" + obj[1] + "','pdf','toolbar=no,directories=no,menubar=no,scrollbars=no,status=no,resizable=no,width=700,height=400')</script>");

                spf.sz_Session_Id      = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                spf.sz_CompanyID       = sz_CompanyID;
                spf.sz_EventID         = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                spf.SZ_PT_FILE_NAME    = obj[0].ToString();
                spf.SZ_PT_FILE_PATH    = obj[2].ToString();
                spf.SZ_SPECIALITY_CODE = "ININT";
                spf.SZ_SPECIALITY_NAME = "Intake Sheet";
                spf.SZ_USER_NAME       = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                spf.savePDFForminDocMang(spf);
            }
            else
            {
                // Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "window.open('Bill_Sys_AC_Accu_Initial_Doctor_sign.aspx','Sign','toolbar=no,directories=no,menubar=no,scrollbars=no,status=no,resizable=no,width=700,height=575'); ", true);
                Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "window.open('Bill_Sys_MRI_Signature.aspx','Sign','toolbar=no,directories=no,menubar=no,scrollbars=no,status=no,resizable=no,width=700,height=400'); ", true);
            }



            //ClearControl();
            //BindGrid();
            lblMsg.Visible = true;
            //lblMsg.Text = "Case Status Saved Successfully ...!";
            lblMsg.Text = "MRI-QUESTIONARY report is saved successfully....";
            //Response.Write("<script>window.opener.location.replace('Bill_Sys_CaseMaster.aspx')</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());
        }
    }
    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());
        }
        _objcheckOut = new Bill_Sys_CheckoutBO();
        DigitalSign signobj = new DigitalSign();

        SIGPLUSLib.SigPlus sigObj_Patient1 = new SIGPLUSLib.SigPlus();
        objNF3Template = new Bill_Sys_NF3_Template();
        // DataSet dsObj = _objcheckOut.PatientName(Session["IMEventID"].ToString());
        //Session["ChkCaseID"] = ((SpecialityPDFDAO)Session["SPECIALITY_PDF_OBJECT"]).CaseID;

        if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true && ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID != ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID)
        {
            sz_CompanyID = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID;
            Bill_Sys_NF3_Template obj1 = new Bill_Sys_NF3_Template();
            sz_CompanyName = obj1.GetCompanyName(sz_CompanyID);
        }
        else
        {
            sz_CompanyID   = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            sz_CompanyName = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_NAME;
        }



        sz_EventID = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
        try
        {
            String szDefaultPath = (objNF3Template.getPhysicalPath()) + sz_CompanyName + "/" + ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID + "/Signs/";
            //Added By-Sunil
            string SaveSignPathlogical = sz_CompanyName + "/" + ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID + "/Signs/";
            //end
            if (!Directory.Exists(szDefaultPath))
            {
                Directory.CreateDirectory(szDefaultPath);
            }
            szDefaultPath = szDefaultPath + sz_EventID;
            //Added By-Sunil
            SaveSignPathlogical = SaveSignPathlogical + sz_EventID;
            //end
            DoctorImagePath        = szDefaultPath + "_DoctorSign.jpg";
            DoctorImagePathlogical = SaveSignPathlogical + "_DoctorSign.jpg";
            string sz_Patient_path                      = szDefaultPath + "_Patient.jpg";
            string sz_Patient_path_logical              = SaveSignPathlogical + "_Patient.jpg";
            string sz_Attorney_Path                     = szDefaultPath + "_Attoreny.jpg";
            string sz_Attorney_Path_logical             = SaveSignPathlogical + "_Attoreny.jpg";
            string sz_ParentOfMinorPatient_path         = szDefaultPath + "_ParentOfMinorPatient.jpg";
            string sz_ParentOfMinorPatient_path_logical = SaveSignPathlogical + "_ParentOfMinorPatient.jpg";
            string sz_Gardian_Path                      = szDefaultPath + "_Gardian.jpg";
            string sz_Gardian_Path_logical              = SaveSignPathlogical + "_Gardian.jpg";
            signobj.SignSave(Request.Form["hiddenPatient"], sz_Patient_path);
            signobj.SignSave(Request.Form["hidden"], sz_Attorney_Path);
            string RepresebtiveSign  = Request.Form["hiddenParentOfMinorPatient"].ToString();
            string RepresebtiveSign1 = Request.Form["hiddenGardian"].ToString();

            if (!RepresebtiveSign.Equals("FFFFFFFFF58841040500000004000000CF35D06FEE8E6C74CF35D06FEE8E6C74CF35D06FEE8E6C74CF35D06FEE8E6C74CF35D06FEE8E6C74"))
            {
                signobj.SignSave(Request.Form["hiddenParentOfMinorPatient"], sz_ParentOfMinorPatient_path);
            }
            else
            {
                signobj.SignSave(Request.Form["hiddenPatient"], sz_ParentOfMinorPatient_path);
            }


            if (!RepresebtiveSign1.Equals("FFFFFFFFF58841040500000004000000CF35D06FEE8E6C74CF35D06FEE8E6C74CF35D06FEE8E6C74CF35D06FEE8E6C74CF35D06FEE8E6C74"))
            {
                signobj.SignSave(Request.Form["hiddenGardian"], sz_Gardian_Path);
            }

            #region " "Barcode functionality
            DataSet dset = new DataSet();
            dset = _objcheckOut.GetNodeID(sz_CompanyID, sz_EventID);
            string          sz_NodeId                   = dset.Tables[0].Rows[0][1].ToString();
            string          sz_CaseId                   = dset.Tables[0].Rows[0][0].ToString();
            string          barcodeValue                = sz_CompanyID + "@" + sz_CaseId + "@" + sz_NodeId;
            String          sz_BarcodeImagePath         = (objNF3Template.getPhysicalPath()) + sz_CompanyName + "/" + ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID + "/Signs/";
            string          sz_BarcodeImagePath_logical = sz_CompanyName + "/" + ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID + "/Signs/";
            SpecialityPDFBO pdfbo = new SpecialityPDFBO();
            CaseBarcodePath             = pdfbo.GetBarCodePath(sz_CompanyID, sz_CaseId, sz_NodeId, sz_BarcodeImagePath);
            sz_BarcodeImagePath_logical = sz_BarcodeImagePath_logical + "BarcodeImg.jpg";
            #endregion
            //_objcheckOut.TestIntakeMri(sz_EventID, CaseBarcodePath, sz_Patient_path, sz_Attorney_Path, sz_ParentOfMinorPatient_path, sz_Gardian_Path);
            _objcheckOut.TestIntakeMri(sz_EventID, sz_BarcodeImagePath_logical, sz_Patient_path_logical, sz_Attorney_Path_logical, sz_ParentOfMinorPatient_path_logical, sz_Gardian_Path_logical);
            SpecialityPDFFill spf = new SpecialityPDFFill();
            ArrayList         obj = new ArrayList();
            spf.sz_EventID     = "";
            spf.sz_CompanyID   = sz_CompanyID;//spf.sz_CompanyID = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID;
            spf.sz_CompanyName = sz_CompanyName;

            spf.sz_XMLPath = "MRI_INTAKE_XML_Path";
            spf.sz_PDFPath = "MRI_INTAKE_PDF_Path";

            spf.sz_Session_Id      = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
            spf.SZ_USER_NAME       = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
            spf.SZ_SPECIALITY_NAME = "MRI";
            obj = FillPDFValue(spf);
            Response.Redirect(obj[1].ToString(), false);
            Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "window.open('" + obj[1] + "'); ", true);
            Response.Write("<script>window.open('" + obj[1] + "')</script>");

            spf.sz_Session_Id      = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;;
            spf.sz_CompanyID       = sz_CompanyID;
            spf.sz_EventID         = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
            spf.SZ_PT_FILE_NAME    = obj[0].ToString();
            spf.SZ_PT_FILE_PATH    = obj[2].ToString();
            spf.SZ_SPECIALITY_CODE = "ININT";
            spf.SZ_SPECIALITY_NAME = "Intake Sheet";
            spf.SZ_USER_NAME       = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
            spf.savePDFForminDocMang(spf);
        }
        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());
        }
    }
Esempio n. 10
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());
        }
    }
Esempio n. 11
0
    protected void btnView_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());
        }
        objNF3Template = new Bill_Sys_NF3_Template();
        String szDefaultPath = objNF3Template.getPhysicalPath();
        int    ImageId       = 0;
        string PathNotFound  = "";

        try
        {
            foreach (DataGridItem drg in grdViewDocuments.Items)
            {
                CheckBox     drp       = (CheckBox)drg.Cells[0].FindControl("chkView");
                DropDownList drpReport = (DropDownList)drg.Cells[0].FindControl("ddlreport");
                if (drp.Checked == true)
                {
                    String szDestinationDir = "";

                    if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
                    {
                        szDestinationDir = objNF3Template.GetCompanyName(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    }
                    else
                    {
                        szDestinationDir = objNF3Template.GetCompanyName(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    }
                    if (drpReport.SelectedValue == "0")
                    {
                        szDestinationDir = szDestinationDir + "/" + txtCaseId.Text + "/No Fault File/Medicals/" + txtSpecility.Text + "/";
                    }
                    else if (drpReport.SelectedValue == "1")
                    {
                        szDestinationDir = szDestinationDir + "/" + txtCaseId.Text + "/No Fault File/Medicals/" + txtSpecility.Text + "/Referral/";
                    }

                    else if (drpReport.SelectedValue == "2")
                    {
                        szDestinationDir = szDestinationDir + "/" + txtCaseId.Text + "/No Fault File/AOB/";
                    }


                    strLinkPath = szDefaultPath + drg.Cells[2].Text + drg.Cells[3].Text;
                    if (!Directory.Exists(szDefaultPath + szDestinationDir))
                    {
                        Directory.CreateDirectory(szDefaultPath + szDestinationDir);
                    }
                    if (File.Exists(strLinkPath))
                    {
                        File.Copy(strLinkPath, szDefaultPath + szDestinationDir + drg.Cells[3].Text, true);
                        //if (!File.Exists(szDefaultPath + szDestinationDir + fuUploadReport.FileName))
                        //{
                        // fuUploadReport.SaveAs(szDefaultPath + szDestinationDir + fuUploadReport.FileName);
                        // Start : Save report under document manager.

                        ArrayList objAL = new ArrayList();
                        if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
                        {
                            objAL.Add(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                        }
                        else
                        {
                            objAL.Add(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                        }

                        objAL.Add(caseid);
                        objAL.Add(drg.Cells[3].Text);
                        objAL.Add(szDestinationDir);
                        objAL.Add(((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME);
                        objAL.Add(txtSpecility.Text);

                        if (drpReport.SelectedValue == "0")
                        {
                            ImageId = objNF3Template.saveReportInDocumentManager(objAL);
                        }
                        else if (drpReport.SelectedValue == "1")
                        {
                            ImageId = objNF3Template.saveReportInDocumentManager_Referral(objAL);
                        }
                        else if (drpReport.SelectedValue == "2")
                        {
                            ImageId = objNF3Template.saveReportInDocumentManager_AOB(objAL);
                        }

                        // End :   Save report under document manager.
                        //}

                        Bill_Sys_ReferalEvent _bill_Sys_ReferalEvent;
                        ArrayList             arrOBJ;

                        _bill_Sys_ProcedureCode_BO = new Bill_Sys_ProcedureCode_BO();
                        _bill_Sys_ProcedureCode_BO.UpdateReportProcedureCodeList(Convert.ToInt32(txtEventProcId.Text), strLinkPath, ImageId);
                    }
                    else
                    {
                        if (PathNotFound == "")
                        {
                            PathNotFound = strLinkPath + ",\n";
                        }
                        else
                        {
                            PathNotFound = PathNotFound + strLinkPath + ",\n";
                        }
                    }
                }
            }
            usrMessage.PutMessage("Document Received  successfully.");
            usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_UserMessage);
            usrMessage.Show();
            if (PathNotFound != "")
            {
                usrMessage.PutMessage("These file are not available \n" + PathNotFound);
                usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_ErrorMessage);
                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());
        }


        //GetProcedureList(caseid, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
    }