コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     session_id = Request.Cookies["Session_ID"].Value.ToString();
     #region BasTemplate
     if (!IsPostBack)
     {
         Template.BasTemplate objBasTemplate = new Template.BasTemplate();
         try
         {
             if (Request.Cookies["Session_ID"] == null)
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
             }
             string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
             if (strResult != "")
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                 return;
             }
             ViewState["AccessType"]                   = objBasTemplate.strAccessType;
             ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
             ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
             ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
             ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
             ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
             ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
             ViewState["User_ID"]           = objBasTemplate.strUser_ID;
             ViewState["User_Name"]         = objBasTemplate.strUser_Name;
             ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
         }
         catch (Exception ex)
         {
             string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
             Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
         }
         finally
         {
             objBasTemplate.CleanUp();
             objBasTemplate.Dispose();
         }
     }
     #endregion
     if (!IsPostBack)
     {
         SetupTabStrip1.SetTabIndex(11);
         SetAccountName();
         ViewState["rbAccount"] = rblAccounts.Items[1].Text;
         GetText();
         SetResponse();
         ddlResponseType.DataSource     = Data.ExtraPageResponseType();
         ddlResponseType.DataTextField  = "text";
         ddlResponseType.DataValueField = "value";
         ddlResponseType.DataBind();
         string ResponseType = Data.Get_other(BASUSA.MiscTidBit.MasterAccount(ViewState["Selected_Account_Number"].ToString()), "833", "0");
         if (!string.IsNullOrEmpty(ResponseType))
         {
             ddlResponseType.Items.FindByValue(ResponseType).Selected = true;
         }
     }
 }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     #region BasTemplate
     if (!IsPostBack)
     {
         if ((Request.Params["SkipCheck"] == null) || (Request.Params["SkipCheck"] != "YES"))
         {
             SQLStatic.Sessions.SetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "main_run", Request.Path + "?SkipCheck=YES");
             Response.Redirect("/web_projects/PTemplate/index.htm");
             return;
         }
         Template.BasTemplate objBasTemplate = new Template.BasTemplate();
         try
         {
             if (Request.Cookies["Session_ID"] == null)
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
             }
             string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
             if (strResult != "")
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                 return;
             }
             objBasTemplate.SetSeatchField(0);
             objBasTemplate.ShowFontSizeSelector       = false;
             objBasTemplate.ShowNotes                  = false;
             objBasTemplate.ShowProcessingYear         = true;
             ViewState["AccessType"]                   = objBasTemplate.strAccessType;
             ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
             ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
             ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
             ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
             ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
             ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
             ViewState["User_ID"]           = objBasTemplate.strUser_ID;
             ViewState["User_Name"]         = objBasTemplate.strUser_Name;
             ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
         }
         catch (Exception ex)
         {
             string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
             Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
         }
         finally
         {
             objBasTemplate.CleanUp();
             objBasTemplate.Dispose();
         }
     }
     #endregion
     if (!IsPostBack)
     {
         hide(true);
         SetHeaderInformation();
         string strUser = SQLStatic.EmployeeData.employee_name_from_log_user_id(ViewState["User_Name"].ToString());
         Template.BASPtemplate.SetHeader2ndLine(Page, "User:  " + strUser);
         Template.BASPtemplate.SetHeader3rdLine(Page, " ");
     }
 }
コード例 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     session_id = Request.Cookies["Session_ID"].Value.ToString();
     #region BasTemplate
     if (!IsPostBack)
     {
         Template.BasTemplate objBasTemplate = new Template.BasTemplate();
         try
         {
             if (Request.Cookies["Session_ID"] == null)
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
             }
             string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
             if (strResult != "")
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                 return;
             }
             ViewState["AccessType"]                   = objBasTemplate.strAccessType;
             ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
             ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
             ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
             ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
             ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
             ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
             ViewState["User_ID"]           = objBasTemplate.strUser_ID;
             ViewState["User_Name"]         = objBasTemplate.strUser_Name;
             ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
         }
         catch (Exception ex)
         {
             string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
             Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
         }
         finally
         {
             objBasTemplate.CleanUp();
             objBasTemplate.Dispose();
         }
     }
     #endregion
     if (!IsPostBack)
     {
         if ((ViewState["Employee_Number"] == null) || (ViewState["Employee_Number"].ToString().Equals("0")))
         {
             dvee.Visible = false;
         }
         else
         {
             lblSelectedEmployee.Text = SQLStatic.EmployeeData.employee_name_(ViewState["Employee_Number"].ToString()) + " #" + ViewState["Employee_Number"].ToString();
         }
         if (ViewState["User_Group_ID"].ToString().Equals("3"))
         {
             dvbtn.Visible = false;
         }
         FillMasterAccounts();
     }
 }
コード例 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     session_id = Request.Cookies["Session_ID"].Value.ToString();
     #region BasTemplate
     if (!IsPostBack)
     {
         Template.BasTemplate objBasTemplate = new Template.BasTemplate();
         try
         {
             if (Request.Cookies["Session_ID"] == null)
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
             }
             string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
             if (strResult != "")
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                 return;
             }
             ViewState["AccessType"]                   = objBasTemplate.strAccessType;
             ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
             ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
             ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
             ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
             ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
             ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
             ViewState["User_ID"]           = objBasTemplate.strUser_ID;
             ViewState["User_Name"]         = objBasTemplate.strUser_Name;
             ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
         }
         catch (Exception ex)
         {
             string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
             Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
         }
         finally
         {
             objBasTemplate.CleanUp();
             objBasTemplate.Dispose();
         }
     }
     #endregion
     if (!IsPostBack)
     {
         RangeValidator1.MinimumValue = DateTime.Today.ToShortDateString();
         SetupTabStrip1.SetTabIndex(8);
         FilDefault();
         SetTax();
         if (Data.employee_use_enrol_wizard(ViewState["Selected_Account_Number"].ToString()))
         {
             lblUseWizard.Text = "This account uses the new Enrollment Wizard program";
         }
         else
         {
             lblUseWizard.Text = "This account DOES NOT uses the new Enrollment Wizard program ";
         }
     }
     DrawGrid();
 }
コード例 #5
0
 private void Page_Load(object sender, System.EventArgs e)
 {
     if (PLA_Approval.TrainingClass.SessionHasTimeOut(Request.Cookies["Session_ID"].Value.ToString()))
     {
         Response.Redirect("/Web_Projects/trn/PLA/out.aspx?message=Your Session has timed out" + "&backurl=0", true);
     }
     lblScript.Text = "";
     #region PopUp BasTemplate
     if (!IsPostBack)
     {
         Template.BasTemplate objBasTemplate = new Template.BasTemplate();
         try
         {
             if (Request.Cookies["Session_ID"] == null)
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
             }
             string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
             if (strResult != "")
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult.Replace("\n", "~"), false);
                 return;
             }
             ViewState["AccessType"]                   = objBasTemplate.strAccessType;
             ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
             ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
             ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
             ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
             ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
             ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
             ViewState["User_ID"]           = objBasTemplate.strUser_ID;
             ViewState["User_Name"]         = objBasTemplate.strUser_Name;
             ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
         }
         catch (Exception ex)
         {
             string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
             Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
         }
         finally
         {
             objBasTemplate.CleanUp();
             objBasTemplate.Dispose();
         }
     }
     #endregion
     if (!IsPostBack)
     {
         Template.BASPtemplate.SetHeaderPageNameByURL(Page, Request.Path);
         ViewState["Applicant_Employee_Number"] = SQLStatic.Sessions.GetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "Applicant_Employee_Number", PLA_Approval.TrainingClass.ConnectionString);
         ViewState["Session_ID"]        = Request.Cookies["Session_ID"].Value.ToString();
         ViewState["Request_Record_ID"] = SQLStatic.Sessions.GetSessionValue(ViewState["Session_ID"].ToString(), "Request_Record_ID", PLA_Approval.TrainingClass.ConnectionString);
         SetHeaderInformation();
         ProcessesStarFunctionality();
         CheckZeroApproved();
     }
     HandleContractors();
 }
コード例 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            session_id = Request.Cookies["Session_ID"].Value.ToString();
            #region BasTemplate
            if (!IsPostBack)
            {
                Template.BasTemplate objBasTemplate = new Template.BasTemplate();
                try
                {
                    if (Request.Cookies["Session_ID"] == null)
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
                    }
                    string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
                    if (strResult != "")
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                        return;
                    }
                    ViewState["AccessType"]                   = objBasTemplate.strAccessType;
                    ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
                    ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
                    ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
                    ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
                    ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
                    ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
                    ViewState["User_ID"]           = objBasTemplate.strUser_ID;
                    ViewState["User_Name"]         = objBasTemplate.strUser_Name;
                    ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
                }
                catch (Exception ex)
                {
                    string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
                    Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
                }
                finally
                {
                    objBasTemplate.CleanUp();
                    objBasTemplate.Dispose();
                }
            }
            #endregion

            if (!IsPostBack)
            {
                //dvInstruction.Visible = false;
                SetupTabStrip1.SetTabIndex(10);
                FillProcessingYear();
            }
            btnSave.Attributes.Add("onClick", "Save()");
            rblEnrollType.Enabled = gvGroups.SelectedIndex >= 0;

            if (hidSave.Value.Equals("Go"))
            {
                hidSave.Value = "";
                DoSave();
            }
        }
