protected void btnDownloadAll_Click(object sender, EventArgs e)
    {
        Bill_Sys_CollectDocAndZip zip = new Bill_Sys_CollectDocAndZip();
        ArrayList list = new ArrayList();
        DataSet   set  = new DataSet();

        XMLData.XMLData data  = new XMLData.XMLData();
        XMLData.XMLData data2 = new XMLData.XMLData();
        string          str   = ConfigurationManager.AppSettings["LFBillSearch"].ToString();

        data2 = data.ReadXml(str);
        set   = data.XGridBind(this.Page, data2, 1, this.grdBillSearch.RecordCount, "", this.txtSearchBox.Text);
        if (this.chkCaseDoc.Checked)
        {
            list = zip.CollectAndZipBillDoc(set, "1");
        }
        else
        {
            list = zip.CollectAndZipBillDoc(set, "0");
        }
        if (list.Count < 1)
        {
            ScriptManager.RegisterClientScriptBlock((Page)this, base.GetType(), "Done", "alert('There are no files available on the server to download.');", true);
        }
        else
        {
            for (int i = 0; i < list.Count; i++)
            {
                ScriptManager.RegisterStartupScript((Page)this, typeof(string), "popup" + i.ToString(), "window.open('" + ConfigurationSettings.AppSettings["LFIRMDOCURL"].ToString() + list[i].ToString().Replace(ConfigurationSettings.AppSettings["BASEPATH_OF_DOWNLOAD"].ToString(), "").Trim() + "'); ", true);
            }
        }
    }
    protected void btnRejecte_Click(object sender, EventArgs e)
    {
        ArrayList arrBillNo = new ArrayList();

        for (int i = 0; i < grdBillSearch.Rows.Count; i++)
        {           //check checkbox value
            CheckBox chkDelete1 = (CheckBox)grdBillSearch.Rows[i].FindControl("ChkDelete");
            if (chkDelete1.Checked)
            {
                arrBillNo.Add(grdBillSearch.DataKeys[i]["SZ_BILL_NUMBER"].ToString());
            }
        }
        string szMessage  = "";
        string szMessage1 = "";

        if (arrBillNo.Count > 0)
        {
            for (int j = 0; j < arrBillNo.Count; j++)
            {
                Bill_Sys_CollectDocAndZip _objBillStatus = new Bill_Sys_CollectDocAndZip();
                int cnt = _objBillStatus.UpdateBillStatusToRejecte(arrBillNo[j].ToString(), "BRL");
                if (cnt == 0)
                {
                    if (szMessage == "")
                    {
                        szMessage = szMessage + " " + arrBillNo[j].ToString();
                    }
                    else
                    {
                        szMessage = szMessage + "," + arrBillNo[j].ToString();
                    }
                }
                else
                {
                    if (szMessage1 == "")
                    {
                        szMessage1 = szMessage1 + arrBillNo[j].ToString();
                    }
                    else
                    {
                        szMessage1 = szMessage1 + "," + arrBillNo[j].ToString();
                    }
                }
            }
        }
        if (szMessage1 != "")
        {
            ScriptManager.RegisterClientScriptBlock(this, GetType(), "Done", "alert('" + szMessage1 + " -Bills Are Rejected Successfully .');", true);
        }
        if (szMessage != "")
        {
            ScriptManager.RegisterClientScriptBlock(this, GetType(), "Done", "alert(' Rejection Failed for" + szMessage + " Bills.');", true);
        }

        this.grdCaseCount.Page = this.Page;

        grdCaseCount.XGridBind();
        grdBillSearch.XGridBindSearch();
    }
    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());
        }
        this.con.SourceGrid                 = grdDownLoadDesk;
        this.txtSearchBox.SourceGrid        = grdDownLoadDesk;
        this.grdDownLoadDesk.Page           = this.Page;
        this.grdDownLoadDesk.PageNumberList = this.con;
        this.Title = "DownLoad Desk";
        this.grdDownLoadDesk.Page = this.Page;

        //this.grdDownloadCompanyWise.Page=this.Page;
        extddlInsurance.Flag_ID  = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
        extddlCaseStatus.Flag_ID = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
        extdlitigate.Flag_ID     = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
        // ddlDateValues.Attributes.Add("onChange", "javascript:SetDate();");
        //DtlView.Visible = false;
        try
        {
            if (!IsPostBack)
            {
                txtCompanyId.Text = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                mbs.lawfirm.Bill_Sys_CollectDocAndZip obj = new Bill_Sys_CollectDocAndZip();
                txtStatusID.Text = obj.getStatusId(txtCompanyId.Text, "DNL");
                grdDownLoadDesk.XGridBindSearch();
                DataSet dsCompanyWiseInfo = new DataSet();

                dsCompanyWiseInfo = obj.GetCompanyWiseInfo(txtCompanyId.Text);
                //DtlView.DataSource = dsCompanyWiseInfo;
                //DtlView.DataBind();
            }
        }
        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 btnBatchXls_Click(object sender, EventArgs e)
    {
        try
        {
            DataSet         dsAll         = new DataSet();
            XMLData.XMLData obj           = new XMLData.XMLData();
            XMLData.XMLData xd            = new XMLData.XMLData();
            string          szxmlfilename = ConfigurationManager.AppSettings["LFDESKOFFICEINFO"].ToString();
            xd    = obj.ReadXml(szxmlfilename);
            dsAll = obj.XGridBind(this.Page, xd, 1, grdBillSearch.RecordCount, "", txtSearchBox.Text);
            string sz_Bill_No = "";
            for (int i = 0; i < dsAll.Tables[0].Rows.Count; i++)
            {
                if (sz_Bill_No == "")
                {
                    sz_Bill_No = "'" + dsAll.Tables[0].Rows[i]["SZ_BILL_NUMBER"].ToString() + "'";
                }
                else
                {
                    sz_Bill_No = sz_Bill_No = sz_Bill_No + "," + "'" + dsAll.Tables[0].Rows[i]["SZ_BILL_NUMBER"].ToString() + "'";
                }
            }
            Bill_Sys_CollectDocAndZip _objBatch = new Bill_Sys_CollectDocAndZip();
            DataSet dsInfo = new DataSet();

            dsInfo = _objBatch.GetPateintInfo(sz_Bill_No);
            if (dsInfo.Tables[0].Rows.Count > 0)
            {
                string xmlName   = _objBatch.getFileName();
                string exlName   = xmlName.Replace(".xml", ".xls");
                string file_path = ConfigurationSettings.AppSettings["XLPATH"].ToString();
                string Folder    = ConfigurationSettings.AppSettings["REPORTFOLDER"].ToString();

                File.Copy(file_path, getPhysicalPath() + "Reports/" + exlName);
                _objBatch.GenerateXL(dsInfo.Tables[0], getPhysicalPath() + "Reports/" + exlName);
                if (File.Exists(getPhysicalPath() + Folder + exlName))
                {
                    ScriptManager.RegisterClientScriptBlock(this, GetType(), "Msg", "window.open('" + ConfigurationManager.AppSettings["FETCHEXCEL_SHEET"].ToString() + exlName + "'); ", true);
                }
                else
                {
                    ScriptManager.RegisterClientScriptBlock(this, GetType(), "Done", "alert('Batch is Empty');", true);
                }
            }
        }
        catch (Exception ex)
        {
        }
    }
