private void SaveWorkStatusDetails()
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            if (chkPatientcannotReturn.Checked)
            {
            }
            else if (chkPatientReturnToWorkWithoutLimitation.Checked)
            {
            }
            else if (chkPatientReturnToWorkWithlimitation.Checked)
            {
                foreach (ListItem _objLI in chklstPatientLimitationAllReason.Items)
                {
                    if (_objLI.Selected == true)
                    {
                        ArrayList _objAL = new ArrayList();
                        _objAL.Add(txtWorkStatusID.Text);
                        _objAL.Add(_objLI.Text);
                        _objAL.Add(txtPatientID.Text.ToString());
                        _objAL.Add(txtCompanyID.Text.ToString());
                        if (_objLI.Text == "Other (explain):")
                        {
                            _objAL.Add(txtOtherLimitation.Text);
                        }
                        else
                        {
                            _objAL.Add("");
                        }
                        _objAL.Add("ADD");

                        _workerstemplate = new workers_templateC4_2();
                        _workerstemplate.SavePatientLimitations(_objAL);
                    }
                }
            }
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Esempio n. 2
0
    public void DeleteLimitations()
    {//Logging Start
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }

        WorkerTemplate _objWT;

        try
        {
            ArrayList _objAL = new ArrayList();
            _objAL.Add(txtWorkStatusID.Text.ToString());
            _objAL.Add("");
            _objAL.Add("");
            _objAL.Add(txtCompanyID.Text);
            _objAL.Add("");
            _objAL.Add("DELETEALL");
            _workerstemplate = new workers_templateC4_2();
            _workerstemplate.SavePatientLimitations(_objAL);
        }
        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());
        }
    }