コード例 #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         #region BasTemplate
         if (!IsPostBack)
         {
             Template.BasTemplate objBasTemplate = new Template.BasTemplate();
             try
             {
                 if (Request.Cookies["Session_ID"] == null)
                 {
                     Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
                 }
                 string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
                 if (strResult != "")
                 {
                     Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                     return;
                 }
                 ViewState["AccessType"]                   = objBasTemplate.strAccessType;
                 ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
                 ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
                 ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
                 ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
                 ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
                 ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
                 ViewState["User_ID"]           = objBasTemplate.strUser_ID;
                 ViewState["User_Name"]         = objBasTemplate.strUser_Name;
                 ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
             }
             catch (Exception ex)
             {
                 string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
             }
             finally
             {
                 objBasTemplate.CleanUp();
                 objBasTemplate.Dispose();
             }
         }
         #endregion
         Oracle.DataAccess.Client.OracleConnection conn = SQLStatic.SQL.OracleConnection();
         string strDepName = SQLStatic.SQL.ExecScaler("select pkg_employee_maintenance.get_dependent_name(" + Request.Params["id"] + ") from dual", conn).ToString();
         ViewState["Is_COBRA"] = SQLStatic.SQL.ExecScaler(
             "select pkg_employee_maintenance.has_cobra(" + ViewState["Employee_Number"].ToString() + "," + ViewState["Processing_Year"].ToString() + ") from dual", conn).ToString();
         ViewState["Account_Number"]         = SQLStatic.SQL.ExecScaler("select pkg_employee.ee_account_number(" + ViewState["Employee_Number"].ToString() + ") from dual", conn).ToString();
         ViewState["SESSION_CALLING_MODULE"] = Data.Current_Action(Request.Cookies["Session_ID"].Value.ToString());
         conn.Close();
         conn.Dispose();
         lblConfirm.Text = lblConfirm.Text.Replace("{name}", strDepName);
         lblDepName.Text = strDepName;
         FillReason();
     }
 }
コード例 #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     #region BasTemplate
     if (!IsPostBack)
     {
         //if ((Request.Params["SkipCheck"] == null) || (Request.Params["SkipCheck"] != "YES"))
         //{
         //    SQLStatic.Sessions.SetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "main_run", Request.Path + "?SkipCheck=YES");
         //    Response.Redirect("/web_projects/PTemplate/index.htm");
         //    return;
         //}
         Template.BasTemplate objBasTemplate = new Template.BasTemplate();
         try
         {
             if (Request.Cookies["Session_ID"] == null)
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
             }
             string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
             if (strResult != "")
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                 return;
             }
             ViewState["AccessType"]                   = objBasTemplate.strAccessType;
             ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
             ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
             ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
             ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
             ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
             ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
             ViewState["User_ID"]           = objBasTemplate.strUser_ID;
             ViewState["User_Name"]         = objBasTemplate.strUser_Name;
             ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
             // setup logo
         }
         catch (Exception ex)
         {
             string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
             Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
         }
         finally
         {
             objBasTemplate.CleanUp();
             objBasTemplate.Dispose();
         }
     }
     #endregion
     if (!IsPostBack)
     {
         Bas_Utility.Utilities.SetHeaderFrame(Page, "Administrator Setup", " ", " ");
         strip.Tabs[0].Selected = true;
         ViewState["skip"]      = false;
         FillEmployees();
     }
 }
コード例 #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     #region BasTemplate
     if (!IsPostBack)
     {
         Template.BasTemplate objBasTemplate = new Template.BasTemplate();
         try
         {
             if (Request.Cookies["Session_ID"] == null)
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
             }
             string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
             if (strResult != "")
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                 return;
             }
             ViewState["AccessType"]                   = objBasTemplate.strAccessType;
             ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
             ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
             ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
             ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
             ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
             ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
             ViewState["User_ID"]           = objBasTemplate.strUser_ID;
             ViewState["User_Name"]         = objBasTemplate.strUser_Name;
             ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
         }
         catch (Exception ex)
         {
             string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
             Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
         }
         finally
         {
             objBasTemplate.CleanUp();
             objBasTemplate.Dispose();
         }
     }
     #endregion
     if (!IsPostBack)
     {
         FillYears();
         FillState();
         lblTitle.Text = "Edit Dependent";
         SetExistingFields();
         SetDependentAddress();
         if ((!string.IsNullOrEmpty(Request.Params["SSN"])) && (Request.Params["SSN"].EndsWith("1")))
         {
             pnlSSNOnly.Enabled  = false;
             pnlSSNOnly2.Enabled = false;
         }
     }
 }
コード例 #10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     session_id = Request.Cookies["Session_ID"].Value.ToString();
     #region BasTemplate
     if (!IsPostBack)
     {
         Template.BasTemplate objBasTemplate = new Template.BasTemplate();
         try
         {
             if (Request.Cookies["Session_ID"] == null)
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
             }
             string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
             if (strResult != "")
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                 return;
             }
             objBasTemplate.SetSeatchField(0);
             objBasTemplate.ShowProcessingYear         = true;
             objBasTemplate.ShowNotes                  = false;
             objBasTemplate.ShowFontSizeSelector       = false;
             LblTemplateHeader2.Text                   = objBasTemplate.Header2();
             ViewState["AccessType"]                   = objBasTemplate.strAccessType;
             ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
             ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
             ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
             ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
             ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
             ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
             ViewState["User_ID"]           = objBasTemplate.strUser_ID;
             ViewState["User_Name"]         = objBasTemplate.strUser_Name;
             ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
         }
         catch (Exception ex)
         {
             string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
             Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
         }
         finally
         {
             objBasTemplate.CleanUp();
             objBasTemplate.Dispose();
         }
     }
     #endregion
     if (!IsPostBack)
     {
         ViewState["Employee_Number"] = SQLStatic.Sessions.GetSessionValue(session_id, "NH_EMPLOYEE_NUMBER");
         TabStrip1.SetTabIndex(1);
         FillDropDowns();
         GetDataFromSession();
     }
 }
コード例 #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region BasTemplate
            if (!IsPostBack)
            {
                Template.BasTemplate objBasTemplate = new Template.BasTemplate();
                try
                {
                    if (Request.Cookies["Session_ID"] == null)
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
                    }
                    string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
                    if (strResult != "")
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                        return;
                    }
                    ViewState["AccessType"]                   = objBasTemplate.strAccessType;
                    ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
                    ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
                    ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
                    ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
                    ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
                    ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
                    ViewState["User_ID"]           = objBasTemplate.strUser_ID;
                    ViewState["User_Name"]         = objBasTemplate.strUser_Name;
                    ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
                }
                catch (Exception ex)
                {
                    string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
                    Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
                }
                finally
                {
                    objBasTemplate.CleanUp();
                    objBasTemplate.Dispose();
                }
            }
            #endregion

            //ViewState["Employee_Number"] = 337185;
            //ViewState["Selected_Account_Number"] = "0007208-0033-000";
            //ViewState["Processing_Year"] = 2019;
            if (Data.ShowFunralBenefitPage(ViewState["Selected_Account_Number"].ToString(), ViewState["Employee_Number"].ToString(), ViewState["Processing_Year"].ToString()).Equals("0"))
            {
                //lblScript.Text = "<script>ineligiblePopup()</script>";
                string strError = "<script>ineligiblePopup()</script>";
                Page.ClientScript.RegisterStartupScript(Page.GetType(), "strError", strError);
            }

            benefitTableSection.InnerHtml = Getclob();
        }
コード例 #12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     session_id = Request.Cookies["Session_ID"].Value.ToString();
     #region BasTemplate
     if (!IsPostBack)
     {
         Template.BasTemplate objBasTemplate = new Template.BasTemplate();
         try
         {
             if (Request.Cookies["Session_ID"] == null)
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
             }
             string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
             if (strResult != "")
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                 return;
             }
             ViewState["AccessType"]                   = objBasTemplate.strAccessType;
             ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
             ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
             ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
             ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
             ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
             ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
             ViewState["User_ID"]           = objBasTemplate.strUser_ID;
             ViewState["User_Name"]         = objBasTemplate.strUser_Name;
             ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
         }
         catch (Exception ex)
         {
             string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
             Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
         }
         finally
         {
             objBasTemplate.CleanUp();
             objBasTemplate.Dispose();
         }
     }
     #endregion
     if (!IsPostBack)
     {
         SetupTabStrip1.SetTabIndex(5);
         SetAccountName();
         ViewState["rbAccount"] = rblAccounts.Items[1].Text;
         GetText();
         rblBeneficieryPageRequired.Items.FindByValue(Data.BenefitPageRequiredForNewEE(ViewState["Selected_Account_Number"].ToString())).Selected            = true;
         rblBeneficieryPageRequiredAnnualOE.Items.FindByValue(Data.BenefitPageRequiredForAnnualOE(ViewState["Selected_Account_Number"].ToString())).Selected = true;
         rblVisible.Items.FindByValue(Data.BenefitPagevisible(ViewState["Selected_Account_Number"].ToString())).Selected = true;
     }
 }
コード例 #13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     session_id = Request.Cookies["Session_ID"].Value.ToString();
     #region BasTemplate
     if (!IsPostBack)
     {
         Template.BasTemplate objBasTemplate = new Template.BasTemplate();
         try
         {
             if (Request.Cookies["Session_ID"] == null)
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
             }
             string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
             if (strResult != "")
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                 return;
             }
             ViewState["AccessType"]                   = objBasTemplate.strAccessType;
             ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
             ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
             ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
             ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
             ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
             ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
             ViewState["User_ID"]           = objBasTemplate.strUser_ID;
             ViewState["User_Name"]         = objBasTemplate.strUser_Name;
             ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
         }
         catch (Exception ex)
         {
             string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
             Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
         }
         finally
         {
             objBasTemplate.CleanUp();
             objBasTemplate.Dispose();
         }
     }
     #endregion
     if (!IsPostBack)
     {
         SetupTabStrip1.SetTabIndex(13);
         lblInstruction.Text = "Verify Account <b>" + ViewState["Selected_Account_Number"].ToString() + " / " +
                               SQLStatic.AccountData.AccountName(ViewState["Selected_Account_Number"].ToString()) +
                               "</b> Data For Processing Year <b>" + ViewState["Processing_Year"].ToString() + "</B>";
     }
     DrawMissingGroupingTypeGrid();
     DrawMissingSortPlanGrid();
     DrawMissingCutoffAgeGrid();
 }