示例#5
0
    public void RedirectToScanApp()
    {
        mbs.lawfirm.Bill_Sys_CollectDocAndZip obj = new Bill_Sys_CollectDocAndZip();
        string companyName = obj.GetCompanyName(((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID);
        string szUrl       = ConfigurationManager.AppSettings["webscanurl"].ToString();

        mbs.lawfirm.Bill_Sys_Patient_Details _obj = new Bill_Sys_Patient_Details();

        string NodeId = _obj.GetNodeIDMST_Nodes(((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID, "NFLAW");

        szUrl = szUrl + "&Flag=LawFirm" + "&CompanyId=" + ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID + "&UserName="******"USER_OBJECT"]).SZ_USER_NAME + "&CompanyName=" + companyName + "&CaseId=" + ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
        szUrl = szUrl + "&PName=" + ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_PATIENT_NAME + "&CaseNo=" + ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_NO + "&NodeId=" + NodeId + "&UserId=" + ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID;
        // szUrl = szUrl + "&PomID=" + Session["SCANPOMID"].ToString() + "&PName=" + ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_PATIENT_NAME + "&NodeId=" + NodeId;
        ScriptManager.RegisterStartupScript(this, this.GetType(), "starScript", "window.open('" + szUrl + "', 'Scan_Document','channelmode=no,location=no,toolbar=no,menubar=0,resizable=0,status=no,scrollbars=0, width=600,height=550'); ", true);
    }
    protected void btnDownload_Click(object sender, EventArgs e)
    {
        ArrayList list2 = new ArrayList();
        string    str   = this.Page.Request.ServerVariables["REMOTE_ADDR"].ToString();
        string    str2  = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID;
        string    str3  = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;

        for (int i = 0; i < this.grdBillSearch.Rows.Count; i++)
        {
            CheckBox box = (CheckBox)this.grdBillSearch.Rows[i].FindControl("ChkselectBllno");
            if (box.Checked)
            {
                DAO_PatientList list = new DAO_PatientList();
                list.CaseID             = this.grdBillSearch.Rows[i].Cells[0].Text.ToString();
                list.Bill_NO            = this.grdBillSearch.Rows[i].Cells[3].Text.ToString();//Change Cell 1 to 3
                list.CompanyId          = this.grdBillSearch.DataKeys[i]["SZ_COMPANY_ID"].ToString();
                list.LAWFIRM_COMPANY_ID = this.txtCompanyId.Text.ToString();
                list.USER_ID            = (str2);
                list.IP_ADDRESS         = (str);
                list.PATIENT_NAME       = this.grdBillSearch.DataKeys[i]["PATIENT_NAME"].ToString();
                list.PROCEDURE_GROUP_ID = this.grdBillSearch.DataKeys[i]["SPECIALITY_ID"].ToString();
                list.USER_NAME          = str3;
                new Bill_Sys_CollectDocAndZip();
                list2.Add(list);
            }
        }
        string str4 = "";
        Bill_Sys_CollectDocAndZip zip = new Bill_Sys_CollectDocAndZip();

        if (this.chkCaseDoc.Checked)
        {
            str4 = zip.CollectAndZipBillDocs(list2, "1");
        }
        else
        {
            str4 = zip.CollectAndZipBillDocs(list2, "0");
        }
        if (str4 == "")
        {
            ScriptManager.RegisterClientScriptBlock((Page)this, base.GetType(), "Done", "alert('There are no files available on the server to download.');", true);
        }
        else
        {
            ScriptManager.RegisterClientScriptBlock((Page)this, base.GetType(), "Msg", "window.open('" + ConfigurationSettings.AppSettings["LFIRMDOCURL"].ToString() + str4 + "'); ", true);
        }
    }
    protected void grdDownLoadDesk_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());
        }
        ArrayList objarr = new ArrayList();

        mbs.lawfirm.Bill_Sys_CollectDocAndZip objDAO = new Bill_Sys_CollectDocAndZip();
        string _CompanyName = "";
        int    index        = 0;

        try
        {
            if (e.CommandName.ToString() == "PLS")
            {
                for (int i = 0; i < grdDownLoadDesk.Rows.Count; i++)
                {
                    LinkButton minus1 = (LinkButton)grdDownLoadDesk.Rows[i].FindControl("lnkM");
                    LinkButton plus1  = (LinkButton)grdDownLoadDesk.Rows[i].FindControl("lnkP");
                    if (minus1.Visible)
                    {
                        minus1.Visible = false;
                        plus1.Visible  = true;
                    }
                }

                grdDownLoadDesk.Columns[10].Visible = true;
                index = Convert.ToInt32(e.CommandArgument);
                string divname = "div";

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

                DataSet objds = new DataSet();
                //GetDownloadedBillsInfo
                //objds = objDAO.GetDownloadedBills(grdDownLoadDesk.DataKeys[index][0].ToString(), ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, txtStatusID.Text);
                objds         = objDAO.GetDownloadedBillsInfo(grdDownLoadDesk.DataKeys[index][0].ToString(), ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, txtStatusID.Text, grdDownLoadDesk.DataKeys[index][1].ToString());
                gv.DataSource = objds;
                gv.DataBind();
                ScriptManager.RegisterClientScriptBlock(this, GetType(), "mp", "ShowChildGrid('" + divname + "') ;", true);
                plus.Visible  = false;
                minus.Visible = true;
            }

            if (e.CommandName.ToString() == "MNS")
            {
                grdDownLoadDesk.Columns[10].Visible = false;
                index = Convert.ToInt32(e.CommandArgument);
                string divname = "div";

                divname = divname + grdDownLoadDesk.DataKeys[index][1].ToString();
                LinkButton plus  = (LinkButton)grdDownLoadDesk.Rows[index].FindControl("lnkP");
                LinkButton minus = (LinkButton)grdDownLoadDesk.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());
        }
    }