Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Bill_Sys_BillingCompanyObject obj = new Bill_Sys_BillingCompanyObject();

        obj.SZ_COMPANY_ID = "CO00023";
        Session["BILLING_COMPANY_OBJECT"] = obj;
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     objSessionBillingCompany = (Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"];
     objSessionUser = (Bill_Sys_UserObject)Session["USER_OBJECT"];
     extddlSpeciality.Flag_ID = objSessionBillingCompany.SZ_COMPANY_ID;
     txtUserId.Text = objSessionUser.SZ_USER_ID;
     txtCompanyId.Text = objSessionBillingCompany.SZ_COMPANY_ID;
 }
Exemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //divViewBill.Visible = false;


        obj = (Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"];
        ajAutoComplete1.ContextKey = obj.SZ_COMPANY_ID;
        ajAutoComplete1.CompletionListElementID = divAutoComp.ClientID;

        //if (!this.IsPostBack)
        //{
        //    System.Web.HttpBrowserCapabilities browser = Request.Browser;
        //    string sType = browser.Type;
        //    string sName = browser.Browser;

        //    if (browser.Browser.ToLower().Contains("firefox"))
        //    {
        //        szCSS = "\"css/main-ff.css\"";
        //    }
        //    else
        //    {
        //        if (browser.Browser.ToLower().Contains("safari") || browser.Browser.ToLower().Contains("apple"))
        //        {
        //            szCSS = "\"css/main-ch.css\"";
        //        }
        //        else
        //        {
        //            szCSS = "\"css/main-ie.css\"";
        //        }
        //    }
        //}

        string szUrl = Request.Path.Substring(Request.Path.LastIndexOf('/')).ToString();

        if (szUrl.Equals("/WorkAreaWidget.aspx") || szUrl.Equals("\\WorkAreaWidget.aspx"))
        {
            tdViewBill.Visible  = true;
            tdViewBill1.Visible = true;
            tdWorkArea.Visible  = false;
        }

        else if (szUrl.Equals("/LF_ViewBill.aspx") || szUrl.Equals("\\LF_ViewBill.aspx"))
        {
            tdWorkArea.Visible  = true;
            tdViewBill.Visible  = false;
            tdViewBill1.Visible = false;
        }
        else
        {
            tdViewBill.Visible  = false;
            tdViewBill1.Visible = false;
            tdWorkArea.Visible  = false;
        }
    }
Exemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Bill_Sys_BillingCompanyObject obj = new Bill_Sys_BillingCompanyObject();

        obj.SZ_COMPANY_ID = "CO00023";
        Session["BILLING_COMPANY_OBJECT"] = obj;

        Bill_Sys_UserObject objUser = new Bill_Sys_UserObject();

        objUser.SZ_REFF_PROVIDER_ID = "OI000000000000000525";
        objUser.SZ_USER_ID          = "US000000000000000662";
        objUser.SZ_USER_NAME        = "testpro";
        Session["USER_OBJECT"]      = objUser;
    }
Exemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        obj = (Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"];

        if (obj != null)
        {
            szCompanyName = obj.SZ_COMPANY_NAME;
        }

        lblMessage.Text = "";
        lblMessage.Text = "";

        if (!IsPostBack)
        {
            loadexisting();
        }
    }
Exemplo n.º 6
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
        {
            objCompany = (Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"];
            objSystem  = (Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"];

            ajAutoName.ContextKey = objCompany.SZ_COMPANY_ID;
            btnSendMail.Attributes.Add("onclick", "return confirm_check();");

            Button1.Attributes.Add("onclick", "return confirm_check();");

            if (!IsPostBack)
            {
                txtCompanyID.Text = objCompany.SZ_COMPANY_ID;
            }

            if (objCompany.BT_REFERRING_FACILITY == true)
            {
                extddlOffice.Flag_Key_Value = "BILLING_OFFICE_LIST";
            }
            extddlOffice.Flag_ID = txtCompanyID.Text;
        }
        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());
        }
    }