コード例 #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region BasTemplate
            if (!IsPostBack)
            {
                Template.BasTemplate objBasTemplate = new Template.BasTemplate();
                try
                {
                    if (Request.Cookies["Session_ID"] == null)
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
                    }
                    string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
                    if (strResult != "")
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                        return;
                    }
                    ViewState["AccessType"]                   = objBasTemplate.strAccessType;
                    ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
                    ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
                    ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
                    ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
                    ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
                    ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
                    ViewState["User_ID"]           = objBasTemplate.strUser_ID;
                    ViewState["User_Name"]         = objBasTemplate.strUser_Name;
                    ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
                    // setup logo
                }
                catch (Exception ex)
                {
                    string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
                    Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
                }
                finally
                {
                    objBasTemplate.CleanUp();
                    objBasTemplate.Dispose();
                }
            }
            #endregion

            if (!IsPostBack)
            {
                dvOfficrdiv.Visible    = false;
                strip.Tabs[1].Selected = true;
                GetEmployee();
                FillOfficeDiv();
                FillOrganizationCode();
            }
        }
コード例 #15
0
 private void Page_Load(object sender, System.EventArgs e)
 {
     if (Training_Source.TrainingClass.SessionHasTimeOut(Request.Cookies["Session_ID"].Value.ToString()))
     {
         Response.Redirect("/Web_Projects/trn/PLA/out.aspx?message=Your Session has timed out" + "&backurl=0", true);
     }
     #region PopUp BasTemplate
     if (!IsPostBack)
     {
         Template.BasTemplate objBasTemplate = new Template.BasTemplate();
         try
         {
             if (Request.Cookies["Session_ID"] == null)
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
             }
             string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
             if (strResult != "")
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult.Replace("\n", "~"), false);
                 return;
             }
             ViewState["AccessType"]                   = objBasTemplate.strAccessType;
             ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
             ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
             ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
             ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
             ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
             ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
             ViewState["User_ID"]           = objBasTemplate.strUser_ID;
             ViewState["User_Name"]         = objBasTemplate.strUser_Name;
             ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
         }
         catch (Exception ex)
         {
             string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
             Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
         }
         finally
         {
             objBasTemplate.CleanUp();
             objBasTemplate.Dispose();
         }
     }
     #endregion
     if (!IsPostBack)
     {
         SetHeaderInformation();
         Training_Source.TrainingClass.FillBudgetYears(ddlBudgetYear, lblBalance, Request.Params["ee"], Request.Params["py"]);
     }
     DrawGrid();
 }
コード例 #16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     #region BasTemplate
     if (!IsPostBack)
     {
         Template.BasTemplate objBasTemplate = new Template.BasTemplate();
         try
         {
             if (Request.Cookies["Session_ID"] == null)
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
             }
             string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
             if (strResult != "")
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                 return;
             }
             ViewState["AccessType"]                   = objBasTemplate.strAccessType;
             ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
             ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
             ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
             ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
             ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
             ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
             ViewState["User_ID"]           = objBasTemplate.strUser_ID;
             ViewState["User_Name"]         = objBasTemplate.strUser_Name;
             ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
         }
         catch (Exception ex)
         {
             string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
             Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
         }
         finally
         {
             objBasTemplate.CleanUp();
             objBasTemplate.Dispose();
         }
     }
     #endregion
     if (!IsPostBack)
     {
         string DepeName = Data.get_dep_name(ViewState["Employee_Number"].ToString(), Request.Params["dep_id"]);
         lblDepName.Text      = DepeName;
         lblConfirm.Text      = lblConfirm.Text.Replace("{name}", DepeName);
         txtReactiveDate.Text = DateTime.Today.ToString("MM/dd/yyyy");
         ViewState["SESSION_CALLING_MODULE"] = Data.Current_Action(Request.Cookies["Session_ID"].Value.ToString());
     }
     SetForOpenEnrollment();
 }
コード例 #17
0
 private void Page_Load(object sender, System.EventArgs e)
 {
     lblScript.Text = "";
     #region PopUp BasTemplate
     if (!IsPostBack)
     {
         Template.BasTemplate objBasTemplate = new Template.BasTemplate();
         try
         {
             if (Request.Cookies["Session_ID"] == null)
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", false);
                 return;
             }
             string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
             if (strResult != "")
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                 return;
             }
             ViewState["AccessType"]                   = objBasTemplate.strAccessType;
             ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
             ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
             ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
             ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
             ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
             ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
             ViewState["User_ID"]           = objBasTemplate.strUser_ID;
             ViewState["User_Name"]         = objBasTemplate.strUser_Name;
             ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
         }
         catch (Exception ex)
         {
             string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
             Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
         }
         finally
         {
             objBasTemplate.CleanUp();
             objBasTemplate.Dispose();
         }
     }
     #endregion
     if (!IsPostBack)
     {
         SQLStatic.Sessions.SetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "ReportReturnTo", Request.Path);
     }
     isAdministrator = (Request.Params["isadmin"] != null) && (Request.Params["isadmin"] == "T");
 }
コード例 #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            session_id = Request.Cookies["Session_ID"].Value.ToString();
            #region BasTemplate
            if (!IsPostBack)
            {
                Template.BasTemplate objBasTemplate = new Template.BasTemplate();
                try
                {
                    string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, true);
                    if (strResult != "")
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                        return;
                    }
                    ViewState["AccessType"]                   = objBasTemplate.strAccessType;
                    ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
                    ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
                    ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
                    ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
                    ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
                    ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
                    ViewState["User_ID"]           = objBasTemplate.strUser_ID;
                    ViewState["User_Name"]         = objBasTemplate.strUser_Name;
                    ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
                    ViewState["Page"] = objBasTemplate.strPageId;
                }
                catch (Exception ex)
                {
                    string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
                    Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
                }
                finally
                {
                    objBasTemplate.CleanUp();
                    objBasTemplate.Dispose();
                }
            }
            #endregion



            if (!IsPostBack)
            {
                ViewState["FS"] = SQLStatic.Sessions.GetSessionValue(session_id, "FAMILY_STATUS_CODE");
                setStatus();
            }
            //lnkbtnNo.Attributes.Add("click", "Javascript:closeWindow(20)");
        }
コード例 #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            session_id = Request.Cookies["Session_ID"].Value.ToString();

            if (!IsPostBack)
            {
                SetProcessingYear();
            }

            #region BasTemplate
            if (!IsPostBack)
            {
                if ((Request.Params["SkipCheck"] == null) || (Request.Params["SkipCheck"] != "YES"))
                {
                    SQLStatic.Sessions.SetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "main_run", Request.Path + "?SkipCheck=YES");
                    Response.Redirect("/web_projects/PTemplate/index.htm");
                    //Response.Redirect("/web_projects/PTemplate/index_ifram.htm");
                    return;
                }

                Template.BasTemplate objBasTemplate = new Template.BasTemplate();
                try
                {
                    if (Request.Cookies["Session_ID"] == null)
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
                    }
                    string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
                    if (strResult != "")
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                        return;
                    }
                    objBasTemplate.SetSeatchField(0);
                    objBasTemplate.ShowProcessingYear = true;
                    if (!objBasTemplate.strUser_Group_ID.Equals("3"))
                    {
                        objBasTemplate.ShowSelectEmployee = true;
                    }
                    else
                    {
                        objBasTemplate.ShowSelectEmployee = false;
                    }
                    objBasTemplate.ShowNotes                  = false;
                    objBasTemplate.ShowFontSizeSelector       = false;
                    LblTemplateHeader2.Text                   = objBasTemplate.Header2();
                    ViewState["AccessType"]                   = objBasTemplate.strAccessType;
                    ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
                    ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
                    ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
                    ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
                    ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
                    ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
                    ViewState["User_ID"]           = objBasTemplate.strUser_ID;
                    ViewState["User_Name"]         = objBasTemplate.strUser_Name;
                    ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
                    ViewState["Page_Id"]           = "897";
                }
                catch (Exception ex)
                {
                    string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
                    Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
                }
                finally
                {
                    objBasTemplate.CleanUp();
                    objBasTemplate.Dispose();
                }
            }
            #endregion


            if (!IsPostBack)
            {
                SQLStatic.Sessions.SetSessionValue(session_id, "SESSION_CALLING_MODULE", "N");
                string strEmployeeNumber = ViewState["Employee_Number"].ToString();
                if ((strEmployeeNumber.Equals("0")) || (string.IsNullOrEmpty(strEmployeeNumber)))
                {
                    string strGetEE = "<script>GetEE('" + Request.Path + "')</script>";
                    Page.ClientScript.RegisterStartupScript(Page.GetType(), "strGetEE", strGetEE);
                    return;
                }
                if (!Data.HasCoverage(ViewState["Employee_Number"].ToString(), ViewState["Processing_Year"].ToString()))
                {
                    Bas_Utility.Misc.Alert(Page, "The selected employee doesn’t have any coverage for the selected plan year");
                    dvAll.Visible      = false;
                    lblNoCvrg.Text     = GetWarning();
                    lblNoCvrg.CssClass = "FontMedium";
                    return;
                }
                else
                {
                    dvAll.Visible  = true;
                    lblNoCvrg.Text = string.Empty;
                }
                ViewState["Selected_Account_Number"] = SQLStatic.EmployeeData.Account_Number(ViewState["Employee_Number"].ToString());
                lblPreparedOn.Text = DateTime.Today.ToLongDateString();
                SetHeaderTest();
                Show_Hide_dependent();
                GetShowCost();
                ViewState["RetaAccount"] = SQLStatic.AccountData.RetaAccount(ViewState["Selected_Account_Number"].ToString());
                if (ViewState["Selected_Account_Number"].ToString().IndexOf("0007217").Equals(0))
                {
                    ViewState["RetaAccount"] = false;
                }
                //if (!(bool)ViewState["RetaAccount"]) hide the messages per JIRA MYENROLL-18495
                {
                    dvYourElectionTitle.Visible = false;
                    dvYourElection.Visible      = false;
                }
                lblCost.Visible = ViewState["Selected_Account_Number"].ToString().IndexOf("0007208") > -1;
                try
                {
                    Bas_Utility.Utilities.SetHeaderFrame(Page, "Benefits Statement", "ACCOUNT_INFO", SQLStatic.EmployeeData.EmployeeNameHeader(ViewState["Employee_Number"].ToString()));
                }
                catch { }

                ViewState["typeof"] = Data.Enrollment_type(ViewState["Selected_Account_Number"].ToString());
                dvSummary.Visible   = ViewState["typeof"].ToString().Equals("0");
                dvSpecisl.Visible   = !dvSummary.Visible;


                if (Data.allows_pretax_posttax(ViewState["Selected_Account_Number"].ToString()))
                {
                    dvTax.Visible = true;
                    rblDeductionOption.Items.FindByValue(Data.ee_using_pretax(ViewState["Employee_Number"].ToString())).Selected = true;
                    //lblPayRollDeduction.Text = rblDeductionOption.Items[rblDeductionOption.SelectedIndex].Text;
                    lblPayRollDeduction.Text = Data.ee_pre_post_value(ViewState["Employee_Number"].ToString(), ViewState["Processing_Year"].ToString());
                    //foreach (ListItem li in rblDeductionOption.Items)
                    //    li.Enabled = li.Selected;
                }

                //System.Web.HttpBrowserCapabilities browser = Request.Browser;
                //dvprint.Visible = !browser.Browser.Equals("IE");
                dvprint.Visible        = false;
                lnbtnGoToPrint.Visible = !dvprint.Visible;

                //string s_url = "Type=" + browser.Type + "/Name=" + browser.Browser + "/Version=" + browser.Version;
                //lnbtnGoToPrint.Text = browser.Browser;
                lblExtraText.Text = Data.BenefitStatemaneText(ViewState["Selected_Account_Number"].ToString());
            }
            DrawGrig();
            DrawSpecialGrid();
            DrawExtraGrid();
        }
コード例 #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            session_id = Request.Cookies["Session_ID"].Value.ToString();

            #region BasTemplate
            if (!IsPostBack)
            {
                Template.BasTemplate objBasTemplate = new Template.BasTemplate();
                try
                {
                    if (Request.Cookies["Session_ID"] == null)
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
                    }
                    string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
                    if (strResult != "")
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                        return;
                    }
                    objBasTemplate.SetSeatchField(0);
                    objBasTemplate.ShowProcessingYear         = true;
                    objBasTemplate.ShowNotes                  = false;
                    objBasTemplate.ShowFontSizeSelector       = false;
                    LblTemplateHeader2.Text                   = objBasTemplate.Header2();
                    ViewState["AccessType"]                   = objBasTemplate.strAccessType;
                    ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
                    ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
                    ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
                    ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
                    ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
                    ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
                    ViewState["User_ID"]           = objBasTemplate.strUser_ID;
                    ViewState["User_Name"]         = objBasTemplate.strUser_Name;
                    ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
                }
                catch (Exception ex)
                {
                    string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
                    Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
                }
                finally
                {
                    objBasTemplate.CleanUp();
                    objBasTemplate.Dispose();
                }
            }
            #endregion
            if (!IsPostBack)
            {
                if (Data.ShowAdditionalInfoPage(ViewState["Selected_Account_Number"].ToString()))
                {
                    TabStrip1.ShowTab(2, true);
                }
                //Fields._Default.Start(Page);
                ViewState["Employee_Number"] = SQLStatic.Sessions.GetSessionValue(session_id, "NH_EMPLOYEE_NUMBER");
                if (ViewState["Employee_Number"].ToString().Equals("0"))
                {
                    string NoEE = "<script>Javascript:No_EE()</script>";
                    Page.ClientScript.RegisterStartupScript(Page.GetType(), "NoEE", NoEE);
                    return;
                }
                ViewState["Domain"]           = Data.Default_Email_Domain_from_acct((ViewState["Selected_Account_Number"].ToString())).ToUpper();
                CustomValidator1.ErrorMessage = "Whoops! You entered a domain for the work email address (the portion of the email to the right of the '@' symbol) that does not coincide with the employer's required domain., which is @<value>. You can only enter a work email address that uses the '@<value>";
                CustomValidator1.ErrorMessage = CustomValidator1.ErrorMessage.Replace("<value>", ViewState["Domain"].ToString());
                hidDomain.Value = ViewState["Domain"].ToString();
                TabStrip1.SetCurrentTab(Request.Path);
                //TabStrip1.SetTabIndex(2);
                FillDropDowns();
                GetDataFromSession();
                try
                {
                    jscriptsFunctions.Utilities.SetHeaderFrame(Page, TabStrip1.TabName(), Data.HeaderText(session_id), "");
                }
                catch { }
                DoStar();
                SetRequired();
            }
            TabStrip1.wPage       = Page;
            TabStrip1.CurrentPath = Request.Path;
            // TabStrip1.CheckEnrrollmentKit(ViewState["Selected_Account_Number"].ToString());
        }
コード例 #21
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            if (PLA_Approval.TrainingClass.SessionHasTimeOut(Request.Cookies["Session_ID"].Value.ToString()))
            {
                Response.Redirect("/Web_Projects/trn/PLA/out.aspx?message=Your Session has timed out" + "&backurl=0", true);
            }
            lblScript.Text = "";

            #region PopUp BasTemplate
            if (!IsPostBack)
            {
                Template.BasTemplate objBasTemplate = new Template.BasTemplate();
                try
                {
                    if (Request.Cookies["Session_ID"] == null)
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
                    }
                    string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
                    if (strResult != "")
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult.Replace("\n", "~"), false);
                        return;
                    }
                    ViewState["AccessType"]                   = objBasTemplate.strAccessType;
                    ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
                    ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
                    ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
                    ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
                    ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
                    ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
                    ViewState["User_ID"]           = objBasTemplate.strUser_ID;
                    ViewState["User_Name"]         = objBasTemplate.strUser_Name;
                    ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
                }
                catch (Exception ex)
                {
                    string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
                    Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
                }
                finally
                {
                    objBasTemplate.CleanUp();
                    objBasTemplate.Dispose();
                }
            }
            #endregion
            if (!IsPostBack)
            {
                ViewState["Applicant_Employee_Number"] = SQLStatic.Sessions.GetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "Applicant_Employee_Number", PLA_Approval.TrainingClass.ConnectionString);
                if (ViewState["Applicant_Employee_Number"].ToString() == "")
                {
                    ViewState["Applicant_Employee_Number"] = ViewState["Employee_Number"].ToString();
                }
                if (Request.Params["Inst"] != "4")
                {
                    lblBalance.Text = PLA_Approval.TrainingClass.AvailableAmount(ViewState["Applicant_Employee_Number"].ToString(), ViewState["Processing_Year"].ToString());
                }
                ViewState["Session_ID"]        = Request.Cookies["Session_ID"].Value.ToString();
                ViewState["Product_Code"]      = SQLStatic.Sessions.GetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "Product_Code", PLA_Approval.TrainingClass.ConnectionString);
                ViewState["Request_Record_ID"] = SQLStatic.Sessions.GetSessionValue(ViewState["Session_ID"].ToString(), "Request_Record_ID", PLA_Approval.TrainingClass.ConnectionString);

                ViewState["List_Type"] = "0";
                if (Request.Params["Inst"] != null)
                {
                    if (Request.Params["Inst"] == "1")
                    {
                        lblInstruction.Text = "Type in your supervisor’s name in the search field below to find your supervisor’s "
                                              + "email address and to make your supervisor assignment.  Type your supervisors’ name "
                                              + "in the order Last Name, First Name (i.e., Smith, Jane).  The more you type, the more accurate the "
                                              + "search results (capitalization does not affect the search results).";
                        lblTitle.Text          = "Select a Supervisor";
                        lblHeading.Text        = "Find a supervisor (last, first):";
                        ViewState["List_Type"] = "1";
                    }
                    if (Request.Params["Inst"] == "2")
                    {
                        lblInstruction.Text = "To route the training request to another supervisor, type the supervisor’s name in "
                                              + "the search field below to find and select a different supervisor.  Type the "
                                              + "supervisor’s name in the order Last Name, First Name (i.e., Smith, Jane).  The "
                                              + "more you type, the more accurate the search results (capitalization does not affect the search results)."
                                              + " <font color=\"#FF0000\">Please note once you change the supervisor you will not be able to see this application</font>";
                        lblTitle.Text          = "Select a Supervisor";
                        lblHeading.Text        = "Route to a Supervisor Search:";
                        ViewState["List_Type"] = "1";
                    }
                    if (Request.Params["Inst"] == "3")
                    {
                        lblInstruction.Text = "To route the training request to another administrator, type the administrator’s "
                                              + "name in the search field below to find and select a different administrator.  Type the "
                                              + "administrator’s name in the order Last Name, First Name (i.e., Smith, Jane).  The more you "
                                              + "type, the more accurate the search results (capitalization does not affect the search results)."
                                              + " <font color=\"#FF0000\">Please note once you change the administrator you will not be able to see this application</font>";;
                        lblHeading.Text        = "Route to an Administrator Search:";
                        ViewState["List_Type"] = "0";
                    }
                    if ((Request.Params["Inst"] == "4") || (Request.Params["Inst"] == "7"))
                    {
                        lblInstruction.Text = "To select an employee, type the employee’s "
                                              + "name in the search field below. Type the "
                                              + "employee’s name in the order Last Name, First Name (i.e., Smith, Jane).  The more you "
                                              + "type, the more accurate the search results (capitalization does not affect the search results).";
                        lblHeading.Text        = "Employee Search:";
                        ViewState["List_Type"] = "4";
                    }
                    if (Request.Params["Inst"] == "5")
                    {
                        lblInstruction.Text = "To select a supervisor, type the supervisor’s "
                                              + "name in the search field below. Type the "
                                              + "supervisor’s name in the order Last Name, First Name (i.e., Smith, Jane).  The more you "
                                              + "type, the more accurate the search results (capitalization does not affect the search results).";
                        lblHeading.Text        = "Supervisor Search:";
                        ViewState["List_Type"] = "5";
                    }
                    if (Request.Params["Inst"] == "6")
                    {
                        lblInstruction.Text = "To select an administrator, type the administrator’s "
                                              + "name in the search field below. Type the "
                                              + "administrator’s name in the order Last Name, First Name (i.e., Smith, Jane).  The more you "
                                              + "type, the more accurate the search results (capitalization does not affect the search results).";
                        lblHeading.Text        = "Administrator Search:";
                        ViewState["List_Type"] = "6";
                    }
                    if (Request.Params["Inst"] == "8")
                    {
                        lblInstruction.Text = "To route Career Development Plan to another supervisor, type the supervisor’s name in "
                                              + "the search field below to find and select a different supervisor.  Type the "
                                              + "supervisor’s name in the order Last Name, First Name (i.e., Smith, Jane).  The "
                                              + "more you type, the more accurate the search results (capitalization does not affect the search results).";
                        lblTitle.Text          = "Select a Supervisor";
                        lblHeading.Text        = "Route to a Supervisor Search:";
                        ViewState["List_Type"] = "1";
                    }
                }
                SetHeaderInformation();
                if (Request.Params["start"] != null)
                {
                    if (Request.Params["start"].Trim() != "")
                    {
                        DrawGrid();
                        txtSearch.Text = Request.Params["start"];
                        lnkbtnGo_Click(null, null);
                        return;
                    }
                }
            }
            DrawGrid();
        }