Exemplo n.º 7
0
 private bool validateOnPageLoad()
 {
     this.objCompany = (Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"];
     if (this.objCompany == null)
     {
         this.lblErrorMessage.Text    = "Your session has expired. You must re-login to access this page.";
         this.lblErrorMessage.Visible = true;
         return(false);
     }
     this.objUser = (Bill_Sys_UserObject)this.Session["USER_OBJECT"];
     if (this.objUser != null)
     {
         return(true);
     }
     this.lblErrorMessage.Text    = "Your session has expired. You must re-login to access this page.";
     this.lblErrorMessage.Visible = true;
     return(false);
 }
Exemplo n.º 8
0
    private bool validateOnPageLoad()
    {
        objCompany = (Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"];
        if (objCompany == null)
        {
            lblErrorMessage.Text    = (string)GetLocalResourceObject("session.expired");
            lblErrorMessage.Visible = true;
            return(false);
        }

        objUser = (Bill_Sys_UserObject)Session["USER_OBJECT"];
        if (objUser == null)
        {
            lblErrorMessage.Text    = (string)GetLocalResourceObject("session.expired");
            lblErrorMessage.Visible = true;
            return(false);
        }
        return(true);
    }
Exemplo n.º 9
0
    protected void onUpdateTime_CallBack(object source, DevExpress.Web.CallbackEventArgsBase b)
    {
        objCompany = (Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"];
        if (objCompany == null)
        {
            lblErrorMessage.Text    = (string)GetLocalResourceObject("session.expired");
            lblErrorMessage.Visible = true;
            return;
        }

        lblMessage.Text      = "";
        lblErrorMessage.Text = "";
        tickets.TicketDAO dao = new tickets.TicketDAO();
        dao.TicketID  = Convert.ToInt64(this.htid.Get("tid").ToString());
        dao.CompanyID = objCompany.SZ_COMPANY_ID;
        BindThreads(dao);
        pUpdateTime.Visible = true;
        btnReply.Enabled    = true;
    }
Exemplo n.º 10
0
 private bool validateFormInput()
 {
     if (this.cIssueType.Value.ToString().ToLower().Equals("not_selected"))
     {
         this.lblErrorMessage.Text    = "Fields marked with asterix (*) are mandatory. Enter the missing data and re-submit the ticket.";
         this.lblErrorMessage.Visible = true;
         return(false);
     }
     if (this.ddlPriority.Value.ToString() == "")
     {
         this.lblErrorMessage.Text    = "Fields marked with asterix (*) are mandatory. Enter the missing data and re-submit the ticket.";
         this.lblErrorMessage.Visible = true;
         return(false);
     }
     if (this.tDefaultEmail.Text.Trim().Length == 0)
     {
         this.lblErrorMessage.Text    = "Fields marked with asterix (*) are mandatory. Enter the missing data and re-submit the ticket.";
         this.lblErrorMessage.Visible = true;
         return(false);
     }
     if (this.tSubject.Text.Trim().Length == 0)
     {
         this.lblErrorMessage.Text    = "Fields marked with asterix (*) are mandatory. Enter the missing data and re-submit the ticket.";
         this.lblErrorMessage.Visible = true;
         return(false);
     }
     if (this.tDescription.Text.Trim().Length == 0)
     {
         this.lblErrorMessage.Text    = "Fields marked with asterix (*) are mandatory. Enter the missing data and re-submit the ticket.";
         this.lblErrorMessage.Visible = true;
         return(false);
     }
     this.objCompany = (Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"];
     if (this.objCompany != null)
     {
         return(true);
     }
     this.lblErrorMessage.Text    = "Your session has expired. You must re-login to access this page.";
     this.lblErrorMessage.Visible = true;
     return(false);
 }
Exemplo n.º 11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        objSessionSystem           = (Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"];
        objSessionBillingCompany   = (Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"];
        objSessionCompanyAppStatus = (Bill_Sys_BillingCompanyObject)Session["APPSTATUS"];
        objSessionUser             = (Bill_Sys_UserObject)Session["USER_OBJECT"];
        txtireortreceive.Text      = "false";
        //txtVisit.Text = drpdown_Documents.SelectedValue.ToString();
        txtCompanyid.Text                = objSessionBillingCompany.SZ_COMPANY_ID;
        extddlCaseType.Flag_ID           = txtCompanyid.Text;
        this.con1.SourceGrid             = grdpaidbills;
        this.txtSearchBox1.SourceGrid    = grdpaidbills;
        this.grdpaidbills.Page           = this.Page;
        this.grdpaidbills.PageNumberList = this.con1;
        ddlDateValues.Attributes.Add("onChange", "javascript:SetVisitDate();");
        btnAddReason.Attributes.Add("onclick", "return CheckSelect();");
        btnChangeCaseType.Attributes.Add("onclick", "return CheckSelect();");

        if (!IsPostBack)
        {
            grdpaidbills.XGridBindSearch();
        }
    }
Exemplo n.º 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     objCommany = (Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"];
     if (!IsPostBack)
     {
         if (!IsPostBack)
         {
             Session["DiagnosysCode"] = "Null";
             mbs.templatemanager.TemplateManager tm = new mbs.templatemanager.TemplateManager(ConfigurationSettings.AppSettings["Connection_String"].ToString());
             DataSet ds = tm.GetTemplatesToRun(objCommany.SZ_COMPANY_ID, "OpenTemplate");
             lstTemplates.DataSource = ds.Tables[0];
             for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
             {
                 ListItem lst = new ListItem();
                 lst.Text  = ds.Tables[0].Rows[i][1].ToString();
                 lst.Value = ds.Tables[0].Rows[i][2].ToString();
                 lstTemplates.Items.Add(lst);
             }
             if (Request.QueryString["fromCase"] != null)
             {
                 Bill_Sys_CaseObject _Bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                 _Bill_Sys_CaseObject.SZ_CASE_ID      = Request.QueryString["caseId"].ToString();
                 _Bill_Sys_CaseObject.SZ_CASE_NO      = Request.QueryString["CaseNo"].ToString();
                 _Bill_Sys_CaseObject.SZ_PATIENT_ID   = Request.QueryString["PId"].ToString();
                 _Bill_Sys_CaseObject.SZ_PATIENT_NAME = Request.QueryString["PName"].ToString();
                 Session["CASE_OBJECT"] = _Bill_Sys_CaseObject;
             }
         }
     }
     if (Request.Browser.Browser == "IE")
     {
     }
     else
     {
         lblError.Text = "You are using " + Request.Browser.Browser + " browser. Template manager requires Internet Explorer or another browser which supports ActiveX controls.";
     }
 }
Exemplo n.º 13
0
    //protected bool detectIdentificationCookie(string cookieCode, string cookieEncryptionKey)
    //{
    //    try
    //    {
    //        if (String.IsNullOrEmpty(cookieCode))
    //            return false;
    //        else if (Request.Cookies["GREENBILLS_DETECTION"] == null)
    //            return false;
    //        else
    //        {
    //            HttpCookie cookie = Request.Cookies["GREENBILLS_DETECTION"];
    //            int i = 0;
    //            foreach (string val in cookie.Values)
    //            {
    //                if (cookie[val].Equals(Bill_Sys_Utility.ComputeHMACSHA1(cookieCode, cookieEncryptionKey)))
    //                {
    //                    return createIdentificationCookie(i);
    //                }
    //                i++;
    //            }
    //            return false;
    //        }
    //    }
    //    catch (Exception ex)
    //    {
    //        return false;
    //    }
    //}


    protected void btnActivate_Click(object sender, EventArgs e)
    {
        string str  = "";
        string roll = "";

        roll = ValidateUserAndToken(txtToken.Text, txtUserName.Text, EncryptPassword());
        if (roll != "")
        {
            if (ActivateUser(txtToken.Text, txtUserName.Text, EncryptPassword()))
            {
                createLoginCookies(txtUserName.Text,
                                   true,
                                   roll);

                //detectIdentificationCookie(Convert.ToString(Session["CookieCode"]), System.Configuration.ConfigurationManager.AppSettings.Get("COOKIE_ENCRYPT_KEY"));

                _bill_Sys_LoginBO = new Bill_Sys_LoginBO();
                DataSet set = new DataSet();
                set = _bill_Sys_LoginBO.getLoginDetails(txtUserName.Text, "", HttpContext.Current.Request.UserHostAddress);
                if ((set.Tables.Count > 0) && (set.Tables[0].Rows.Count > 0))
                {
                    this.objAppSettings = (ApplicationSettings_BO)base.Application["OBJECT_APP_SETTINGS"];
                    if (this.objAppSettings == null)
                    {
                        this.objAppSettings = new ApplicationSettings_BO();
                        base.Application["OBJECT_APP_SETTINGS"] = this.objAppSettings;
                    }
                    if ((set.Tables[0].Rows.Count == 1) && (set.Tables[0].Rows[0][0].ToString() == "False"))
                    {
                        string str3 = HttpContext.Current.Request.UserHostAddress.ToString();
                        FormsAuthentication.SignOut();
                        FormsAuthentication.RedirectToLoginPage("IPValidationCheck=false&InvalidIP=" + str3);
                        return;
                    }
                    this._bill_Sys_UserObject                           = new Bill_Sys_UserObject();
                    this._bill_Sys_UserObject.SZ_USER_ID                = set.Tables[0].Rows[0][0].ToString();
                    this._bill_Sys_UserObject.SZ_USER_NAME              = set.Tables[0].Rows[0][1].ToString();
                    this._bill_Sys_UserObject.SZ_USER_ROLE              = set.Tables[0].Rows[0][4].ToString();
                    this._bill_Sys_UserObject.SZ_PROVIDER_ID            = set.Tables[0].Rows[0][5].ToString();
                    this._bill_Sys_UserObject.SZ_USER_ROLE_NAME         = set.Tables[0].Rows[0][8].ToString();
                    this._bill_Sys_UserObject.SZ_USER_EMAIL             = set.Tables[0].Rows[0]["USER_EMAIL_ID"].ToString();
                    this._bill_Sys_UserObject.DomainName                = set.Tables[0].Rows[0]["DomainName"].ToString();
                    this.Session["USER_OBJECT"]                         = this._bill_Sys_UserObject;
                    this._bill_Sys_BillingCompanyObject                 = new Bill_Sys_BillingCompanyObject();
                    this._bill_Sys_BillingCompanyObject.SZ_COMPANY_ID   = set.Tables[0].Rows[0][2].ToString();
                    this._bill_Sys_BillingCompanyObject.SZ_COMPANY_NAME = set.Tables[0].Rows[0][3].ToString();
                    this._bill_Sys_BillingCompanyObject.SZ_PREFIX       = set.Tables[0].Rows[0][6].ToString();
                    this._bill_Sys_BillingCompanyObject.SZ_ADDRESS      = set.Tables[0].Rows[0][9].ToString();
                    this._bill_Sys_BillingCompanyObject.SZ_EMAIL        = set.Tables[0].Rows[0][10].ToString();
                    this._bill_Sys_BillingCompanyObject.SZ_PHONE        = set.Tables[0].Rows[0][11].ToString();
                    this._bill_Sys_BillingCompanyObject.SZ_FAX          = set.Tables[0].Rows[0][12].ToString();
                    if (set.Tables[0].Rows[0][7].ToString() != "")
                    {
                        this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY = Convert.ToBoolean(set.Tables[0].Rows[0][7].ToString());
                    }
                    else
                    {
                        this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY = false;
                    }
                    if (set.Tables[0].Rows[0][13].ToString() != "")
                    {
                        this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM = Convert.ToBoolean(set.Tables[0].Rows[0][13].ToString());
                    }
                    else
                    {
                        this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM = false;
                    }
                    if (set.Tables[0].Rows[0]["BT_ATTORNY"].ToString() != "")
                    {
                        this._bill_Sys_BillingCompanyObject.BT_ATTORNY = Convert.ToBoolean(set.Tables[0].Rows[0]["BT_ATTORNY"].ToString());
                    }
                    else
                    {
                        this._bill_Sys_BillingCompanyObject.BT_ATTORNY = false;
                    }
                    if (set.Tables[0].Rows[0]["BT_PROVIDER"].ToString() != "")
                    {
                        this._bill_Sys_BillingCompanyObject.BT_PROVIDER = Convert.ToBoolean(set.Tables[0].Rows[0]["BT_PROVIDER"].ToString());
                    }
                    else
                    {
                        this._bill_Sys_BillingCompanyObject.BT_PROVIDER = false;
                    }
                    this.Session["BILLING_COMPANY_OBJECT"] = this._bill_Sys_BillingCompanyObject;
                    this._bill_Sys_CaseInfo            = new Bill_Sys_Case();
                    this._bill_Sys_CaseInfo.SZ_CASE_ID = "";
                    this.Session["CASE_INFO"]          = this._bill_Sys_CaseInfo;
                    this._bill_Sys_SystemObject        = new Bill_Sys_SystemObject();
                    DataView view = new DataView(set.Tables[1]);
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00003'";
                    this._bill_Sys_SystemObject.SZ_DEFAULT_LAW_FIRM = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00004'";
                    this._bill_Sys_SystemObject.SZ_CHART_NO = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00007'";
                    this._bill_Sys_SystemObject.SZ_LOCATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00008'";
                    this._bill_Sys_SystemObject.SZ_CHECKINVALUE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00009'";
                    this._bill_Sys_SystemObject.AddVisits_SearchByChartNumber = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00014'";
                    this._bill_Sys_SystemObject.SZ_SHOW_PROCEDURE_CODE_ON_INTEGRATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00017'";
                    this._bill_Sys_SystemObject.SZ_SHOW_PROVIDER_DISPLAY_NAME = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00018'";
                    this._bill_Sys_SystemObject.SZ_SHOW_PATIENT_PHONE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00019'";
                    this._bill_Sys_SystemObject.SZ_SHOW_PATIENT_SIGNATURE_FOR_NF3 = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00020'";
                    this._bill_Sys_SystemObject.SZ_SHOW_DOCTOR_SIGNATURE_FOR_NF3 = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    this._bill_Sys_SystemObject.SZ_SHOW_DATE_OF_FIRST_TREATMENT  = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00022'";
                    this._bill_Sys_SystemObject.SZ_SHOW_NEW_POM = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00023'";
                    this._bill_Sys_SystemObject.SZ_ASSIGN_DIAGNOSIS_CODE_TO_VISIT = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00025'";
                    this._bill_Sys_SystemObject.ASSOCIATE_CASE_TYPE_WITH_VISITS = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00026'";
                    this._bill_Sys_SystemObject.ADD_LOCATION_TO_VISITS = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00024'";
                    this._bill_Sys_SystemObject.SZ_SHOW_INSURANCE_WITH_BILL = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00029'";
                    this._bill_Sys_SystemObject.SZ_ALLOW_TO_EDIT_NF2_PDF = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00028'";
                    this._bill_Sys_SystemObject.SZ_SHOW_NF3_PROCEDURE_CODE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00030'";
                    this._bill_Sys_SystemObject.ALLOW_TO_ADD_VISIT_FOR_FUTURE_DATE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00031'";
                    this._bill_Sys_SystemObject.PHONE_FORMATE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00032'";
                    this._bill_Sys_SystemObject.DONOT_ALLOW_TO_CREATE_BILL_WITHOUT_PATIENT_PHONE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00033'";
                    this._bill_Sys_SystemObject.DONOT_ALLOW_TO_CREATE_BILL_WITHOUT_LOCATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00034'";
                    this._bill_Sys_SystemObject.SZ_SHOW_ADD_TO_PREFERED_LIST = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00037'";
                    this._bill_Sys_SystemObject.SZ_ADD_SECONDARY_INSURANCE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00038'";
                    this._bill_Sys_SystemObject.SZ_SHOW_ADD_TO_PREFERED_LIST_FOR_DIAGNOSIS_CODE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00049'";
                    this._bill_Sys_SystemObject.SZ_SHOW_PATIENT_WALK_IN_ON_WORKAREA = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00050'";
                    this._bill_Sys_SystemObject.SZ_COPY_PATIENT_TO_TEST_FACILITY = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00054'";
                    this._bill_Sys_SystemObject.SZ_HP1_Display = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00051'";
                    this._bill_Sys_SystemObject.SZ_MG2_Display = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00062'";
                    this._bill_Sys_SystemObject.SZ_ALLOW_TO_EDIT_CODE_AMOUNT = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00059'";
                    this._bill_Sys_SystemObject.SZ_ALLOW_HP1_SIGN = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00057'";
                    this._bill_Sys_SystemObject.SZ_ALLOW_MODIFIER_TO_UPDATE_FOR_PROCEDURE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00080'";
                    this._bill_Sys_SystemObject.SZ_ADD_APPOINTMENT = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00082'";
                    this._bill_Sys_SystemObject.SZ_ENABLE_CYCLIC_PROCEDURE_CODE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00084'";
                    this._bill_Sys_SystemObject.IS_EMPLOYER = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";


                    view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00012'";
                    if (view.ToTable().Rows.Count > 0)
                    {
                        if (view.ToTable().Rows[0][1].ToString() == this._bill_Sys_UserObject.SZ_USER_ID)
                        {
                            this.Session["IPAdmin"] = "True";
                        }
                        else
                        {
                            this.Session["IPAdmin"] = "False";
                        }
                    }
                    else
                    {
                        this.Session["IPAdmin"] = "False";
                    }
                    DataTable table = set.Tables[2];
                    foreach (DataRow row in table.Rows)
                    {
                        if (row["SZ_CONFIGURATION"].ToString() == "SOFT DELETE")
                        {
                            this._bill_Sys_SystemObject.SZ_SOFT_DELETE = "True";
                        }
                        else
                        {
                            if (row["SZ_CONFIGURATION"].ToString() == "HARD DELETE")
                            {
                                this._bill_Sys_SystemObject.SZ_HARD_DELETE = "True";
                                continue;
                            }
                            if (row["SZ_CONFIGURATION"].ToString() == "NEW BILLS")
                            {
                                this._bill_Sys_SystemObject.SZ_NEW_BILL = "True";
                                continue;
                            }
                            if (row["SZ_CONFIGURATION"].ToString() == "VIEW BILLS")
                            {
                                this._bill_Sys_SystemObject.SZ_VIEW_BILL = "True";
                                continue;
                            }
                            if (row["SZ_CONFIGURATION"].ToString() == "DELETE BILLS")
                            {
                                this._bill_Sys_SystemObject.SZ_DELETE_BILLS = "True";
                                continue;
                            }
                            if (row["SZ_CONFIGURATION"].ToString() == "DELETE VISIT")
                            {
                                this._bill_Sys_SystemObject.SZ_DELETE_VIEWS = "True";
                                continue;
                            }
                            if (row["SZ_CONFIGURATION"].ToString() == "EMG BILL")
                            {
                                this._bill_Sys_SystemObject.SZ_EMG_BILL = "True";
                                continue;
                            }
                            if (row["SZ_CONFIGURATION"].ToString() == "NOTE DELETE")
                            {
                                this._bill_Sys_SystemObject.SZ_NOTE_DELETE = "True";
                                continue;
                            }
                            if (row["SZ_CONFIGURATION"].ToString() == "NOTE SOFT DELETE")
                            {
                                this._bill_Sys_SystemObject.SZ_NOTE_SOFT_DELETE = "True";
                            }
                        }
                    }
                    this.Session["SYSTEM_OBJECT"] = this._bill_Sys_SystemObject;
                    this._bill_Sys_LoginBO.ChangeLoginDate(((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID);
                    this.Session["REMINDER"]  = "TRUE";
                    this.Session["IMDETAILS"] = "TRUE";
                    string str4 = set.Tables[0].Rows[0][8].ToString();
                    this._bill_Sys_BillingCompanyObject.SZ_READ_ONLY = this._bill_Sys_LoginBO.Readonly();
                    this.Session["APPSTATUS"] = this._bill_Sys_BillingCompanyObject;
                    if (str4.ToLower() == "doctor")
                    {
                        if ((set.Tables.Count > 3) && (set.Tables[3].Rows.Count > 0))
                        {
                            str = set.Tables[3].Rows[0][0].ToString();
                        }
                        if (str.ToString().Equals("IM"))
                        {
                            this.Session["PageRedirect"] = "~/Bill_Sys_IM_CheckOut.aspx";
                        }
                        else
                        {
                            this.Session["PageRedirect"] = @"~/AJAX Pages\Bill_Sys_PatientSearch.aspx";
                        }
                    }
                    else if (str4.ToLower() == "agent")
                    {
                        this.Session["PageRedirect"] = "~/Agent/Bill_Sys_Agent_SearchCase.aspx";
                    }
                    else if (this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                    {
                        if ((str4.ToLower() == "lawfirm attorney") && (this.Session["urlintegration"] != null))
                        {
                            string s = this.Session["urlintegration"].ToString();
                            s = base.Server.UrlEncode(s);
                            this.Session["PageRedirect"] = "~/ATT/Bill_Sys_AttorneySearch.aspx?dt=" + s;
                        }
                        if (this.Session["IntDocUrl"] != null)
                        {
                            Bill_Sys_DocumentManagerObject obj2 = new Bill_Sys_DocumentManagerObject();
                            string str6 = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                            obj2 = (Bill_Sys_DocumentManagerObject)this.Session["IntDocUrl"];
                            string str7  = obj2.SZ_CASE_ID;
                            string str8  = obj2.SZ_CASE_NO;
                            string str9  = obj2.SZ_COMAPNY_ID;
                            string str10 = obj2.SZ_LAWFIRM_ID;
                            if (str6 == str10)
                            {
                                this.Session["PageRedirect"] = "~/Document Manager/case/vb_CaseInformation.aspx?caseid=" + str7 + "&caseno=" + str8 + "&cmpid=" + str9;
                            }
                            else
                            {
                                this.Session["PageRedirect"] = @"~/LF\Bill_Sys_SearchCase.aspx";
                            }
                        }
                        else
                        {
                            this.Session["PageRedirect"] = @"~/LF\Bill_Sys_SearchCase.aspx";
                        }
                    }
                    else if (this._bill_Sys_BillingCompanyObject.BT_PROVIDER.ToString().Equals("True"))
                    {
                        if (str4.ToLower() == "provider")
                        {
                            this.Session["PageRedirect"] = @"~/Provider\Bill_Sys_SearchCase.aspx";
                        }
                    }
                    else if (this._bill_Sys_BillingCompanyObject.BT_ATTORNY.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                    {
                        this.Session["PageRedirect"] = @"~/ATT\Bill_Sys_AttorneySearch.aspx";
                    }
                    else if (set.Tables[0].Rows[0][6].ToString() != "")
                    {
                        this.Session["PageRedirect"] = "~/AJAX Pages/Bill_Sys_SearchCase.aspx";
                    }
                    else
                    {
                        this.Session["PageRedirect"] = "~/Bill_Sys_BillingCompany.aspx";
                    }
                    if (set.Tables[0].Rows[0]["Force_PasswordChange"].ToString() == "True")
                    {
                        base.Response.Redirect(@"AJAX Pages\Bill_Sys_ChangePassword.aspx", false);
                        return;
                    }
                    if (str4.ToLower() == "doctor")
                    {
                        if (str.ToString().Equals("IM"))
                        {
                            base.Response.Redirect("Bill_Sys_IM_CheckOut.aspx", false);
                        }
                        else
                        {
                            base.Response.Redirect(@"AJAX Pages\Bill_Sys_PatientSearch.aspx", false);
                        }
                    }
                    else if (str4.ToLower() == "agent")
                    {
                        base.Response.Redirect(@"Agent\Bill_Sys_Agent_SearchCase.aspx", false);
                    }
                    else if (this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                    {
                        if ((str4.ToLower() == "lawfirm attorney") && (this.Session["urlintegration"] != null))
                        {
                            string str11 = this.Session["urlintegration"].ToString();
                            str11 = base.Server.UrlEncode(str11);
                            str11 = "ATT/Bill_Sys_AttorneySearch.aspx?dt=" + str11;
                            base.Response.Redirect(str11, false);
                        }
                        if (this.Session["IntDocUrl"] != null)
                        {
                            Bill_Sys_DocumentManagerObject obj3 = new Bill_Sys_DocumentManagerObject();
                            obj3 = (Bill_Sys_DocumentManagerObject)this.Session["IntDocUrl"];
                            string str12 = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                            string str13 = obj3.SZ_CASE_ID;
                            string str14 = obj3.SZ_CASE_NO;
                            string str15 = obj3.SZ_COMAPNY_ID;
                            string str16 = obj3.SZ_LAWFIRM_ID;
                            if (str12 == str16)
                            {
                                string url = "Document Manager/case/vb_CaseInformation.aspx?caseid=" + str13 + "&caseno=" + str14 + "&cmpid=" + str15;
                                base.Response.Redirect(url, false);
                            }
                            else
                            {
                                base.Response.Redirect(@"LF\Bill_Sys_SearchCase.aspx", false);
                            }
                        }
                        else
                        {
                            base.Response.Redirect(@"LF\Bill_Sys_SearchCase.aspx", false);
                        }
                    }
                    else if (this._bill_Sys_BillingCompanyObject.BT_PROVIDER.ToString().Equals("True"))
                    {
                        if (str4.ToLower() == "provider")
                        {
                            base.Response.Redirect(@"Provider\Bill_Sys_SearchCase.aspx", false);
                        }
                    }
                    else if (this._bill_Sys_BillingCompanyObject.BT_ATTORNY.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                    {
                        base.Response.Redirect(@"ATT\Bill_Sys_AttorneySearch.aspx", false);
                    }
                    else if (set.Tables[0].Rows[0][6].ToString() != "")
                    {
                        base.Response.Redirect("AJAX Pages/Bill_Sys_SearchCase.aspx", false);
                    }
                    else
                    {
                        base.Response.Redirect("Bill_Sys_BillingCompany.aspx", false);
                    }
                }
                else
                {
                    FormsAuthentication.SignOut();
                    FormsAuthentication.RedirectToLoginPage();
                }
            }
            else
            {
                lblErrorMsg.Text = "Activation failed";
            }
        }
        else
        {
            lblErrorMsg.Text = "Activation failed";
        }
    }
Exemplo n.º 14
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());
        }

        objSessionSystem           = (Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"];
        objSessionBillingCompany   = (Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"];
        objSessionCompanyAppStatus = (Bill_Sys_BillingCompanyObject)Session["APPSTATUS"];
        objSessionUser             = (Bill_Sys_UserObject)Session["USER_OBJECT"];
        btnOpenDocument.Attributes.Add("onClick", "return CheckDocument();");
        if (!IsPostBack)
        {
            txtCompanyID.Text           = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            extddlSpecialty.Flag_ID     = txtCompanyID.Text;
            Session["Refresh"]          = "1";
            chkrefreshpaidbills.Checked = true;
            if (Request.QueryString["CaseID"] != null && Request.QueryString["EProcid"] != null)
            {
                txtCaseID.Text      = Request.QueryString["CaseID"].ToString();
                txtEventProcID.Text = Request.QueryString["EProcid"].ToString();
                txtProcGroup.Text   = Request.QueryString["ProcGroup"].ToString();
                txtProcGroupID.Text = Request.QueryString["ProcGroupID"].ToString();
            }

            if (txtProcGroup.Text == "OT" || txtProcGroup.Text == "")
            {
                extddlSpecialty.Visible = true;
            }
            else
            {
                extddlSpecialty.Visible  = false;
                extddlSpecialty.Text     = txtProcGroupID.Text;
                hdnmdltxtSpeciality.Text = extddlSpecialty.Selected_Text;
            }

            try
            {
                Bill_Sys_ProcedureCode_BO _bill_Sys_ProcedureCode_BO = new Bill_Sys_ProcedureCode_BO();
                grdViewDocuments.DataSource = _bill_Sys_ProcedureCode_BO.GetDocsNew(txtCaseID.Text, txtCompanyID.Text, txtEventProcID.Text);
                grdViewDocuments.DataBind();



                DataSet sdFiles = new DataSet();
                sdFiles = GetFiledDocTypeByProcID(txtEventProcID.Text);
                if (sdFiles.Tables.Count > 0)
                {
                    if (sdFiles.Tables[0].Rows.Count > 0)
                    {
                        for (int i1 = 0; i1 < grdViewDocuments.Items.Count; i1++)
                        {
                            for (int j = 0; j < sdFiles.Tables[0].Rows.Count; j++)
                            {
                                if (grdViewDocuments.Items[i1].Cells[3].Text.Trim() == sdFiles.Tables[0].Rows[j][0].ToString().Trim())
                                {
                                    DropDownList drp = (DropDownList)grdViewDocuments.Items[i1].FindControl("ddlreport");
                                    CheckBox     chk = (CheckBox)grdViewDocuments.Items[i1].FindControl("chkView");
                                    drp.Text    = sdFiles.Tables[0].Rows[j][1].ToString().Trim();
                                    chk.Checked = 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());
        }
    }
Exemplo n.º 15
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());
        }
        oC_UserObject = (Bill_Sys_UserObject)(Session["USER_OBJECT"]);
        oC_Account    = (Bill_Sys_BillingCompanyObject)(Session["BILLING_COMPANY_OBJECT"]);
        oC_CaseObject = (Bill_Sys_CaseObject)Session["CASE_OBJECT"];

        this._associateDiagnosisCodeBO = new Bill_Sys_AssociateDiagnosisCodeBO();
        try
        {
            strContextKey = oC_Account.SZ_COMPANY_ID + "," + rbl_SZ_TYPE_ID.SelectedValue;
            this.ajDignosisCode.ContextKey = strContextKey;
            //this.btnAssign.Attributes.Add("onclick", "return validate();");
            this.txtCompanyID.Text = oC_Account.SZ_COMPANY_ID;
            this.txtDiagonosisCode.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('_ctl0_ContentPlaceHolder1_tabcontainerDiagnosisCode_tabpnlAssociate_btnSeacrh').click(); return false;}} else {alert('Other');return true;}; ");
            if (!base.IsPostBack)
            {
                this.extddlDiagnosisType.Flag_ID = oC_Account.SZ_COMPANY_ID;
                this.extddlSpeciality.Flag_ID    = oC_Account.SZ_COMPANY_ID;
                if (base.Request.QueryString["CaseId"] != null)
                {
                    this.Session["CASE_OBJECT"] = null;
                    this.txtCaseID.Text         = base.Request.QueryString["CaseId"].ToString();
                    this.GetPatientDeskList();
                }
                else if (this.Session["CASE_OBJECT"] != null)
                {
                    this.txtCaseID.Text = oC_CaseObject.SZ_CASE_ID;
                    Bill_Sys_Case @case = new Bill_Sys_Case();
                    @case.SZ_CASE_ID             = this.txtCaseID.Text;
                    this.Session["CASEINFO"]     = @case;
                    this.Session["PassedCaseID"] = this.txtCaseID.Text;
                    string str = this.Session["PassedCaseID"].ToString();
                    this.Session["QStrCaseID"]       = str;
                    this.Session["Case_ID"]          = str;
                    this.Session["Archived"]         = "0";
                    this.Session["QStrCID"]          = str;
                    this.Session["SelectedID"]       = str;
                    this.Session["DM_User_Name"]     = oC_UserObject.SZ_USER_NAME;
                    this.Session["User_Name"]        = oC_UserObject.SZ_USER_NAME;
                    this.Session["SN"]               = "0";
                    this.Session["LastAction"]       = "vb_CaseInformation.aspx";
                    this.Session["SZ_CASE_ID_NOTES"] = this.txtCaseID.Text;
                    this.Session["TM_SZ_CASE_ID"]    = this.txtCaseID.Text;
                    this.GetPatientDeskList();
                }
                else
                {
                    base.Response.Redirect("Bill_Sys_SearchCase.aspx", false);
                }
                this.strCaseType = this._associateDiagnosisCodeBO.GetCaseType(this.txtCaseID.Text);
                string text1 = base.Request.QueryString["DoctorID"];
                if (base.Request.QueryString["SetId"] != null)
                {
                    this.txtDiagnosisSetID.Text = base.Request.QueryString["SetId"].ToString();
                    this._ds = this._associateDiagnosisCodeBO.GetCaseAssociateDiagnosisDetails(this.txtDiagnosisSetID.Text);
                    this.GetDiagnosisCode(this.txtCaseID.Text, this.txtCompanyID.Text, "", "GET_DIAGNOSIS_CODE");
                    this.Visiblecontrol();
                }
                else
                {
                    this.txtDiagnosisSetID.Text = this._associateDiagnosisCodeBO.GetDiagnosisSetID();
                }
                this.GetDiagnosisCode(this.txtCaseID.Text, oC_Account.SZ_COMPANY_ID, "", "GET_DIAGNOSIS_CODE");
                this.GetAssignedDiagnosisCode(this.txtCaseID.Text, oC_Account.SZ_COMPANY_ID, "", "GET_DIAGNOSIS_CODE");
                this.grdNormalDgCode.DataSource = null;
                this.grdNormalDgCode.DataBind();
                this.extddlSpeciality.Visible = false;
                this.lblSpeciality.Visible    = false;
                if (oC_Account.BT_REFERRING_FACILITY)
                {
                    this.tabcontainerDiagnosisCode.ActiveTabIndex = 1;
                }
                else
                {
                    this.tabcontainerDiagnosisCode.ActiveTabIndex = 0;
                }

                BindGridSpecialty();
            }
            this.lblMsg.Text = "";
        }
        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 (((Bill_Sys_BillingCompanyObject)this.Session["APPSTATUS"]).SZ_READ_ONLY.ToString().Equals("True"))
        {
            new Bill_Sys_ChangeVersion(this.Page).MakeReadOnlyPage("Bill_Sys_AssociateDignosisCodeCase.aspx");
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemplo n.º 16
0
    private void UserLogin()
    {
        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());
        }
        if (this.Session["UserName"] == null)
        {
        }
        try
        {
            string str  = "";
            string str2 = "";
            if (base.Request.QueryString["name"] != null)
            {
                str2 = base.Request.QueryString["name"].ToString();
            }
            new ArrayList();
            this._bill_Sys_LoginBO = new Bill_Sys_LoginBO();
            DataSet set = new DataSet();
            set = this._bill_Sys_LoginBO.getLoginDetails(this.Session["UserName"].ToString(), str2, HttpContext.Current.Request.UserHostAddress);
            if ((set.Tables.Count > 0) && (set.Tables[0].Rows.Count > 0))
            {
                this.objAppSettings = (ApplicationSettings_BO)base.Application["OBJECT_APP_SETTINGS"];
                if (this.objAppSettings == null)
                {
                    this.objAppSettings = new ApplicationSettings_BO();
                    base.Application["OBJECT_APP_SETTINGS"] = this.objAppSettings;
                }
                if ((set.Tables[0].Rows.Count == 1) && (set.Tables[0].Rows[0][0].ToString() == "False"))
                {
                    string str3 = HttpContext.Current.Request.UserHostAddress.ToString();
                    FormsAuthentication.SignOut();
                    FormsAuthentication.RedirectToLoginPage("IPValidationCheck=false&InvalidIP=" + str3);
                    return;
                }
                this._bill_Sys_UserObject                           = new Bill_Sys_UserObject();
                this._bill_Sys_UserObject.SZ_USER_ID                = set.Tables[0].Rows[0][0].ToString();
                this._bill_Sys_UserObject.SZ_USER_NAME              = set.Tables[0].Rows[0][1].ToString();
                this._bill_Sys_UserObject.SZ_USER_ROLE              = set.Tables[0].Rows[0][4].ToString();
                this._bill_Sys_UserObject.SZ_PROVIDER_ID            = set.Tables[0].Rows[0][5].ToString();
                this._bill_Sys_UserObject.SZ_USER_ROLE_NAME         = set.Tables[0].Rows[0][8].ToString();
                this._bill_Sys_UserObject.SZ_USER_EMAIL             = set.Tables[0].Rows[0]["USER_EMAIL_ID"].ToString();
                this._bill_Sys_UserObject.DomainName                = set.Tables[0].Rows[0]["DomainName"].ToString();
                this.Session["USER_OBJECT"]                         = this._bill_Sys_UserObject;
                this._bill_Sys_BillingCompanyObject                 = new Bill_Sys_BillingCompanyObject();
                this._bill_Sys_BillingCompanyObject.SZ_COMPANY_ID   = set.Tables[0].Rows[0][2].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_COMPANY_NAME = set.Tables[0].Rows[0][3].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_PREFIX       = set.Tables[0].Rows[0][6].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_ADDRESS      = set.Tables[0].Rows[0][9].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_EMAIL        = set.Tables[0].Rows[0][10].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_PHONE        = set.Tables[0].Rows[0][11].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_FAX          = set.Tables[0].Rows[0][12].ToString();
                if (set.Tables[0].Rows[0][7].ToString() != "")
                {
                    this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY = Convert.ToBoolean(set.Tables[0].Rows[0][7].ToString());
                }
                else
                {
                    this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY = false;
                }
                if (set.Tables[0].Rows[0][13].ToString() != "")
                {
                    this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM = Convert.ToBoolean(set.Tables[0].Rows[0][13].ToString());
                }
                else
                {
                    this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM = false;
                }
                if (set.Tables[0].Rows[0]["BT_ATTORNY"].ToString() != "")
                {
                    this._bill_Sys_BillingCompanyObject.BT_ATTORNY = Convert.ToBoolean(set.Tables[0].Rows[0]["BT_ATTORNY"].ToString());
                }
                else
                {
                    this._bill_Sys_BillingCompanyObject.BT_ATTORNY = false;
                }
                if (set.Tables[0].Rows[0]["BT_PROVIDER"].ToString() != "")
                {
                    this._bill_Sys_BillingCompanyObject.BT_PROVIDER = Convert.ToBoolean(set.Tables[0].Rows[0]["BT_PROVIDER"].ToString());
                }
                else
                {
                    this._bill_Sys_BillingCompanyObject.BT_PROVIDER = false;
                }
                this.Session["BILLING_COMPANY_OBJECT"] = this._bill_Sys_BillingCompanyObject;
                //Custom schedular
                Session["Billing_Company_ID"]      = _bill_Sys_BillingCompanyObject.SZ_COMPANY_ID;
                this._bill_Sys_CaseInfo            = new Bill_Sys_Case();
                this._bill_Sys_CaseInfo.SZ_CASE_ID = "";
                this.Session["CASE_INFO"]          = this._bill_Sys_CaseInfo;
                this._bill_Sys_SystemObject        = new Bill_Sys_SystemObject();
                DataView view = new DataView(set.Tables[1]);
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00003'";
                this._bill_Sys_SystemObject.SZ_DEFAULT_LAW_FIRM = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00004'";
                this._bill_Sys_SystemObject.SZ_CHART_NO = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00007'";
                this._bill_Sys_SystemObject.SZ_LOCATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00008'";
                this._bill_Sys_SystemObject.SZ_CHECKINVALUE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00009'";
                this._bill_Sys_SystemObject.AddVisits_SearchByChartNumber = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00014'";
                this._bill_Sys_SystemObject.SZ_SHOW_PROCEDURE_CODE_ON_INTEGRATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00017'";
                this._bill_Sys_SystemObject.SZ_SHOW_PROVIDER_DISPLAY_NAME = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00018'";
                this._bill_Sys_SystemObject.SZ_SHOW_PATIENT_PHONE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00019'";
                this._bill_Sys_SystemObject.SZ_SHOW_PATIENT_SIGNATURE_FOR_NF3 = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00020'";
                this._bill_Sys_SystemObject.SZ_SHOW_DOCTOR_SIGNATURE_FOR_NF3 = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                this._bill_Sys_SystemObject.SZ_SHOW_DATE_OF_FIRST_TREATMENT  = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00022'";
                this._bill_Sys_SystemObject.SZ_SHOW_NEW_POM = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00023'";
                this._bill_Sys_SystemObject.SZ_ASSIGN_DIAGNOSIS_CODE_TO_VISIT = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00025'";
                this._bill_Sys_SystemObject.ASSOCIATE_CASE_TYPE_WITH_VISITS = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00026'";
                this._bill_Sys_SystemObject.ADD_LOCATION_TO_VISITS = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00024'";
                this._bill_Sys_SystemObject.SZ_SHOW_INSURANCE_WITH_BILL = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00029'";
                this._bill_Sys_SystemObject.SZ_ALLOW_TO_EDIT_NF2_PDF = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00028'";
                this._bill_Sys_SystemObject.SZ_SHOW_NF3_PROCEDURE_CODE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00030'";
                this._bill_Sys_SystemObject.ALLOW_TO_ADD_VISIT_FOR_FUTURE_DATE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00031'";
                this._bill_Sys_SystemObject.PHONE_FORMATE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00032'";
                this._bill_Sys_SystemObject.DONOT_ALLOW_TO_CREATE_BILL_WITHOUT_PATIENT_PHONE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00033'";
                this._bill_Sys_SystemObject.DONOT_ALLOW_TO_CREATE_BILL_WITHOUT_LOCATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00034'";
                this._bill_Sys_SystemObject.SZ_SHOW_ADD_TO_PREFERED_LIST = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00037'";
                this._bill_Sys_SystemObject.SZ_ADD_SECONDARY_INSURANCE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00038'";
                this._bill_Sys_SystemObject.SZ_SHOW_ADD_TO_PREFERED_LIST_FOR_DIAGNOSIS_CODE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00049'";
                this._bill_Sys_SystemObject.SZ_SHOW_PATIENT_WALK_IN_ON_WORKAREA = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00050'";
                this._bill_Sys_SystemObject.SZ_COPY_PATIENT_TO_TEST_FACILITY = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00054'";
                this._bill_Sys_SystemObject.SZ_HP1_Display = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00051'";
                this._bill_Sys_SystemObject.SZ_MG2_Display = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00062'";
                this._bill_Sys_SystemObject.SZ_ALLOW_TO_EDIT_CODE_AMOUNT = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00059'";
                this._bill_Sys_SystemObject.SZ_ALLOW_HP1_SIGN = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00057'";
                this._bill_Sys_SystemObject.SZ_ALLOW_MODIFIER_TO_UPDATE_FOR_PROCEDURE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00080'";
                this._bill_Sys_SystemObject.SZ_ADD_APPOINTMENT = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00082'";
                this._bill_Sys_SystemObject.SZ_ENABLE_CYCLIC_PROCEDURE_CODE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00084'";
                this._bill_Sys_SystemObject.IS_EMPLOYER = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00086'";
                this._bill_Sys_SystemObject.SZ_ENABLE_CONTRACT_PDF_GENERATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";


                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00012'";
                if (view.ToTable().Rows.Count > 0)
                {
                    if (view.ToTable().Rows[0][1].ToString() == this._bill_Sys_UserObject.SZ_USER_ID)
                    {
                        this.Session["IPAdmin"] = "True";
                    }
                    else
                    {
                        this.Session["IPAdmin"] = "False";
                    }
                }
                else
                {
                    this.Session["IPAdmin"] = "False";
                }
                DataTable table = set.Tables[2];
                foreach (DataRow row in table.Rows)
                {
                    if (row["SZ_CONFIGURATION"].ToString() == "SOFT DELETE")
                    {
                        this._bill_Sys_SystemObject.SZ_SOFT_DELETE = "True";
                    }
                    else
                    {
                        if (row["SZ_CONFIGURATION"].ToString() == "HARD DELETE")
                        {
                            this._bill_Sys_SystemObject.SZ_HARD_DELETE = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "NEW BILLS")
                        {
                            this._bill_Sys_SystemObject.SZ_NEW_BILL = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "VIEW BILLS")
                        {
                            this._bill_Sys_SystemObject.SZ_VIEW_BILL = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "DELETE BILLS")
                        {
                            this._bill_Sys_SystemObject.SZ_DELETE_BILLS = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "DELETE VISIT")
                        {
                            this._bill_Sys_SystemObject.SZ_DELETE_VIEWS = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "EMG BILL")
                        {
                            this._bill_Sys_SystemObject.SZ_EMG_BILL = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "NOTE DELETE")
                        {
                            this._bill_Sys_SystemObject.SZ_NOTE_DELETE = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "NOTE SOFT DELETE")
                        {
                            this._bill_Sys_SystemObject.SZ_NOTE_SOFT_DELETE = "True";
                        }
                    }
                }
                this.Session["SYSTEM_OBJECT"] = this._bill_Sys_SystemObject;
                this._bill_Sys_LoginBO.ChangeLoginDate(((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID);
                this.Session["REMINDER"]  = "TRUE";
                this.Session["IMDETAILS"] = "TRUE";
                string str4 = set.Tables[0].Rows[0][8].ToString();
                if (str4.ToLower() == "doctor")
                {
                    if ((set.Tables.Count > 3) && (set.Tables[3].Rows.Count > 0))
                    {
                        str = set.Tables[3].Rows[0][0].ToString();
                    }
                    if (str.ToString().Equals("IM"))
                    {
                        this.Session["PageRedirect"] = "~/Bill_Sys_IM_CheckOut.aspx";
                    }
                    else
                    {
                        this.Session["PageRedirect"] = @"~/AJAX Pages\Bill_Sys_PatientSearch.aspx";
                    }
                }
                else if (str4.ToLower() == "agent")
                {
                    this.Session["PageRedirect"] = "~/Agent/Bill_Sys_Agent_SearchCase.aspx";
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                {
                    if ((str4.ToLower() == "lawfirm attorney") && (this.Session["urlintegration"] != null))
                    {
                        string s = this.Session["urlintegration"].ToString();
                        s = base.Server.UrlEncode(s);
                        this.Session["PageRedirect"] = "~/ATT/Bill_Sys_AttorneySearch.aspx?dt=" + s;
                    }
                    if (this.Session["IntDocUrl"] != null)
                    {
                        Bill_Sys_DocumentManagerObject obj2 = new Bill_Sys_DocumentManagerObject();
                        string str6 = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                        obj2 = (Bill_Sys_DocumentManagerObject)this.Session["IntDocUrl"];
                        string str7  = obj2.SZ_CASE_ID;
                        string str8  = obj2.SZ_CASE_NO;
                        string str9  = obj2.SZ_COMAPNY_ID;
                        string str10 = obj2.SZ_LAWFIRM_ID;
                        if (str6 == str10)
                        {
                            this.Session["PageRedirect"] = "~/Document Manager/case/vb_CaseInformation.aspx?caseid=" + str7 + "&caseno=" + str8 + "&cmpid=" + str9;
                        }
                        else
                        {
                            this.Session["PageRedirect"] = @"~/LF\Bill_Sys_SearchCase.aspx";
                        }
                    }
                    else
                    {
                        this.Session["PageRedirect"] = @"~/LF\Bill_Sys_SearchCase.aspx";
                    }
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_PROVIDER.ToString().Equals("True"))
                {
                    if (str4.ToLower() == "provider")
                    {
                        this.Session["PageRedirect"] = @"~/Provider\Bill_Sys_SearchCase.aspx";
                    }
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_ATTORNY.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                {
                    this.Session["PageRedirect"] = @"~/ATT\Bill_Sys_AttorneySearch.aspx";
                }
                else if (set.Tables[0].Rows[0][6].ToString() != "")
                {
                    this.Session["PageRedirect"] = "~/AJAX Pages/Bill_Sys_SearchCase.aspx";
                }
                else
                {
                    this.Session["PageRedirect"] = "~/Bill_Sys_BillingCompany.aspx";
                }
                if (set.Tables[0].Rows[0]["Force_PasswordChange"].ToString() == "True")
                {
                    base.Response.Redirect(@"AJAX Pages\Bill_Sys_ChangePassword.aspx", false);
                    return;
                }
                if (str4.ToLower() == "doctor")
                {
                    if (str.ToString().Equals("IM"))
                    {
                        base.Response.Redirect("Bill_Sys_IM_CheckOut.aspx", false);
                    }
                    else
                    {
                        base.Response.Redirect(@"AJAX Pages\Bill_Sys_PatientSearch.aspx", false);
                    }
                }
                else if (str4.ToLower() == "agent")
                {
                    base.Response.Redirect(@"Agent\Bill_Sys_Agent_SearchCase.aspx", false);
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                {
                    if ((str4.ToLower() == "lawfirm attorney") && (this.Session["urlintegration"] != null))
                    {
                        string str11 = this.Session["urlintegration"].ToString();
                        str11 = base.Server.UrlEncode(str11);
                        str11 = "ATT/Bill_Sys_AttorneySearch.aspx?dt=" + str11;
                        base.Response.Redirect(str11, false);
                    }
                    if (this.Session["IntDocUrl"] != null)
                    {
                        Bill_Sys_DocumentManagerObject obj3 = new Bill_Sys_DocumentManagerObject();
                        obj3 = (Bill_Sys_DocumentManagerObject)this.Session["IntDocUrl"];
                        string str12 = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                        string str13 = obj3.SZ_CASE_ID;
                        string str14 = obj3.SZ_CASE_NO;
                        string str15 = obj3.SZ_COMAPNY_ID;
                        string str16 = obj3.SZ_LAWFIRM_ID;
                        if (str12 == str16)
                        {
                            string url = "Document Manager/case/vb_CaseInformation.aspx?caseid=" + str13 + "&caseno=" + str14 + "&cmpid=" + str15;
                            base.Response.Redirect(url, false);
                        }
                        else
                        {
                            base.Response.Redirect(@"LF\Bill_Sys_SearchCase.aspx", false);
                        }
                    }
                    else
                    {
                        base.Response.Redirect(@"LF\Bill_Sys_SearchCase.aspx", false);
                    }
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_PROVIDER.ToString().Equals("True"))
                {
                    if (str4.ToLower() == "provider")
                    {
                        base.Response.Redirect(@"Provider\Bill_Sys_SearchCase.aspx", false);
                    }
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_ATTORNY.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                {
                    base.Response.Redirect(@"ATT\Bill_Sys_AttorneySearch.aspx", false);
                }
                else if (set.Tables[0].Rows[0][6].ToString() != "")
                {
                    base.Response.Redirect("AJAX Pages/Bill_Sys_SearchCase.aspx", false);
                }
                else
                {
                    base.Response.Redirect("Bill_Sys_BillingCompany.aspx", false);
                }
            }
            else
            {
                FormsAuthentication.SignOut();
                FormsAuthentication.RedirectToLoginPage();
            }
            this._bill_Sys_BillingCompanyObject.SZ_READ_ONLY = this._bill_Sys_LoginBO.Readonly();
            this.Session["APPSTATUS"] = this._bill_Sys_BillingCompanyObject;
        }
        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 btnGo_Click(object sender, EventArgs e)
    {
        try
        {
            attorneycasedetailsBO _caseDetailsBO = new attorneycasedetailsBO();
            string check    = txtCaseSearch.Text.Trim();
            int    isString = 0;

            foreach (Char chTest in check)
            {
                if (!Char.IsNumber(chTest))
                {
                    // there is a character in the entered text
                    isString = 0;
                    //break;
                }
                else
                {
                    // when the user has entered the case number
                    // even if a single digit is entered by the user, it will be treated as case number
                    isString = 1;
                    break;
                }
            }

            foreach (Char chTest in check)
            {
                if (Char.IsNumber(chTest))
                {
                    isString = 2;
                    break;
                }
                else
                {
                    break;
                }
            }

            if (isString == 0)  // this means user is searching with case number
            {
                {
                    Bill_Sys_BillingCompanyObject objCompany = new Bill_Sys_BillingCompanyObject();
                    objCompany = (Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"];

                    string struserId = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID;


                    Session["CASE_LIST_GO_BUTTON"] = null;
                    //DataSet dsPatientName = _caseDetailsBO.GetCaseListPatientName(txtCaseSearch.Text.Trim(), objCompany.SZ_COMPANY_ID);

                    DataSet dsPatientName = _caseDetailsBO.QuickSearchAttorney(txtCaseSearch.Text.Trim(), objCompany.SZ_COMPANY_ID, "", struserId);
                    //Session["CASE_LIST_GO_BUTTON"] = dsPatientName; //no need to add in session

                    // if the return dataset has exactly 1 match found, the application automatically takes the user
                    // to the workarea of that case.
                    if (dsPatientName.Tables[0].Rows.Count == 1)
                    {
                        Session["CASE_OBJECT"] = null;
                        Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                        //_bill_Sys_CaseObject.SZ_CASE_ID = dsPatientName.Tables[0].Rows[0]["SZ_CASE_ID"].ToString();
                        _bill_Sys_CaseObject.SZ_CASE_ID = dsPatientName.Tables[0].Rows[0]["CaseId"].ToString();
                        //_bill_Sys_CaseObject.SZ_PATIENT_ID = dsPatientName.Tables[0].Rows[0]["SZ_PATIENT_ID"].ToString();
                        _bill_Sys_CaseObject.SZ_PATIENT_ID = dsPatientName.Tables[0].Rows[0]["PatientId"].ToString();
                        //_bill_Sys_CaseObject.SZ_PATIENT_NAME = dsPatientName.Tables[0].Rows[0]["SZ_PATIENT_NAME"].ToString();
                        _bill_Sys_CaseObject.SZ_PATIENT_NAME = dsPatientName.Tables[0].Rows[0]["PatientName"].ToString();
                        //_bill_Sys_CaseObject.SZ_COMAPNY_ID = dsPatientName.Tables[0].Rows[0]["SZ_COMPANY_ID"].ToString();
                        _bill_Sys_CaseObject.SZ_COMAPNY_ID = dsPatientName.Tables[0].Rows[0]["CompanyId"].ToString();

                        //_bill_Sys_CaseObject.SZ_CASE_NO = dsPatientName.Tables[0].Rows[0]["SZ_CASE_NO"].ToString();
                        _bill_Sys_CaseObject.SZ_CASE_NO = dsPatientName.Tables[0].Rows[0]["CaseNo"].ToString();

                        Session["CASE_OBJECT"] = _bill_Sys_CaseObject;
                        //Session["PassedCaseID"] = dsPatientName.Tables[0].Rows[0]["SZ_CASE_NO"].ToString();
                        Session["PassedCaseID"] = dsPatientName.Tables[0].Rows[0]["CaseNo"].ToString();

                        // add for to check login user is attroney
                        if (((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ROLE_NAME.ToLower().Equals("attorney"))
                        {
                            string caseid    = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                            string companyid = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;

                            //logic for encrypt-decrypt

                            String strPassPhrase         = "Pas5pr@se";        // can be any string
                            String strSaltValue          = "s@1tValue";        // can be any string
                            String strHashAlgorithm      = "SHA1";             // can be "MD5"
                            int    intPasswordIterations = 2;                  // can be any number
                            String strInitVector         = "@1B2c3D4e5F6g7H8"; // must be 16 bytes
                            int    intKeySize            = 256;

                            string url = "CaseID=" + caseid + "&" + "cmp=" + companyid + "'";

                            string encrypt = Bill_Sys_EncryDecry.Encrypt(url, strPassPhrase, strSaltValue, strHashAlgorithm, intPasswordIterations, strInitVector, intKeySize);

                            string encrypturl = WebUtils.EncodeUrlString(encrypt);

                            // test.NavigateUrl = "~/AJAX%20Pages/atcasedetails.aspx?" + "dt=" + encrypturl;
                            if (Session["AJAXPage"].ToString() == "Yes")
                            {
                                Response.Redirect("atcasedetails.aspx?" + "dt=" + encrypturl, false);
                            }
                            else
                            {
                                Response.Redirect("AJAX%20Pages/atcasedetails.aspx?" + "dt=" + encrypturl, false);
                            }
                        }
                        // end//
                        else
                        {
                            // check whether the login user is from a billing company or test facility.
                            // if billing co. then take him to Bill_Sys_CaseDetails else to Bill_Sys_ReCaseDetails
                            if (objCompany.BT_REFERRING_FACILITY == true)
                            {
                                if (Session["AJAXPage"].ToString() == "Yes")
                                {
                                    Response.Redirect("Bill_Sys_ReCaseDetails.aspx", false);
                                }
                                else
                                {
                                    Response.Redirect("AJAX%20Pages/Bill_Sys_ReCaseDetails.aspx", false);
                                }
                            }
                            else
                            {
                                if (Session["AJAXPage"].ToString() == "Yes")
                                {
                                    Response.Redirect("Bill_Sys_CaseDetails.aspx", false);
                                }
                                else
                                {
                                    Response.Redirect("AJAX%20Pages/Bill_Sys_CaseDetails.aspx", false);
                                }
                            }
                        }
                    }
                    else // if there are more than 1 rows returned by the search, reload the list page and bind the grid
                    {
                        Session["CASE_LIST_GO_BUTTON"] = txtCaseSearch.Text;
                        if (Session["AJAXPage"].ToString() == "Yes")
                        {
                            Response.Redirect("Bill_Sys_SearchCase.aspx", false);
                        }
                        else
                        {
                            Response.Redirect("AJAX Pages/Bill_Sys_SearchCase.aspx", false);
                        }
                    }
                }
            } // execute this block when the user searches by case number
            else if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true && isString == 1)
            {
                // example: TM702
                int len = check.Length;
                int i   = 0;
                foreach (Char chTest in check)
                {
                    if (!Char.IsNumber(chTest))
                    {
                        i++;
                    }
                }

                string sz_CompanyPrefix = (check.Substring(0, i));
                string sz_CaseNo        = check.Substring(2);
                string struserId        = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID;

                DataSet ds = _caseDetailsBO.QuickSearchAttorney(txtCaseSearch.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, sz_CompanyPrefix, struserId);


                //if (_caseDetailsBO.CheckCaseExistsWithPrefix(sz_CompanyPrefix, sz_CaseNo, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID) == true)
                if (ds.Tables[0].Rows.Count > 0)
                {
                    Session["CASE_OBJECT"] = null;
                    Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                    //_bill_Sys_CaseObject.SZ_CASE_ID = _caseDetailsBO.GetCaseID(check, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    _bill_Sys_CaseObject.SZ_CASE_ID = ds.Tables[0].Rows[0]["CaseId"].ToString();

                    //_bill_Sys_CaseObject.SZ_PATIENT_ID = _caseDetailsBO.GetCasePatientID(_bill_Sys_CaseObject.SZ_CASE_ID, "");
                    _bill_Sys_CaseObject.SZ_PATIENT_ID = ds.Tables[0].Rows[0]["patientId"].ToString();

                    //_bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                    _bill_Sys_CaseObject.SZ_PATIENT_NAME = ds.Tables[0].Rows[0]["PatientName"].ToString();

                    //_bill_Sys_CaseObject.SZ_COMAPNY_ID = _caseDetailsBO.GetPatientCompanyID(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                    _bill_Sys_CaseObject.SZ_COMAPNY_ID = ds.Tables[0].Rows[0]["CompanyId"].ToString();

                    _bill_Sys_CaseObject.SZ_CASE_NO = check;
                    Session["CASE_OBJECT"]          = _bill_Sys_CaseObject;
                    Session["PassedCaseID"]         = check;

                    // add for to check login user is attroney
                    if (((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ROLE_NAME.ToLower().Equals("attorney"))
                    {
                        string caseid    = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                        string companyid = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;

                        //logic for encrypt-decrypt

                        String strPassPhrase         = "Pas5pr@se";        // can be any string
                        String strSaltValue          = "s@1tValue";        // can be any string
                        String strHashAlgorithm      = "SHA1";             // can be "MD5"
                        int    intPasswordIterations = 2;                  // can be any number
                        String strInitVector         = "@1B2c3D4e5F6g7H8"; // must be 16 bytes
                        int    intKeySize            = 256;

                        string url = "CaseID=" + caseid + "&" + "cmp=" + companyid + "'";

                        string encrypt = Bill_Sys_EncryDecry.Encrypt(url, strPassPhrase, strSaltValue, strHashAlgorithm, intPasswordIterations, strInitVector, intKeySize);

                        string encrypturl = WebUtils.EncodeUrlString(encrypt);

                        if (Session["AJAXPage"].ToString() == "Yes")
                        {
                            Response.Redirect("atcasedetails.aspx?" + "dt=" + encrypturl, false);
                        }
                        else
                        {
                            Response.Redirect("AJAX%20Pages/atcasedetails.aspx?" + "dt=" + encrypturl, false);
                        }
                    }
                    else
                    {
                        if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
                        {
                            if (Session["AJAXPage"].ToString() == "Yes")
                            {
                                Response.Redirect("Bill_Sys_ReCaseDetails.aspx", false);
                            }
                            else
                            {
                                Response.Redirect("AJAX%20Pages/Bill_Sys_ReCaseDetails.aspx", false);
                            }
                        }
                        else
                        {
                            if (Session["AJAXPage"].ToString() == "Yes")
                            {
                                Response.Redirect("Bill_Sys_CaseDetails.aspx", false);
                            }
                            else
                            {
                                Response.Redirect("AJAX%20Pages/Bill_Sys_CaseDetails.aspx", false);
                            }
                        }
                    }
                }
            }
            else if (isString == 2)// the user is searching by case number --- CASE I
            {
                // we dont need to chcek if case exists in this separate procedure

                // create object of app_code. call new function, pass case number and company id
                // in the procedure, check if you get data.. if yes, set properties those are set below.. else do nothing.
                DataSet ds        = new DataSet();
                string  struserId = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID;

                ds = _caseDetailsBO.QuickSearchAttorney(txtCaseSearch.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, "", struserId);

                //if (_caseDetailsBO.CheckCaseExists(txtCaseSearch.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID) == true)
                if (ds.Tables[0].Rows.Count > 0)
                {
                    Session["CASE_OBJECT"] = null;
                    Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();

                    //_bill_Sys_CaseObject.SZ_CASE_ID = _caseDetailsBO.GetCaseID(txtCaseSearch.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    _bill_Sys_CaseObject.SZ_CASE_ID = ds.Tables[0].Rows[0]["caseId"].ToString();

                    //_bill_Sys_CaseObject.SZ_PATIENT_ID = _caseDetailsBO.GetCasePatientID(_bill_Sys_CaseObject.SZ_CASE_ID, "");
                    _bill_Sys_CaseObject.SZ_PATIENT_ID = ds.Tables[0].Rows[0]["PatientId"].ToString();

                    //_bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                    _bill_Sys_CaseObject.SZ_PATIENT_NAME = ds.Tables[0].Rows[0]["PatientName"].ToString();

                    //_bill_Sys_CaseObject.SZ_COMAPNY_ID = _caseDetailsBO.GetPatientCompanyID(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                    _bill_Sys_CaseObject.SZ_COMAPNY_ID = ds.Tables[0].Rows[0]["CompanyId"].ToString();

                    //_bill_Sys_CaseObject.SZ_CASE_NO = txtCaseSearch.Text;
                    string StrCaseNo = ds.Tables[0].Rows[0]["CASENO"].ToString();
                    _bill_Sys_CaseObject.SZ_CASE_NO = StrCaseNo.Replace(" ", "");

                    Session["CASE_OBJECT"]  = _bill_Sys_CaseObject;
                    Session["PassedCaseID"] = txtCaseSearch.Text;

                    // add for to check login user is attroney
                    if (((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ROLE_NAME.ToLower().Equals("attorney"))
                    {
                        string caseid    = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                        string companyid = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;

                        //logic for encrypt-decrypt

                        String strPassPhrase         = "Pas5pr@se";        // can be any string
                        String strSaltValue          = "s@1tValue";        // can be any string
                        String strHashAlgorithm      = "SHA1";             // can be "MD5"
                        int    intPasswordIterations = 2;                  // can be any number
                        String strInitVector         = "@1B2c3D4e5F6g7H8"; // must be 16 bytes
                        int    intKeySize            = 256;

                        string url = "CaseID=" + caseid + "&" + "cmp=" + companyid + "'";

                        string encrypt = Bill_Sys_EncryDecry.Encrypt(url, strPassPhrase, strSaltValue, strHashAlgorithm, intPasswordIterations, strInitVector, intKeySize);

                        string encrypturl = WebUtils.EncodeUrlString(encrypt);

                        if (Session["AJAXPage"].ToString() == "Yes")
                        {
                            Response.Redirect("atcasedetails.aspx?" + "dt=" + encrypturl, false);
                        }
                        else
                        {
                            Response.Redirect("AJAX%20Pages/atcasedetails.aspx?" + "dt=" + encrypturl, false);
                        }
                    }
                    else
                    {
                        if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
                        {
                            if (Session["AJAXPage"].ToString() == "Yes")
                            {
                                Response.Redirect("Bill_Sys_ReCaseDetails.aspx", false);
                            }
                            else
                            {
                                Response.Redirect("AJAX%20Pages/Bill_Sys_ReCaseDetails.aspx", false);
                            }
                        }
                        else
                        {
                            if (Session["AJAXPage"].ToString() == "Yes")
                            {
                                Response.Redirect("Bill_Sys_CaseDetails.aspx", false);
                            }
                            else
                            {
                                Response.Redirect("AJAX%20Pages/Bill_Sys_CaseDetails.aspx", false);
                            }
                        }
                    }
                }
            }
        }
        catch
        {
        }
    }
Exemplo n.º 18
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());
        }
        btnSendMail.Attributes.Add("onclick", "return Confirm_Send_Mail();");
        try
        {
            oC_UserObject   = (Bill_Sys_UserObject)(Session["USER_OBJECT"]);
            oC_Account      = (Bill_Sys_BillingCompanyObject)(Session["BILLING_COMPANY_OBJECT"]);
            oC_SystemObject = (Bill_Sys_SystemObject)(Session["SYSTEM_OBJECT"]);

            if (oC_Account == null || oC_UserObject == null || oC_SystemObject == null)
            {
                DisableInput();
                lblMessage.Text      = "Oops! Your session has expired. You must re-login to proceed !";
                lblMessage.ForeColor = Color.Red;
                return;
            }

            if (!IsPostBack)
            {
                txtCompanyID.Text = oC_Account.SZ_COMPANY_ID;
                //setLabels();
                if ((oC_SystemObject.SZ_LOCATION == "1"))
                {
                    extddlLocation.Visible  = true;
                    lblLocationName.Visible = true;

                    extddlLocation.Flag_ID = txtCompanyID.Text.ToString();
                }
                extddlCaseType.Flag_ID = txtCompanyID.Text.ToString();
                //call to procedure
                /// extddlCaseType.Text=
                _bill_Sys_BillingCompanyDetails_BO = new Bill_Sys_BillingCompanyDetails_BO();

                extddlCaseType.Text = _bill_Sys_BillingCompanyDetails_BO.getNF2CaseType(txtCompanyID.Text);

                BindGrid();
            }
        }
        catch (Exception ex)
        {
            //string strError = ex.Message.ToString();
            //strError = strError.Replace("\n", " ");
            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);
        }

        #region "check version readonly or not"
        string app_status = oC_Account.SZ_READ_ONLY.ToString();
        if (app_status.Equals("True"))
        {
            Bill_Sys_ChangeVersion cv = new Bill_Sys_ChangeVersion(this.Page);
            cv.MakeReadOnlyPage("Bill_Sys_ShowUnSentNF2.aspx");
        }
        #endregion
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemplo n.º 19
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());
        }
        this.objSessionSystem            = (Bill_Sys_SystemObject)this.Session["SYSTEM_OBJECT"];
        this.objSessionBillingCompany    = (Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"];
        this.objSessionCompanyAppStatus  = (Bill_Sys_BillingCompanyObject)this.Session["APPSTATUS"];
        this.objSessionUser              = (Bill_Sys_UserObject)this.Session["USER_OBJECT"];
        this.con1.SourceGrid             = this.grdpaidbills;
        this.txtSearchBox1.SourceGrid    = this.grdpaidbills;
        this.grdpaidbills.Page           = this.Page;
        this.grdpaidbills.PageNumberList = this.con1;
        this.XGridPaginationDropDownUnPaid.SourceGrid = this.grdBills;
        this.XGridSearchTextBoxUnPaid.SourceGrid      = this.grdBills;
        this.grdBills.Page           = this.Page;
        this.grdBills.PageNumberList = this.XGridPaginationDropDownUnPaid;
        this.txtUpdate1.Attributes.Add("onclick", "javascript:CloseEditProcPopup();");
        this.txtUpdate2.Attributes.Add("onclick", "javascript:CloseDocumentPopup();");
        this.txtUpdate3.Attributes.Add("onclick", "javascript:CloseDocPopup();");
        this.txtUpdate4.Attributes.Add("onclick", "javascript:CloseDocPopup();");
        this.ddlDateValues.Attributes.Add("onChange", "javascript:SetVisitDate();");
        try
        {
            if (base.Request.QueryString["popup"] != null)
            {
                if (base.Request.QueryString["popup"].ToString().Equals("done"))
                {
                    this.lblMsg.Text    = "Report received successfully.";
                    this.lblMsg.Visible = true;
                }
                if (base.Request.QueryString["popup"].ToString().Equals("done1"))
                {
                    this.lblMsg.Visible = false;
                }
            }
            if (!base.IsPostBack)
            {
                this.txtCompanyid.Text = this.objSessionBillingCompany.SZ_COMPANY_ID;
                if (this.lblMsg.Text.Equals(""))
                {
                    this.lblMsg.Visible = false;
                }
                if (base.Request.QueryString["Flag"] != null)
                {
                    if (base.Request.QueryString["Flag"].ToString().ToLower() == "paid")
                    {
                        this.lblHeader.Text  = "Paid Bills";
                        this.txtHeading.Text = "Paid Bills";
                        this.BindBillsGrid("paid");
                    }
                    else if (base.Request.QueryString["Flag"].ToString().ToLower() == "unpaid")
                    {
                        this.lblHeader.Text  = "Un-Paid Bills";
                        this.txtHeading.Text = "Un-Paid Bills";
                        this.BindBillsGrid("unpaid");
                    }
                    else if (base.Request.QueryString["Flag"].ToString().ToLower() == "missingattorney")
                    {
                        this.lblHeader.Text = "Missing Attorney";
                    }
                    else if (base.Request.QueryString["Flag"].ToString().ToLower() == "missinginsurancecompany")
                    {
                        this.lblHeader.Text = "Missing Insurance Company";
                    }
                    else if (base.Request.QueryString["Flag"].ToString().ToLower() == "missingprovider")
                    {
                        this.lblHeader.Text = "Missing Provider";
                    }
                    else if (base.Request.QueryString["Flag"].ToString().ToLower() == "missingclaimnumber")
                    {
                        this.lblHeader.Text = "Missing Claim Number";
                    }
                    else if (base.Request.QueryString["Flag"].ToString().ToLower() == "missingreportnumber")
                    {
                        this.lblHeader.Text = "Missing Report Number";
                    }
                    else if (base.Request.QueryString["Flag"].ToString().ToLower() == "missingpolicyholder")
                    {
                        this.lblHeader.Text = "Missing Policy Holder";
                    }
                    else if ((base.Request.QueryString["Flag"].ToString().ToLower() == "report") && (base.Request.QueryString["Type"] != null))
                    {
                        if (base.Request.QueryString["Type"].ToString() == "R")
                        {
                            this.lblHeader.Text = "Received Report";
                            this.BindGridQueryString("True");
                        }
                        else
                        {
                            this.lblHeader.Text  = "Pending Report";
                            this.txtHeading.Text = "Pending Report";
                            this.BindGridQueryString("False");
                        }
                    }
                }
                if (this.objSessionSystem.SZ_CHART_NO == "0")
                {
                    this.grdpaidbills.Columns[1].Visible = false;
                    this.grdBills.Columns[4].Visible     = false;
                }
                else
                {
                    this.grdBills.Columns[4].Visible = true;
                }
                if (this.objSessionSystem.SZ_SHOW_PROCEDURE_CODE_ON_INTEGRATION != "1")
                {
                    this.ddlDateValues.Visible  = false;
                    this.lblvisitdate.Visible   = false;
                    this.lblfrom.Visible        = false;
                    this.lblto.Visible          = false;
                    this.txtVisitDate.Visible   = false;
                    this.imgVisit.Visible       = false;
                    this.btnSearch.Visible      = false;
                    this.txtToVisitDate.Visible = false;
                    this.imgVisite1.Visible     = false;
                }
                else
                {
                    this.ddlDateValues.Visible  = true;
                    this.lblvisitdate.Visible   = true;
                    this.lblfrom.Visible        = true;
                    this.lblto.Visible          = true;
                    this.txtVisitDate.Visible   = true;
                    this.imgVisit.Visible       = true;
                    this.btnSearch.Visible      = true;
                    this.txtToVisitDate.Visible = true;
                    this.imgVisite1.Visible     = true;
                }
            }
            this.txtVisit.Text = this.drpdown_Documents.SelectedValue.ToString();
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("../Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        if (this.objSessionCompanyAppStatus.SZ_READ_ONLY.ToString().Equals("True"))
        {
            new Bill_Sys_ChangeVersion(this.Page).MakeReadOnlyPage("Bill_Sys_paid_bills.aspx");
        }

        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemplo n.º 20
0
    protected void btnGo_Click(object sender, EventArgs e)
    {
        try
        {
            CaseDetailsBO _caseDetailsBO = new CaseDetailsBO();
            string        check          = txtCaseSearch.Text.Trim();
            int           isString       = 0;

            foreach (Char chTest in check)
            {
                if (!Char.IsNumber(chTest))
                {
                    // there is a character in the entered text
                    isString = 0;
                    //break;
                }
                else
                {
                    // when the user has entered the case number
                    // even if a single digit is entered by the user, it will be treated as case number
                    isString = 1;
                    break;
                }
            }

            foreach (Char chTest in check)
            {
                if (Char.IsNumber(chTest))
                {
                    isString = 2;
                    break;
                }
                else
                {
                    break;
                }
            }

            if (isString == 0)  // this means user is searching with case number
            {
                {
                    Bill_Sys_BillingCompanyObject objCompany = new Bill_Sys_BillingCompanyObject();
                    objCompany = (Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"];
                    Session["CASE_LIST_GO_BUTTON"] = null;
                    //DataSet dsPatientName = _caseDetailsBO.GetCaseListPatientName(txtCaseSearch.Text.Trim(), objCompany.SZ_COMPANY_ID);
                    DataSet dsPatientName = _caseDetailsBO.QuickSearch(txtCaseSearch.Text.Trim(), objCompany.SZ_COMPANY_ID, "");
                    //Session["CASE_LIST_GO_BUTTON"] = dsPatientName; //no need to add in session

                    // if the return dataset has exactly 1 match found, the application automatically takes the user
                    // to the workarea of that case.
                    if (dsPatientName.Tables[0].Rows.Count == 1)
                    {
                        Session["CASE_OBJECT"] = null;
                        Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                        //_bill_Sys_CaseObject.SZ_CASE_ID = dsPatientName.Tables[0].Rows[0]["SZ_CASE_ID"].ToString();
                        _bill_Sys_CaseObject.SZ_CASE_ID = dsPatientName.Tables[0].Rows[0]["CaseId"].ToString();
                        //_bill_Sys_CaseObject.SZ_PATIENT_ID = dsPatientName.Tables[0].Rows[0]["SZ_PATIENT_ID"].ToString();
                        _bill_Sys_CaseObject.SZ_PATIENT_ID = dsPatientName.Tables[0].Rows[0]["PatientId"].ToString();
                        //_bill_Sys_CaseObject.SZ_PATIENT_NAME = dsPatientName.Tables[0].Rows[0]["SZ_PATIENT_NAME"].ToString();
                        _bill_Sys_CaseObject.SZ_PATIENT_NAME = dsPatientName.Tables[0].Rows[0]["PatientName"].ToString();
                        //_bill_Sys_CaseObject.SZ_COMAPNY_ID = dsPatientName.Tables[0].Rows[0]["SZ_COMPANY_ID"].ToString();
                        _bill_Sys_CaseObject.SZ_COMAPNY_ID = dsPatientName.Tables[0].Rows[0]["CompanyId"].ToString();

                        //_bill_Sys_CaseObject.SZ_CASE_NO = dsPatientName.Tables[0].Rows[0]["SZ_CASE_NO"].ToString();
                        _bill_Sys_CaseObject.SZ_CASE_NO = dsPatientName.Tables[0].Rows[0]["CaseNo"].ToString();

                        Session["CASE_OBJECT"] = _bill_Sys_CaseObject;
                        //Session["PassedCaseID"] = dsPatientName.Tables[0].Rows[0]["SZ_CASE_NO"].ToString();
                        Session["PassedCaseID"] = dsPatientName.Tables[0].Rows[0]["CaseNo"].ToString();

                        // check whether the login user is from a billing company or test facility.
                        // if billing co. then take him to Bill_Sys_CaseDetails else to Bill_Sys_ReCaseDetails
                        if (objCompany.BT_REFERRING_FACILITY == true)
                        {
                            if (Session["AJAXPage"].ToString() == "Yes")
                            {
                                Response.Redirect("Bill_Sys_ReCaseDetails.aspx", false);
                            }
                            else
                            {
                                Response.Redirect("AJAX%20Pages/Bill_Sys_ReCaseDetails.aspx", false);
                            }
                        }
                        else
                        {
                            if (Session["AJAXPage"].ToString() == "Yes")
                            {
                                Response.Redirect("Bill_Sys_CaseDetails.aspx", false);
                            }
                            else
                            {
                                Response.Redirect("AJAX%20Pages/Bill_Sys_CaseDetails.aspx", false);
                            }
                        }
                    }
                    else // if there are more than 1 rows returned by the search, reload the list page and bind the grid
                    {
                        Session["CASE_LIST_GO_BUTTON"] = txtCaseSearch.Text;
                        if (Session["AJAXPage"].ToString() == "Yes")
                        {
                            Response.Redirect("Bill_Sys_SearchCase.aspx", false);
                        }
                        else
                        {
                            Response.Redirect("AJAX Pages/Bill_Sys_SearchCase.aspx", false);
                        }
                    }
                }
            } // execute this block when the user searches by case number
            else if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true && isString == 1)
            {
                // example: TM702
                int len = check.Length;
                int i   = 0;
                foreach (Char chTest in check)
                {
                    if (!Char.IsNumber(chTest))
                    {
                        i++;
                    }
                }

                string sz_CompanyPrefix = (check.Substring(0, i));
                string sz_CaseNo        = check.Substring(2);

                DataSet ds = _caseDetailsBO.QuickSearch(txtCaseSearch.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, sz_CompanyPrefix);

                //if (_caseDetailsBO.CheckCaseExistsWithPrefix(sz_CompanyPrefix, sz_CaseNo, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID) == true)
                if (ds.Tables[0].Rows.Count > 0)
                {
                    Session["CASE_OBJECT"] = null;
                    Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                    //_bill_Sys_CaseObject.SZ_CASE_ID = _caseDetailsBO.GetCaseID(check, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    _bill_Sys_CaseObject.SZ_CASE_ID = ds.Tables[0].Rows[0]["CaseId"].ToString();

                    //_bill_Sys_CaseObject.SZ_PATIENT_ID = _caseDetailsBO.GetCasePatientID(_bill_Sys_CaseObject.SZ_CASE_ID, "");
                    _bill_Sys_CaseObject.SZ_PATIENT_ID = ds.Tables[0].Rows[0]["patientId"].ToString();

                    //_bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                    _bill_Sys_CaseObject.SZ_PATIENT_NAME = ds.Tables[0].Rows[0]["PatientName"].ToString();

                    //_bill_Sys_CaseObject.SZ_COMAPNY_ID = _caseDetailsBO.GetPatientCompanyID(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                    _bill_Sys_CaseObject.SZ_COMAPNY_ID = ds.Tables[0].Rows[0]["CompanyId"].ToString();

                    _bill_Sys_CaseObject.SZ_CASE_NO = check;
                    Session["CASE_OBJECT"]          = _bill_Sys_CaseObject;
                    Session["PassedCaseID"]         = check;

                    if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
                    {
                        if (Session["AJAXPage"].ToString() == "Yes")
                        {
                            Response.Redirect("Bill_Sys_ReCaseDetails.aspx", false);
                        }
                        else
                        {
                            Response.Redirect("AJAX%20Pages/Bill_Sys_ReCaseDetails.aspx", false);
                        }
                    }
                    else
                    {
                        if (Session["AJAXPage"].ToString() == "Yes")
                        {
                            Response.Redirect("Bill_Sys_CaseDetails.aspx", false);
                        }
                        else
                        {
                            Response.Redirect("AJAX%20Pages/Bill_Sys_CaseDetails.aspx", false);
                        }
                    }
                }
            }
            else if (isString == 2)// the user is searching by case number --- CASE I
            {
                // we dont need to chcek if case exists in this separate procedure

                // create object of app_code. call new function, pass case number and company id
                // in the procedure, check if you get data.. if yes, set properties those are set below.. else do nothing.
                DataSet ds = new DataSet();
                ds = _caseDetailsBO.QuickSearch(txtCaseSearch.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, "");

                //if (_caseDetailsBO.CheckCaseExists(txtCaseSearch.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID) == true)
                if (ds.Tables[0].Rows.Count > 0)
                {
                    Session["CASE_OBJECT"] = null;
                    Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();

                    //_bill_Sys_CaseObject.SZ_CASE_ID = _caseDetailsBO.GetCaseID(txtCaseSearch.Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                    _bill_Sys_CaseObject.SZ_CASE_ID = ds.Tables[0].Rows[0]["caseId"].ToString();

                    //_bill_Sys_CaseObject.SZ_PATIENT_ID = _caseDetailsBO.GetCasePatientID(_bill_Sys_CaseObject.SZ_CASE_ID, "");
                    _bill_Sys_CaseObject.SZ_PATIENT_ID = ds.Tables[0].Rows[0]["PatientId"].ToString();

                    //_bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                    _bill_Sys_CaseObject.SZ_PATIENT_NAME = ds.Tables[0].Rows[0]["PatientName"].ToString();

                    //_bill_Sys_CaseObject.SZ_COMAPNY_ID = _caseDetailsBO.GetPatientCompanyID(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                    _bill_Sys_CaseObject.SZ_COMAPNY_ID = ds.Tables[0].Rows[0]["CompanyId"].ToString();

                    //_bill_Sys_CaseObject.SZ_CASE_NO = txtCaseSearch.Text;
                    string StrCaseNo = ds.Tables[0].Rows[0]["CASENO"].ToString();
                    _bill_Sys_CaseObject.SZ_CASE_NO = StrCaseNo.Replace(" ", "");

                    Session["CASE_OBJECT"]  = _bill_Sys_CaseObject;
                    Session["PassedCaseID"] = txtCaseSearch.Text;

                    if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
                    {
                        if (Session["AJAXPage"].ToString() == "Yes")
                        {
                            Response.Redirect("Bill_Sys_ReCaseDetails.aspx", false);
                        }
                        else
                        {
                            Response.Redirect("AJAX%20Pages/Bill_Sys_ReCaseDetails.aspx", false);
                        }
                    }
                    else
                    {
                        if (Session["AJAXPage"].ToString() == "Yes")
                        {
                            Response.Redirect("Bill_Sys_CaseDetails.aspx", false);
                        }
                        else
                        {
                            Response.Redirect("AJAX%20Pages/Bill_Sys_CaseDetails.aspx", false);
                        }
                    }
                }
            }
        }
        catch
        {
        }
    }
Exemplo n.º 21
0
    public 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());
        }
        int  num  = 0;
        bool flag = false;

        try
        {
            this.txtPatientName.Text = this.txtPatientName.Text.Replace("'", "");
            this.txtPatientName.Text = this.txtPatientName.Text.Replace("\"", "");
            DataTable dataTable = new DataTable();
            dataTable.Columns.Add("SZ_COLOR_CODE");
            dataTable.Columns.Add("SZ_CASE_ID");
            dataTable.Columns.Add("sz_ID");
            dataTable.Columns.Add("SZ_CASE_NAME");
            dataTable.Columns.Add("SZ_CASE_NO");
            dataTable.Columns.Add("SZ_CASE_TYPE_ID");
            dataTable.Columns.Add("BT_DELETE");
            dataTable.Columns.Add("SZ_CHART_NO");
            dataTable.Columns.Add("SZ_PATIENT_ID");
            dataTable.Columns.Add("DT_DATE_OF_ACCIDENT");
            dataTable.Columns.Add("SZ_APPOINTMENT");
            dataTable.Columns.Add("SZ_PATIENT_NAME");
            dataTable.Columns.Add("sz_chart_number");
            dataTable.Columns.Add("i_rfo_chart_no");
            dataTable.Columns.Add("SZ_CASE_TYPE_NAME");
            dataTable.Columns.Add("BT_ASSOCIATE_DIAGNOSIS_CODE");
            dataTable.Columns.Add("SZ_COMPANY_ID");
            dataTable.Columns.Add("SZ_COMPANY_NAME");
            dataTable.Columns.Add("DT_CREATED_DATE");

            if (this.Chkmult.Checked && this.txtPatientName.Text != "" && this.txtCaseNo.Text.Trim().Length == 0 && this.txtChartNumber.Text.Trim().Length == 0 && (this.extddlLocation.Text == "NA" || this.extddlLocation.Text == "") && this.grdCaseMaster.Items.Count > 0)
            {
                for (int i = 0; i < this.grdCaseMaster.Items.Count; i++)
                {
                    DataRow text = dataTable.NewRow();
                    text["SZ_CASE_ID"]          = this.grdCaseMaster.Items[i].Cells[2].Text;
                    text["SZ_CASE_NO"]          = this.grdCaseMaster.Items[i].Cells[1].Text;
                    text["SZ_PATIENT_ID"]       = this.grdCaseMaster.Items[i].Cells[3].Text;
                    text["DT_DATE_OF_ACCIDENT"] = this.grdCaseMaster.Items[i].Cells[6].Text;
                    text["SZ_PATIENT_NAME"]     = this.grdCaseMaster.Items[i].Cells[4].Text;
                    text["sz_chart_number"]     = this.grdCaseMaster.Items[i].Cells[8].Text;
                    text["i_rfo_chart_no"]      = this.grdCaseMaster.Items[i].Cells[9].Text;
                    text["SZ_CASE_TYPE_NAME"]   = this.grdCaseMaster.Items[i].Cells[5].Text;
                    text["DT_CREATED_DATE"]     = this.grdCaseMaster.Items[i].Cells[7].Text;
                    dataTable.Rows.Add(text);
                }
            }
            string caseList = "";
            if (this.txtCaseNo.Text.Trim().Length != 0)
            {
                caseList = this.getCaseList();
            }
            SQLToDAO sQLToDAO = new SQLToDAO(ConfigurationManager.AppSettings["Connection_String"]);
            AddVisit addVisit = new AddVisit();
            if (this.txtChartNumber.Text.Trim().Length != 0)
            {
                addVisit.sz_chart_number = this.getChartNumberList();
            }
            if (!this.RowLocation.Visible)
            {
                addVisit.sz_company_id   = this.txtCompanyID.Text;
                addVisit.sz_case_no      = caseList;
                addVisit.sz_patient_name = this.txtPatientName.Text;
                addVisit.sz_location_id  = "";
                addVisit.sz_case_status  = this.rdoISActivePatient.SelectedValue.ToString();
            }
            else
            {
                addVisit.sz_company_id   = this.txtCompanyID.Text;
                addVisit.sz_case_no      = caseList;
                addVisit.sz_patient_name = this.txtPatientName.Text;
                addVisit.sz_location_id  = extddlLocation.Text;
                addVisit.sz_case_status  = this.rdoISActivePatient.SelectedValue.ToString();
            }
            DataTable dataTable1 = new DataTable();
            DataTable dataTable2 = new DataTable();
            DataSet   dataSet    = new DataSet();
            string[]  strArrays  = new string[] { "0" };
            if (caseList != "")
            {
                strArrays = this._caseno.Split(new char[] { ',' });
                dataSet   = sQLToDAO.LoadDataSet("sp_search_added_visits", "mbs.dao.AddVisit", addVisit, "mbs.dao");
                dataTable1.Columns.Add("sz_case_no");
                dataTable1.Columns.Add("sz_Case_id");
                dataTable1.Columns.Add("sz_patient_id");
                dataTable1.Columns.Add("sz_patient_name");
                dataTable1.Columns.Add("sz_Case_type_name");
                dataTable1.Columns.Add("dt_date_of_accident");
                dataTable1.Columns.Add("dt_created_Date");
                dataTable1.Columns.Add("sz_chart_number");
                dataTable1.Columns.Add("i_rfo_chart_no");
            }
            if (strArrays[0].ToString() != "0")
            {
                for (int j = 0; (int)strArrays.Length > j; j++)
                {
                    if (strArrays[j].ToString() == "")
                    {
                        num++;
                    }
                    else
                    {
                        int num1 = 0;
                        while (dataSet.Tables[0].Rows.Count > num1)
                        {
                            dataSet.Tables[0].Rows[num1]["SZ_CASE_NO"].ToString();
                            if (dataSet.Tables[0].Rows[num1]["SZ_CASE_NO"].ToString() == strArrays[num].ToString())
                            {
                                DataRow item = dataTable1.NewRow();
                                item["sz_case_no"]          = dataSet.Tables[0].Rows[num1]["sz_case_no"];
                                item["sz_Case_id"]          = dataSet.Tables[0].Rows[num1]["sz_Case_id"];
                                item["sz_patient_id"]       = dataSet.Tables[0].Rows[num1]["sz_patient_id"];
                                item["sz_patient_name"]     = dataSet.Tables[0].Rows[num1]["sz_patient_name"];
                                item["sz_Case_type_name"]   = dataSet.Tables[0].Rows[num1]["sz_Case_type_name"];
                                item["dt_date_of_accident"] = dataSet.Tables[0].Rows[num1]["dt_date_of_accident"];
                                item["dt_created_Date"]     = dataSet.Tables[0].Rows[num1]["dt_created_Date"];
                                item["sz_chart_number"]     = dataSet.Tables[0].Rows[num1]["sz_chart_number"];
                                item["i_rfo_chart_no"]      = dataSet.Tables[0].Rows[num1]["i_rfo_chart_no"];
                                dataTable1.Rows.Add(item);
                                flag = true;
                            }
                            if (!flag)
                            {
                                num1++;
                            }
                            else
                            {
                                dataSet.Tables[0].Rows[num1].Delete();
                                flag = false;
                                dataSet.AcceptChanges();
                                break;
                            }
                        }
                        num++;
                    }
                }
                this.grdCaseMaster.DataSource = dataTable1;
                this.grdCaseMaster.DataBind();
            }
            else if (!this.Chkmult.Checked || !(this.txtPatientName.Text != "") || this.txtCaseNo.Text.Trim().Length != 0 || this.txtChartNumber.Text.Trim().Length != 0 || !(this.extddlLocation.Text == "NA") && !(this.extddlLocation.Text == ""))
            {
                this.grdCaseMaster.DataSource = sQLToDAO.LoadDataSet("sp_search_added_visits", "mbs.dao.AddVisit", addVisit, "mbs.dao");
                this.grdCaseMaster.DataBind();
            }
            else if (this.grdCaseMaster.Items.Count <= 0)
            {
                this.grdCaseMaster.DataSource = sQLToDAO.LoadDataSet("sp_search_added_visits", "mbs.dao.AddVisit", addVisit, "mbs.dao");
                this.grdCaseMaster.DataBind();
            }
            else
            {
                DataSet dataSet1 = sQLToDAO.LoadDataSet("sp_search_added_visits", "mbs.dao.AddVisit", addVisit, "mbs.dao");
                for (int k = 0; k < dataSet1.Tables[0].Rows.Count; k++)
                {
                    int num2 = 0;
                    for (int l = 0; l < dataTable.Rows.Count; l++)
                    {
                        if (dataSet1.Tables[0].Rows[k]["SZ_CASE_ID"].ToString() == dataTable.Rows[l]["SZ_CASE_ID"].ToString())
                        {
                            num2 = 1;
                        }
                    }
                    if (num2 != 1)
                    {
                        DataRow str = dataTable.NewRow();
                        str["SZ_CASE_ID"]          = dataSet1.Tables[0].Rows[k]["SZ_CASE_ID"].ToString();
                        str["SZ_CASE_NO"]          = dataSet1.Tables[0].Rows[k]["SZ_CASE_NO"].ToString();
                        str["SZ_PATIENT_ID"]       = dataSet1.Tables[0].Rows[k]["SZ_PATIENT_ID"].ToString();
                        str["DT_DATE_OF_ACCIDENT"] = dataSet1.Tables[0].Rows[k]["DT_DATE_OF_ACCIDENT"].ToString();
                        str["SZ_PATIENT_NAME"]     = dataSet1.Tables[0].Rows[k]["SZ_PATIENT_NAME"].ToString();
                        str["sz_chart_number"]     = dataSet1.Tables[0].Rows[k]["sz_chart_number"].ToString();
                        str["i_rfo_chart_no"]      = dataSet1.Tables[0].Rows[k]["i_rfo_chart_no"].ToString();
                        str["SZ_CASE_TYPE_NAME"]   = dataSet1.Tables[0].Rows[k]["SZ_CASE_TYPE_NAME"].ToString();
                        str["DT_CREATED_DATE"]     = dataSet1.Tables[0].Rows[k]["DT_CREATED_DATE"].ToString();
                        dataTable.Rows.Add(str);
                    }
                }
                this.grdCaseMaster.DataSource = dataTable;
                this.grdCaseMaster.DataBind();
            }
            if (this.grdCaseMaster.Items.Count > 0)
            {
                this.btnSave.Enabled = true;
                this.selectAllCheckBox();
            }
            Bill_Sys_BillingCompanyObject billSysBillingCompanyObject = (Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"];
            if (billSysBillingCompanyObject != null)
            {
                if (!billSysBillingCompanyObject.BT_REFERRING_FACILITY)
                {
                    this.grdCaseMaster.Columns[this.COL_CHART_NUMBER].Visible     = true;
                    this.grdCaseMaster.Columns[this.COL_RFO_CHART_NUMBER].Visible = false;
                }
                else
                {
                    this.grdCaseMaster.Columns[this.COL_CHART_NUMBER].Visible     = false;
                    this.grdCaseMaster.Columns[this.COL_RFO_CHART_NUMBER].Visible = 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());
        }
    }
Exemplo n.º 22
0
 //private SaveOperation _saveOperation;
 protected void Page_Load(object sender, EventArgs e)
 {
     objSessionBillingCompany = (Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"];
 }