コード例 #22
0
 protected void Page_Load(object sender, EventArgs e)
 {
     #region BasTemplate
     if (!IsPostBack)
     {
         Template.BasTemplate objBasTemplate = new Template.BasTemplate();
         try
         {
             if (Request.Cookies["Session_ID"] == null)
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", false);
             }
             string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, true);
             if (strResult != "")
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                 return;
             }
             objBasTemplate.SetSeatchField(0);
             objBasTemplate.ShowNotes                  = false;
             LblTemplateHeader2.Text                   = objBasTemplate.Header2();
             ViewState["AccessType"]                   = objBasTemplate.strAccessType;
             ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
             ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
             ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
             ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
             ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
             ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
             ViewState["User_ID"]           = objBasTemplate.strUser_ID;
             ViewState["User_Name"]         = objBasTemplate.strUser_Name;
             ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
             // Wizard
             string strpnlXML = objBasTemplate.PanelXML();
             if (strpnlXML != "")
             {
                 if (strpnlXML.IndexOf("Error:") != -1)
                 {
                     Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strpnlXML, true);
                     return;
                 }
                 ViewState["CurrGrp"]           = objBasTemplate.Wizard_Value("CurrGrp");
                 ViewState["CurrGrpTtl"]        = objBasTemplate.Wizard_Value("CurrGrpTtl");
                 ViewState["CurrGrpUrl"]        = objBasTemplate.Wizard_Value("CurrGrpUrl");
                 ViewState["CurrStp"]           = objBasTemplate.Wizard_Value("CurrStp");
                 ViewState["CurrStpTtl"]        = objBasTemplate.Wizard_Value("CurrStpTtl");
                 ViewState["CurrStpUrl"]        = objBasTemplate.Wizard_Value("CurrStpUrl");
                 ViewState["Is_Step_Completed"] = objBasTemplate.Wizard_Value("Is_Step_Completed");
                 ViewState["NextGrp"]           = objBasTemplate.Wizard_Value("NextGrp");
                 ViewState["NextGrpTtl"]        = objBasTemplate.Wizard_Value("NextGrpTtl");
                 ViewState["NextGrpUrl"]        = objBasTemplate.Wizard_Value("NextGrpUrl");
                 ViewState["NextStp"]           = objBasTemplate.Wizard_Value("NextStp");
                 ViewState["NextStpTtl"]        = objBasTemplate.Wizard_Value("NextStpTtl");
                 ViewState["NextStpUrl"]        = objBasTemplate.Wizard_Value("NextStpUrl");
                 ViewState["NoGrp"]             = objBasTemplate.Wizard_Value("NoGrp");
                 ViewState["NoStpInGrp"]        = objBasTemplate.Wizard_Value("NoStpInGrp");
                 ViewState["PrvGrp"]            = objBasTemplate.Wizard_Value("PrvGrp");
                 ViewState["PrvGrpTtl"]         = objBasTemplate.Wizard_Value("PrvGrpTtl");
                 ViewState["PrvGrpUrl"]         = objBasTemplate.Wizard_Value("PrvGrpUrl");
                 ViewState["PrvStp"]            = objBasTemplate.Wizard_Value("PrvStp");
                 ViewState["PrvStpTtl"]         = objBasTemplate.Wizard_Value("PrvStpTtl");
                 ViewState["PrvStpUrl"]         = objBasTemplate.Wizard_Value("PrvStpUrl");
             }
         }
         catch (Exception ex)
         {
             string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
             Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
         }
         finally
         {
             objBasTemplate.CleanUp();
             objBasTemplate.Dispose();
         }
     }
     #endregion
     ProcessCommad();
     if (!string.IsNullOrEmpty(hidCommand.Value))
     {
         if (hidCommand.Value.Equals("DoLoad"))
         {
             hidCommand.Value = string.Empty;
             LoadImage();
             return;
         }
         if (hidCommand.Value.Equals("DoSave"))
         {
             hidCommand.Value = string.Empty;
             //btnSave_Click(null, null);
             DoSave();
             return;
         }
     }
     btnLoad.Attributes.Add("onclick", "Do_Load()");
     btnSave.Attributes.Add("onclick", "Do_Save()");
     if (!IsPostBack)
     {
         ViewState["Employee_Number"] = Data.UsedEmployeeNumber2(ViewState["Employee_Number"].ToString(), Request.Cookies["Session_ID"].Value.ToString());
         Bas_Utility.Utilities.SetValidators(this.Page);
         Oracle.DataAccess.Client.OracleConnection conn = SQLStatic.SQL.OracleConnection();
         try
         {
             ViewState["Book"] = SQLStatic.Sessions.GetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "BookRequest", conn);
             ViewState["Request_Record_ID"] = SQLStatic.Sessions.GetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "Request_Record_ID", conn);
             ViewState["AppStatus"]         = Data.ApplicationStatus(ViewState["Request_Record_ID"].ToString());
             ViewState["Product_Code"]      = SQLStatic.Sessions.GetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "Product_Code", conn);
             lblBalance.Text     = Data.AvailableAmount(ViewState["Employee_Number"].ToString(), ViewState["Processing_Year"].ToString(), conn);
             lblCourseTitle.Text = Data.CourseName(ViewState["Request_Record_ID"].ToString(), conn);
         }
         finally
         {
             conn.Close();
             conn.Dispose();
         }
         RadTabStrip1.Tabs[0].Selected = true;
         RadTabStrip1_TabClick(null, null);
         SetHeaderInformation();
         Data.FillBudgetYears(ddlBudgetYear, lblBalance, ViewState["Employee_Number"].ToString(), ViewState["Processing_Year"].ToString());
         ProcessesStarFunctionality();
         SetupWizardMenu();
     }
 }
コード例 #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            session_id = Request.Cookies["Session_ID"].Value.ToString();
            #region BasTemplate
            if (!IsPostBack)
            {
                Template.BasTemplate objBasTemplate = new Template.BasTemplate();
                try
                {
                    if (Request.Cookies["Session_ID"] == null)
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
                    }
                    string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
                    if (strResult != "")
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                        return;
                    }
                    ViewState["AccessType"]                   = objBasTemplate.strAccessType;
                    ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
                    ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
                    ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
                    ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
                    ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
                    ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
                    ViewState["User_ID"]           = objBasTemplate.strUser_ID;
                    ViewState["User_Name"]         = objBasTemplate.strUser_Name;
                    ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
                }
                catch (Exception ex)
                {
                    string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
                    Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
                }
                finally
                {
                    objBasTemplate.CleanUp();
                    objBasTemplate.Dispose();
                }
            }
            #endregion

            if (!IsPostBack)
            {
                SetupTabStrip1.SetTabIndex(4);
                SetAccountName();
                ViewState["rbAccount"] = rblAccounts.Items[1].Text;
                //DataTable tbl = Data.CoveragsPageItems();
                //rblItem.Items.Clear();
                //rblItem.DataTextField = "Text";
                //rblItem.DataValueField = "Value";
                //rblItem.DataSource = tbl;
                //rblItem.DataBind();
                GetText();
                FillClassCode();
                setupCurrentShowCost();
            }


            DrawGrid();
            DrawGridBenefit();
        }
コード例 #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            session_id     = Request.Cookies["Session_ID"].Value.ToString();
            lblScript.Text = string.Empty;
            #region BasTemplate
            if (!IsPostBack)
            {
                if ((Request.Params["SkipCheck"] == null) || (Request.Params["SkipCheck"] != "YES"))
                {
                    SQLStatic.Sessions.SetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "main_run", Request.Path + "?SkipCheck=YES");
                    Response.Redirect("/web_projects/PTemplate/index.htm");
                    return;
                }

                Template.BasTemplate objBasTemplate = new Template.BasTemplate();
                try
                {
                    if (Request.Cookies["Session_ID"] == null)
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
                    }
                    string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
                    if (strResult != "")
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                        return;
                    }
                    ViewState["AccessType"]                   = objBasTemplate.strAccessType;
                    ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
                    ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
                    ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
                    ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
                    ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
                    ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
                    ViewState["User_ID"]           = objBasTemplate.strUser_ID;
                    ViewState["User_Name"]         = objBasTemplate.strUser_Name;
                    ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
                }
                catch (Exception ex)
                {
                    string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
                    Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
                }
                finally
                {
                    objBasTemplate.CleanUp();
                    objBasTemplate.Dispose();
                }
            }
            #endregion
            if (ViewState["Employee_Number"].ToString().Equals("0"))
            {
                SQLStatic.Sessions.SetSessionValue(session_id, "MYBACKPAGE", Request.Path + "?SkipCheck=YES");
                Response.Redirect("/web_projects/Employee_Search/default.aspx?inner=1&SkipCheck=YES", true);
                return;
            }
            if (!IsPostBack)
            {
                ViewState["dep_id"] = SQLStatic.Sessions.GetSessionValue(session_id, "DEPENDDEP");
                if (!string.IsNullOrEmpty(ViewState["dep_id"].ToString()))
                {
                    ViewState["back"] = SQLStatic.Sessions.GetSessionValue(session_id, "DEPENBACK");
                    btnDone.Visible   = true;
                    SQLStatic.Sessions.SetSessionValue(session_id, "DEPENDDEP", string.Empty);
                    SQLStatic.Sessions.SetSessionValue(session_id, "DEPENBACK", string.Empty);
                }

                if (!string.IsNullOrEmpty(Request.Params["OE"]))
                {
                    btnDone.Visible = false;
                }
                else
                {
                    lblWarning.Text = "<span style='color: red;'><strong><span style='font-size: 11pt; font-family: Calibri, sans-serif;'>No Dependents to validate</span></strong></span>";
                }
                if (string.IsNullOrEmpty(Request.Params["cat"]))
                {
                    lblInstruction.Visible = false;
                }
                lblInstruction2.Text = lblInstruction2.Text.Replace("[effectiv]", Data.RequiredSubmissionDate(ViewState["Employee_Number"].ToString(), ViewState["Processing_Year"].ToString()));
                lblEEName.Text       = "<b>Employee</b>&nbsp;" + SQLStatic.EmployeeData.employee_name_(ViewState["Employee_Number"].ToString()) + " (ID#" + ViewState["Employee_Number"].ToString() + ")";

                if (SQLStatic.AccountData.RetaAccount(ViewState["Selected_Account_Number"].ToString()))
                {
                    ViewState["NonReta"] = 0;
                }
                else
                {
                    lblInstruction2.Visible = false;
                    ViewState["NonReta"]    = 1;
                }
                dvFax.Visible     = false;
                dvFaxSent.Visible = Data.showuploadedFaxes(ViewState["Employee_Number"].ToString()).Equals("1");
                rgFax.Visible     = dvFaxSent.Visible;
            }


            if (!string.IsNullOrEmpty(hidUpload.Value))
            {
                dvFax.Visible = false;
                OpenRow(hidUpload.Value);
                ProcessUpload(hidUpload.Value);
                hidUpload.Value = string.Empty;
            }

            if (!string.IsNullOrEmpty(hidFax.Value))
            {
                OpenRow(hidFax.Value);
                ProcessFax(hidFax.Value);
                hidFax.Value = string.Empty;
            }

            if (!string.IsNullOrEmpty(hid1.Value))
            {
                hid1.Value = string.Empty;

                ResetPage();

                //DrawGrid();
            }
            if (!string.IsNullOrEmpty(hidRemove.Value))
            {
                Data.RemoveDocument(hidRemove.Value);
                hidRemove.Value = string.Empty;
                ResetPage();

                //DrawGrid();
            }
            if (!string.IsNullOrEmpty(hidRemoveFax.Value))
            {
                Data.RemoveFax(hidRemoveFax.Value, ViewState["User_Name"].ToString());
                hidRemoveFax.Value = string.Empty;
                dvFax.Visible      = false;
                dvFaxSent.Visible  = Data.showuploadedFaxes(ViewState["Employee_Number"].ToString()).Equals("1");
                rgFax.Visible      = dvFaxSent.Visible;
                if (rgFax.Visible)
                {
                    DrawrgFax();
                }
                ResetPage();

                //DrawGrid();
            }
        }
コード例 #25
0
 private void Page_Load(object sender, System.EventArgs e)
 {
     if (Training_Source.TrainingClass.SessionHasTimeOut(Request.Cookies["Session_ID"].Value.ToString()))
     {
         Response.Redirect("/Web_Projects/trn/PLA/out.aspx?message=Your Session has timed out" + "&backurl=0", true);
     }
     lblScript.Text = "";
     lblError.Text  = "";
     #region PopUp BasTemplate
     if (!IsPostBack)
     {
         Template.BasTemplate objBasTemplate = new Template.BasTemplate();
         try
         {
             if (Request.Cookies["Session_ID"] == null)
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
             }
             string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
             if (strResult != "")
             {
                 Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult.Replace("\n", "~"), false);
                 return;
             }
             if (Request.Params["s"] == "v")
             {
                 LblTemplateHeader2.Text = "Expense Detail";
             }
             else
             {
                 objBasTemplate.SetSeatchField(0);
                 objBasTemplate.ShowNotes = false;
                 LblTemplateHeader2.Text  = objBasTemplate.Header2();
             }
             ViewState["AccessType"]                   = objBasTemplate.strAccessType;
             ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
             ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
             ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
             ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
             ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
             ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
             ViewState["User_ID"]           = objBasTemplate.strUser_ID;
             ViewState["User_Name"]         = objBasTemplate.strUser_Name;
             ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
         }
         catch (Exception ex)
         {
             string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
             Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
         }
         finally
         {
             objBasTemplate.CleanUp();
             objBasTemplate.Dispose();
         }
     }
     #endregion
     if (!IsPostBack)
     {
         Training_Source.TrainingClass.SetValidators(Page);
         ViewState["Employee_Number"] = Training_Source.TrainingClass.UsedEmployeeNumber2(ViewState["Employee_Number"].ToString(), Request.Cookies["Session_ID"].Value.ToString());
         lblBalance.Text                = Training_Source.TrainingClass.AvailableAmount(ViewState["Employee_Number"].ToString(), ViewState["Processing_Year"].ToString());
         ViewState["Session_ID"]        = Request.Cookies["Session_ID"].Value.ToString();
         ViewState["Request_Record_ID"] = SQLStatic.Sessions.GetSessionValue(ViewState["Session_ID"].ToString(), "Request_Record_ID", Training_Source.TrainingClass.ConnectioString);
         ViewState["AppStatus"]         = Training_Source.TrainingClass.ApplicationStatus(ViewState["Request_Record_ID"].ToString());
         SetHeaderInformation();
         FillExpenseType();
         FillSatesDropDown();
         FillContries();
         HighLightKeyFields();
         if (Request.Params["expid"] != "-1")
         {
             GetExistingData();
         }
         else
         {
             SetValue(ddlContries, "USA");
         }
         if (txtVedorName.Text == "FDIC ETV")
         {
             optlstVendor.SelectedIndex = 2;
             optlstVendor_SelectedIndexChanged(null, null);
         }
         SetInView();
         string strProcessingYear = SQLStatic.Sessions.GetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "CoursePY", Training_Source.TrainingClass.ConnectioString);
         if (strProcessingYear == "")
         {
             strProcessingYear = ViewState["Processing_Year"].ToString();
         }
         ViewState["App_Processing_Year"] = strProcessingYear;
         Training_Source.TrainingClass.FillBudgetYears(ddlBudgetYear, lblBalance, ViewState["Employee_Number"].ToString(), strProcessingYear);
         rbVendor.Text = optlstVendor.SelectedItem.Text;
         ddlContries_SelectedIndexChanged(null, null);
         optlstVendor_SelectedIndexChanged(null, null);
     }
     HandleContractors();
     if (!(Request.Form["doSave"] == null || Request.Form["doSave"] == ""))
     {
         string strGoTo = Request.Form["doSave"].Replace("'", "");
         doSave.Value = "";
         this.Validate();
         if (this.IsValid)
         {
             if (DoSave())
             {
                 Response.Redirect("TrainingExpenses.aspx?Admin=" + Request.Params["Admin"]);
             }
             htmBtnSave.Disabled = false;
         }
     }
 }
コード例 #26
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            if (!IsPostBack)
            {
                string strURL         = "/Web_Projects/trn/PLA_Approval/PayorPendingApprovals.aspx";
                string strSetLeftMenu =
                    "<script>window.open('/web_projects/ptemplate/left.aspx?callingurl=" + strURL + "','MyEnroll_available_programs_listing_menu_frame')</script>";
                Page.ClientScript.RegisterStartupScript(Page.GetType(), "strSetLeftMenu", strSetLeftMenu);
            }
            if (PLA_Approval.TrainingClass.SessionHasTimeOut(Request.Cookies["Session_ID"].Value.ToString()))
            {
                Response.Redirect("/Web_Projects/trn/PLA/out.aspx?message=Your Session has timed out" + "&backurl=0", true);
            }
            lblError.Text = "";
            #region BasTemplate
            if (!IsPostBack)
            {
                if ((Request.Params["SkipCheck"] == null) || (Request.Params["SkipCheck"] != "YES"))
                {
                    SQLStatic.Sessions.SetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "main_run", Request.Path + "?SkipCheck=YES", PLA_Approval.TrainingClass.ConnectionString);
                    Response.Redirect("/web_projects/PTemplate/index.htm");
                    return;
                }
                Template.BasTemplate objBasTemplate = new Template.BasTemplate();
                try
                {
                    if (Request.Cookies["Session_ID"] == null)
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
                    }
                    string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
                    if (strResult != "")
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                        return;
                    }
                    objBasTemplate.SetSeatchField(0);
                    objBasTemplate.ShowNotes                  = false;
                    LblTemplateHeader2.Text                   = objBasTemplate.Header2();
                    ViewState["AccessType"]                   = objBasTemplate.strAccessType;
                    ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
                    ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
                    ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
                    ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
                    ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
                    ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
                    ViewState["User_ID"]           = objBasTemplate.strUser_ID;
                    ViewState["User_Name"]         = objBasTemplate.strUser_Name;
                    ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;

                    // setup header information. You need to add the "2nd" and "3rd" parmeter.
                }
                catch (Exception ex)
                {
                    string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
                    Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
                }
                finally
                {
                    objBasTemplate.CleanUp();
                    objBasTemplate.Dispose();
                }
            }
            #endregion
            inReadOnly = PLA_Approval.TrainingClass.IsReadOnly(Request.Cookies["Session_ID"].Value.ToString());
            if ((hidReroute.Value != "") && (hidReroute.Value == "Reroute"))
            {
                hidReroute.Value = "";
                RerouteApplication();
            }
            if (!IsPostBack)
            {
                string strWhat = SQLStatic.Sessions.GetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "ddlWhatAdmin");
                if (!string.IsNullOrEmpty(strWhat))
                {
                    try
                    {
                        ddlWhat.SelectedIndex = Convert.ToInt16(strWhat);
                    }
                    catch { }
                }
                if ((ViewState["Employee_Number"].ToString() == "") || (ViewState["Employee_Number"].ToString() == "0"))
                {
                    string strRunOut = "<script>document.location.replace('/WEB_PROJECTS/TRN/PLA/out.aspx?message=You must select an employee first');</script>";
                    Page.ClientScript.RegisterStartupScript(Page.GetType(), "strRunOut", strRunOut);
                    return;
                }
                if (!ProductCodeNotExists())
                {
                    Response.Redirect("/Web_Projects/trn/PLA/out.aspx?message=Your Employer has not selected the Training Product for Processing_Year " + ViewState["Processing_Year"].ToString(), true);
                }

                if ((ViewState["User_ID"] == null) || (ViewState["User_ID"].ToString() == ""))
                {
                    Response.Redirect("/Web_Projects/trn/PLA/out.aspx?message= Failed to connect to the program. You might not have the proper authorization. Please contact MyEnroll.com at " + PLA_Approval.TrainingClass.HelpPhoneNumber(), true);
                }

                if (ViewState["User_Group_ID"].ToString() != "1")
                {
//					if (ViewState["User_Primary_Role"].ToString() != "100407")
                    if (!inReadOnly)
                    {
                        if (!PLA_Approval.TrainingClass.CanAccessOtherApplications(ViewState["User_ID"].ToString()))
                        {
                            if (!SetEmployeeNumber())
                            {
                                Response.Redirect("/Web_Projects/trn/PLA/out.aspx?message=Your MyEnroll Employee Number is not defined. Please Contact MyEnroll.com @ " +
                                                  PLA_Approval.TrainingClass.HelpPhoneNumber(), true);
                            }
                        }
                    }
                }

                if (ViewState["Employee_Number"].ToString() == "0")
                {
                    Response.Redirect("/Web_Projects/trn/PLA/out.aspx?message=You must select the Payor's Employee Number first", true);
                }

                if (ViewState["User_Group_ID"].ToString() != "1")
                {
//					if (ViewState["User_Primary_Role"].ToString() != "100407")
                    if (!inReadOnly)
                    {
                        string strMesg = PLA_Approval.TrainingClass.IsPayorDataOk(ViewState["Employee_Number"].ToString());
                        if (strMesg != "")
                        {
                            string strRunOut = "<script>document.location.replace('/Web_Projects/trn/PLA/out.aspx?message=" + strMesg + "');</script>";
                            Page.ClientScript.RegisterStartupScript(Page.GetType(), "strRunOut", strRunOut);
                            return;
                        }
                        //Response.Redirect("/Web_Projects/trn/PLA/out.aspx?message="+strMesg,true);
                    }
                }
                if (PLA_Approval.TrainingClass.CanAccessOtherApplications(ViewState["User_ID"].ToString()))
                {
                    string strSelectedEmployeeNumber = PLA_Approval.TrainingClass.UsedEmployeeNumber(ViewState["Employee_Number"].ToString(), Request.Cookies["Session_ID"].Value.ToString());
                    if (strSelectedEmployeeNumber != ViewState["Employee_Number"].ToString())
                    {
                        ViewState["Employee_Number"] = strSelectedEmployeeNumber;
                    }
                    lnkbtnSelectEmployee.Visible      = true;
                    lnkbtnSystemAdministrator.Visible = true;
                }
                //--------------------------------
                if ((inReadOnly) && (PLA_Approval.TrainingClass.isAdministrator(ViewState["Employee_Number"].ToString())))
                {
                    string strSelectedEmployeeNumber = PLA_Approval.TrainingClass.UsedEmployeeNumber(ViewState["Employee_Number"].ToString(), Request.Cookies["Session_ID"].Value.ToString());
                    if (strSelectedEmployeeNumber != ViewState["Employee_Number"].ToString())
                    {
                        ViewState["Employee_Number"] = strSelectedEmployeeNumber;
                    }
                }
                // ---------------------------------
                SetUsersEmployeeNumber();
                //SetCurrentProcessingYear();
                SetHeaderInformation();
                SQLStatic.Sessions.SetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "From_Who", "Payor", PLA_Approval.TrainingClass.ConnectionString);
                ProcessesStarFunctionality();
                processes_Reroute();
            }
            lblProcessing_Year.Text = ViewState["Processing_Year"].ToString();
            DrawGrid();
            HandleContractors();
        }
コード例 #27
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            if (Training_Source.TrainingClass.SessionHasTimeOut(Request.Cookies["Session_ID"].Value.ToString()))
            {
                Response.Redirect("/Web_Projects/trn/PLA/out.aspx?message=Your Session has timed out" + "&backurl=0", true);
            }
            bool Viewed = SQLStatic.Sessions.GetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "Viewed") == "1";

            if (Viewed)
            {
                Response.Redirect("/Web_Projects/trn/PLA/SelectAccountCategory.aspx?SkipCheck=YES");
                return;
            }

            #region BasTemplate
            if (!IsPostBack)
            {
                if ((Request.Params["SkipCheck"] == null) || (Request.Params["SkipCheck"] != "YES"))
                {
                    if (!SQLStatic.Misc.pTemplateOn(Request.Cookies["Session_ID"].Value.ToString()))
                    {
                        SQLStatic.Sessions.SetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "main_run", Request.Path + "?SkipCheck=YES", Training_Source.TrainingClass.ConnectioString);
                        Response.Redirect("/web_projects/PTemplate/index.htm");
                        return;
                    }
                }
                Template.BasTemplate objBasTemplate = new Template.BasTemplate();
                try
                {
                    if (Request.Cookies["Session_ID"] == null)
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
                    }
                    string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
                    if (strResult != "")
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                        return;
                    }
                    objBasTemplate.SetSeatchField(0);
                    objBasTemplate.ShowNotes                  = false;
                    LblTemplateHeader2.Text                   = objBasTemplate.Header2();
                    ViewState["AccessType"]                   = objBasTemplate.strAccessType;
                    ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
                    ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
                    ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
                    ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
                    ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
                    ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
                    ViewState["User_ID"]           = objBasTemplate.strUser_ID;
                    ViewState["User_Name"]         = objBasTemplate.strUser_Name;
                    ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;

                    // setup header information. You need to add the "2nd" and "3rd" parmeter.
                }
                catch (Exception ex)
                {
                    string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
                    Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
                }
                finally
                {
                    objBasTemplate.CleanUp();
                    objBasTemplate.Dispose();
                }
            }
            #endregion

            if (!IsPostBack)
            {
                if ((ViewState["Employee_Number"].ToString() == "") || (ViewState["Employee_Number"].ToString() == "0"))
                {
                    Response.Redirect("out.aspx?message=You must select an employee first ", true);
                }
                if (!ProductCodeNotExists())
                {
                    Response.Redirect("out.aspx?message=Your Employer has not selected the Training Product for Processing_Year " + ViewState["Processing_Year"].ToString(), true);
                }
                SQLStatic.Sessions.SetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "FOUND_EMPLOYEE_NUMBER", "", Training_Source.TrainingClass.ConnectioString);
                if ((ViewState["User_ID"] == null) || (ViewState["User_ID"].ToString() == ""))
                {
                    Response.Redirect("out.aspx?message= \"Request and Manage Training\" failed to connect to the program. You might not have the proper authorization. Please contact MyEnroll.com at " + Training_Source.TrainingClass.HelpPhoneNumber(), true);
                }
                if (ViewState["User_Group_ID"].ToString() == "2")
                {
                    Response.Redirect("out.aspx?message=" + "You are currently logged in as Benefit Administrator. You must logon as an Employee to access this program.", true);
                    return;
                }
                if (ViewState["User_Group_ID"].ToString() != "1")
                {
                    if (!Training_Source.TrainingClass.IsReadOnly(Request.Cookies["Session_ID"].Value.ToString()))
                    {
                        if (!Training_Source.TrainingClass.CanAccessOtherApplications(ViewState["User_ID"].ToString()))                         //not super user
                        {
                            if (!SetEmployeeNumber())
                            {
                                Response.Redirect("/Web_Projects/trn/PLA/out.aspx?message=Your MyEnroll Employee Number is not defined. Please Contact MyEnroll.com @ " +
                                                  Training_Source.TrainingClass.HelpPhoneNumber(), true);
                            }
                        }
                    }
                }

                if (ViewState["Employee_Number"].ToString() == "0")
                {
                    Response.Redirect("out.aspx?message=You must select an employee first", true);
                }

                //if (ViewState["User_Group_ID"].ToString()!="1")
                //{
                //    string strMesg = Training_Source.TrainingClass.IsEeDataOk(ViewState["Employee_Number"].ToString());
                //    if (strMesg!="")
                //        Response.Redirect("out.aspx?message="+strMesg,true);
                //}
                SetCurrentProcessingYear();

                ViewState["Account_Number"]  = Training_Source.TrainingClass.GetAccountNumber(ViewState["Employee_Number"].ToString());
                lbl_fldPLAPrivacyNotice.Text = Training_Source.TrainingClass.Privacy_Statement(ViewState["Employee_Number"].ToString());
                SetPageHeader();
            }
        }
コード例 #28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Request.Params["stay"]))
            {
                if (string.IsNullOrEmpty(Request.Params["OE"]))
                {
                    Response.Redirect("DefaultOld.aspx?SkipCheck=YES", true);
                }
                if (SQLStatic.Sessions.GetSessionValue(session_id, "SESSION_CALLING_MODULE").Equals("L"))
                {
                    Response.Redirect("DefaultOld.aspx?SkipCheck=YES", true);
                }
            }
            if (string.IsNullOrEmpty(Request.Cookies["Session_ID"].Value.ToString()))
            {
                Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Your Session has timed out", true);
                return;
            }
            session_id = Request.Cookies["Session_ID"].Value.ToString();
            #region BasTemplate
            if (!IsPostBack)
            {
                if ((Request.Params["SkipCheck"] == null) || (Request.Params["SkipCheck"] != "YES"))
                {
                    SQLStatic.Sessions.SetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "main_run", Request.Path + "?SkipCheck=YES");
                    Response.Redirect("/web_projects/PTemplate/index.htm");
                    return;
                }

                Template.BasTemplate objBasTemplate = new Template.BasTemplate();
                try
                {
                    if (Request.Cookies["Session_ID"] == null)
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
                    }
                    string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
                    if (strResult != "")
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                        return;
                    }
                    ViewState["AccessType"]                   = objBasTemplate.strAccessType;
                    ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
                    ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
                    ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
                    ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
                    ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
                    ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
                    ViewState["User_ID"]           = objBasTemplate.strUser_ID;
                    ViewState["User_Name"]         = objBasTemplate.strUser_Name;
                    ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
                }
                catch (Exception ex)
                {
                    string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
                    Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
                }
                finally
                {
                    objBasTemplate.CleanUp();
                    objBasTemplate.Dispose();
                }
            }
            #endregion

            if (!IsPostBack)
            {
                dvChoise.Visible     = false;
                dvRemoveCvrg.Visible = false;
                HidOE.Value          = SQLStatic.Sessions.GetSessionValue(session_id, "SESSION_CALLING_MODULE");
                if (inOE())
                {
                    //dvTop.Visible = false;
                    dvAll.Attributes["class"] = "fullWidth";
                    setPageText();
                }
                else
                {
                    dvAll.Attributes["class"] = "AddEditMain";
                }
                if (!string.IsNullOrEmpty(Request.Params["OE"]))
                {
                    dvHeaderText.Visible = false;
                }
                rgNeedDoc.MasterTableView.GetColumn("Submit_doc_link").ItemStyle.ForeColor = System.Drawing.Color.Blue;
            }
            if (!string.IsNullOrEmpty(HidDeoID.Value))
            {
                dvAll.Visible    = false;
                dvChoise.Visible = true;
                SetDepName(HidDeoID.Value);
                ViewState["TermDep"] = HidDeoID.Value;
                HidDeoID.Value       = string.Empty;
            }
            if (!string.IsNullOrEmpty(hiRemove.Value))
            {
                hiRemove.Value       = string.Empty;
                dvRemoveCvrg.Visible = false;
                string TerminationDate = Data.LastDayInCurrentYear(ViewState["Selected_Account_Number"].ToString());
                Data.terminate_All_dep_cvrg(ViewState["TermDep"].ToString(), ViewState["Processing_Year"].ToString(),
                                            TerminationDate, "1000", ViewState["User_Name"].ToString());
                btnCancel_Click(null, null);
            }
        }
コード例 #29
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            Table1.Visible = false;
            return;

            if (PLA_Approval.TrainingClass.SessionHasTimeOut(Request.Cookies["Session_ID"].Value.ToString()))
            {
                Response.Redirect("/Web_Projects/trn/PLA/out.aspx?message=Your Session has timed out" + "&backurl=0", true);
            }
            lblScript.Text = "";
            #region BasTemplate
            if (!IsPostBack)
            {
                if ((Request.Params["SkipCheck"] == null) || (Request.Params["SkipCheck"] != "YES"))
                {
                    SQLStatic.Sessions.SetSessionValue(Request.Cookies["Session_ID"].Value.ToString(), "main_run", Request.Path + "?SkipCheck=YES", PLA_Approval.TrainingClass.ConnectionString);
                    Response.Redirect("/web_projects/PTemplate/index.htm");
                    return;
                }
                Template.BasTemplate objBasTemplate = new Template.BasTemplate();
                try
                {
                    if (Request.Cookies["Session_ID"] == null)
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
                    }
                    string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
                    if (strResult != "")
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                        return;
                    }
                    objBasTemplate.SetSeatchField(0);
                    objBasTemplate.ShowNotes                  = false;
                    LblTemplateHeader2.Text                   = objBasTemplate.Header2();
                    ViewState["AccessType"]                   = objBasTemplate.strAccessType;
                    ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
                    ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
                    ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
                    ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
                    ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
                    ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
                    ViewState["User_ID"]           = objBasTemplate.strUser_ID;
                    ViewState["User_Name"]         = objBasTemplate.strUser_Name;
                    ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;

                    // setup header information. You need to add the "2nd" and "3rd" parmeter.
                }
                catch (Exception ex)
                {
                    string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
                    Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
                }
                finally
                {
                    objBasTemplate.CleanUp();
                    objBasTemplate.Dispose();
                }
            }
            #endregion
            if (!IsPostBack)
            {
                SetCurrentProcessingYear();
                SetHeaderInformation();
                ProcessesStarFunctionality();
                SetupItems();
                CheckForAddBudget();
            }
            HandleContractors();
        }
コード例 #30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            session_id = Request.Cookies["Session_ID"].Value.ToString();
            #region BasTemplate
            if (!IsPostBack)
            {
                Template.BasTemplate objBasTemplate = new Template.BasTemplate();
                try
                {
                    if (Request.Cookies["Session_ID"] == null)
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=Cookie not found. Please signon first", true);
                    }
                    string strResult = objBasTemplate.Authenticate(Request.Cookies["Session_ID"].Value.ToString(), Request.Url.Authority.ToString(), Request.Url.AbsolutePath.ToString(), true, false);
                    if (strResult != "")
                    {
                        Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strResult, false);
                        return;
                    }
                    objBasTemplate.SetSeatchField(0);
                    objBasTemplate.ShowFontSizeSelector       = false;
                    objBasTemplate.ShowNotes                  = false;
                    objBasTemplate.ShowProcessingYear         = true;
                    ViewState["AccessType"]                   = objBasTemplate.strAccessType;
                    ViewState["Employee_Number"]              = objBasTemplate.strEmployee_Number;
                    ViewState["Processing_Year"]              = objBasTemplate.strProcessingYear;
                    ViewState["Role_Restriction_Level"]       = objBasTemplate.strRole_Restriction_Level;
                    ViewState["Selected_Account_Number"]      = objBasTemplate.strSelected_Account_Number;
                    ViewState["Selected_Employee_Class_Code"] = objBasTemplate.strSelected_Employee_Class_Code;
                    ViewState["User_Group_ID"]                = objBasTemplate.strUser_Group_ID;
                    ViewState["User_ID"]           = objBasTemplate.strUser_ID;
                    ViewState["User_Name"]         = objBasTemplate.strUser_Name;
                    ViewState["User_Primary_Role"] = objBasTemplate.strUser_Primary_Role;
                }
                catch (Exception ex)
                {
                    string strError = "Error Message: " + ex.Message + "~~Application:" + ex.Source + "~~Method:" + ex.TargetSite + "~~Detail:" + ex.StackTrace;
                    Response.Redirect("/web_projects/login_error/ErrorPage.aspx?error=" + strError.Replace("\n", "~"));
                }
                finally
                {
                    objBasTemplate.CleanUp();
                    objBasTemplate.Dispose();
                }
            }
            #endregion
            lblScript.Text = string.Empty;
            if (!IsPostBack)
            {
                Oracle.DataAccess.Client.OracleConnection conn = SQLStatic.SQL.OracleConnection();
                try
                {
                    ViewState["Account_number"] = SQLStatic.Sessions.GetSessionValue(session_id, "ACCOUNT_NUMBER", conn);
                    ViewState["Version"]        = SQLStatic.Sessions.GetSessionValue(session_id, "Version", conn);
                    ViewState["class_code"]     = SQLStatic.Sessions.GetSessionValue(session_id, "class_code", conn);

                    ViewState["category_code"]   = SQLStatic.Sessions.GetSessionValue(session_id, "category_code", conn);
                    ViewState["category_plan"]   = SQLStatic.Sessions.GetSessionValue(session_id, "category_plan", conn);
                    ViewState["PROCESSING_YEAR"] = SQLStatic.Sessions.GetSessionValue(session_id, "PROCESSING_YEAR", conn);
                    ViewState["CVRG"]            = SQLStatic.Sessions.GetSessionValue(session_id, "CVRG", conn);
                    ViewState["CVRGID"]          = SQLStatic.Sessions.GetSessionValue(session_id, "CVRGID", conn);
                }

                finally
                {
                    SQLStatic.SQL.CloseConnection(conn);
                }
            }
            btnRestRates.Attributes.Add("onclick", "CheckRestRate()");
            if (!string.IsNullOrEmpty(hidReset.Value))
            {
                hidSave.Value = string.Empty;

                RestRate();
                Response.Redirect("/WEB_PROJECTS/Rates/Default.aspx", true);
                return;
            }
        }