'length' is null or not an object Telerik.Web.UI.WebResource.axd

4 posts, 0 answers
  1. Carl
    Carl avatar
    2 posts
    Member since:
    Mar 2014

    Posted 17 Mar 2014 Link to this post

    I am very green with using the Telerik Controls and AJAX as a whole.

    I am taking over coding a Project that was first developed with Visual Studio 2003, .NET 1.1 and Rad Controls.

    I am now trying to upgrade the whole Project to Visual Studio 2010, .NET 4.5 and the Latest Telerik Web UI Controls (2014.1 225).

    Everything seems to be working ok now but I have this error in IE8

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3)
    Timestamp: Mon, 17 Mar 2014 12:05:26 UTC


    Message: 'length' is null or not an object
    Line: 1982
    Char: 1
    Code: 0
    URI: http://localhost/PolsDev/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=EmployeeDetails1_ctlAjax_ScriptManager0_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ac9cbdec3-c810-4e87-846c-fb25a7c08002%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2013.3.1324.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a597c6a37-3447-4509-ba46-0faaa25cf6f9%3a16e4e7cd%3aed16cbdc%3af7645509%3a88144a7a%3a24ee1bba%3af46195d3%3a2003d0b8%3a1e771326%3aaa288e2d.

    The page seems to load but at the bottom is this error.

    Any help is appreciated.


























  2. Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 19 Mar 2014 Link to this post

    Hi Carl,

    I am sorry to say but the information provided is not sufficient for us to determine what is causing the problem. Could you please share with us the markup and code-behind of the problematic page so we could examine the implementation? Additionally please list us the steps that one must perform in order to reproduce the issue.

    Regards,
    Angel Petrov
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Carl
    Carl avatar
    2 posts
    Member since:
    Mar 2014

    Posted 19 Mar 2014 Link to this post

    Ok hope this helps

    0001.protected override void OnInit(EventArgs e)
    0002.{
    0003.   try
    0004.   {
    0005.      InitializeScreen();
    0006.   }
    0007.   catch(Exception ex)
    0008.   {
    0009.      HandleError(ex);
    0010.   }
    0011. 
    0012.   base.OnInit (e);
    0013.}
    0014. 
    0015.      private void InitializeScreen()
    0016.{
    0017.   try
    0018.   {
    0019.      #region Initialize Screen Code Section
    0020. 
    0021.      #region Setup Error Label Control Section
    0022. 
    0023.      lblErrorMessage.ForeColor = System.Drawing.Color.Red;
    0024.      lblErrorMessage.ID = "lblErrorMessage0";
    0025.      Controls.Add(lblErrorMessage);
    0026. 
    0027.      #endregion
    0028. 
    0029.      #region Get QueryString Values
    0030.           
    0031.      try
    0032.      {
    0033.         if (Page.Request.QueryString[ProjectConstants.QUERYSTRING_PYRLL_STMT_ID] != null)
    0034.         {
    0035.            mintPyrllStmtId = Convert.ToInt32(HttpUtility.UrlDecode(this.Page.Request.QueryString[ProjectConstants.QUERYSTRING_PYRLL_STMT_ID].ToString()));
    0036.            //cv6 ViewState["PyrllStmtId"] = mintPyrllStmtId;
    0037.         }
    0038.         else
    0039.         {
    0040.            mintPyrllStmtId = 0;
    0041.            //cv6 ViewState["PyrllStmtId"] = 0;
    0042.         }
    0043.               
    0044.      }
    0045.      catch(Exception)
    0046.      {
    0047.         mintPyrllStmtId = 0;
    0048.         //cv6 ViewState["PyrllStmtId"] = 0;
    0049.      }
    0050. 
    0051.      try
    0052.      {
    0053.         if (Page.Request.QueryString[ProjectConstants.QUERYSTRING_EMP_DETAIL_ID] != null)
    0054.         {
    0055.            mintEmpDetailId = Convert.ToInt32(HttpUtility.UrlDecode(this.Page.Request.QueryString[ProjectConstants.QUERYSTRING_EMP_DETAIL_ID].ToString()));
    0056.         }
    0057.         else
    0058.         {
    0059.            mintEmpDetailId = 0;
    0060.         }
    0061.      }
    0062.      catch(Exception)
    0063.      {
    0064.         mintEmpDetailId = 0;
    0065.         //cv6 ViewState["mintEmpDetailId"] = 0;
    0066.      }
    0067. 
    0068. 
    0069.      try
    0070.      {
    0071.         if (Page.Request.QueryString[ProjectConstants.QUERYSTRING_ORG_ID] != null)
    0072.            mintOrgId = Convert.ToInt32(HttpUtility.UrlDecode(this.Page.Request.QueryString[ProjectConstants.QUERYSTRING_ORG_ID].ToString()));
    0073.         else
    0074.            mintOrgId = 0;
    0075.      }
    0076.      catch(Exception)
    0077.      {
    0078.         mintOrgId = 0;
    0079.      }
    0080. 
    0081.      try
    0082.      {
    0083.         if (Page.Request.QueryString[ProjectConstants.QUERYSTRING_ORG_NAME] != null)
    0084.            mstrOrganizationName = HttpUtility.UrlDecode(this.Page.Request.QueryString[ProjectConstants.QUERYSTRING_ORG_NAME].ToString());
    0085.         else
    0086.            mstrOrganizationName = string.Empty;
    0087.      }
    0088.      catch(Exception)
    0089.      {
    0090.         mstrOrganizationName = string.Empty;
    0091.      }
    0092. 
    0093.      try
    0094.      {
    0095.         if (Page.Request.QueryString[ProjectConstants.QUERYSTRING_ORIGINATOR] != null)
    0096.         {
    0097.            mstrOriginatingScreen = HttpUtility.UrlDecode(this.Page.Request.QueryString[ProjectConstants.QUERYSTRING_ORIGINATOR].ToString());
    0098.         }
    0099.         else
    0100.         {
    0101.            mstrOriginatingScreen = string.Empty;
    0102.         }
    0103. 
    0104.      }
    0105.      catch(Exception)
    0106.      {
    0107.         mstrOriginatingScreen = string.Empty;
    0108.      }
    0109. 
    0110.      try
    0111.      {
    0112.         if (Page.Request.QueryString[ProjectConstants.QUERYSTRING_SEARCH_EMP_ID] != null)
    0113.            mstrSearchEmpId = HttpUtility.UrlDecode(this.Page.Request.QueryString[ProjectConstants.QUERYSTRING_SEARCH_EMP_ID].ToString());
    0114.         else
    0115.            mstrSearchEmpId = string.Empty;
    0116.      }
    0117.      catch(Exception)
    0118.      {
    0119.         mstrSearchEmpId = string.Empty;
    0120.      }
    0121. 
    0122.      try
    0123.      {
    0124.         if (Page.Request.QueryString[ProjectConstants.QUERYSTRING_SEARCH_FIRST_NAME] != null)
    0125.            mstrSearchFName = HttpUtility.UrlDecode(this.Page.Request.QueryString[ProjectConstants.QUERYSTRING_SEARCH_FIRST_NAME].ToString());
    0126.         else
    0127.            mstrSearchFName = string.Empty;
    0128.      }
    0129.      catch(Exception)
    0130.      {
    0131.         mstrSearchFName = string.Empty;
    0132.      }
    0133. 
    0134.      try
    0135.      {
    0136.         if (Page.Request.QueryString[ProjectConstants.QUERYSTRING_SEARCH_LAST_NAME] != null)
    0137.            mstrSearchLName = HttpUtility.UrlDecode(this.Page.Request.QueryString[ProjectConstants.QUERYSTRING_SEARCH_LAST_NAME].ToString());
    0138.         else
    0139.            mstrSearchLName = string.Empty;
    0140.      }
    0141.      catch(Exception)
    0142.      {
    0143.         mstrSearchLName = string.Empty;
    0144.      }
    0145. 
    0146.      try
    0147.      {
    0148.         if (Page.Request.QueryString[ProjectConstants.QUERYSTRING_SEARCH_SIN] != null)
    0149.            mstrSearchSIN = HttpUtility.UrlDecode(this.Page.Request.QueryString[ProjectConstants.QUERYSTRING_SEARCH_SIN].ToString());
    0150.         else
    0151.            mstrSearchSIN = string.Empty;
    0152.      }
    0153.      catch(Exception)
    0154.      {
    0155.         mstrSearchSIN = string.Empty;
    0156.      }
    0157. 
    0158.      try
    0159.      {
    0160.         if (Page.Request.QueryString[ProjectConstants.QUERYSTRING_SEARCH_FIELD_VAL_ID] != null)
    0161.            mstrSearchFieldValId = HttpUtility.UrlDecode(this.Page.Request.QueryString[ProjectConstants.QUERYSTRING_SEARCH_FIELD_VAL_ID].ToString());
    0162.         else
    0163.            mstrSearchFieldValId = string.Empty;
    0164.      }
    0165.      catch(Exception)
    0166.      {
    0167.         mstrSearchFieldValId = string.Empty;
    0168.      }
    0169. 
    0170.      try
    0171.      {
    0172.         if (Page.Request.QueryString[ProjectConstants.QUERYSTRING_SEARCH_EXCEPTIONS_ONLY] != null)
    0173.            mstrSearchExceptionsOnly = HttpUtility.UrlDecode(this.Page.Request.QueryString[ProjectConstants.QUERYSTRING_SEARCH_EXCEPTIONS_ONLY].ToString());
    0174.         else
    0175.            mstrSearchExceptionsOnly = string.Empty;
    0176.      }
    0177.      catch(Exception)
    0178.      {
    0179.         mstrSearchExceptionsOnly = string.Empty;
    0180.      }
    0181. 
    0182.      try
    0183.      {
    0184.         //  We only want to set this field if it was passed in.  If we were not passed it, then we do not want to reset any values...
    0185.         if (Page.Request.QueryString[ProjectConstants.QUERYSTRING_SEARCH_MIN_ROW_TO_FETCH] != null)
    0186.         {
    0187.            int intTmpMaxRowToFetchValue ;
    0188. 
    0189.            tbMinRowToFetch.Value = HttpUtility.UrlDecode(this.Page.Request.QueryString[ProjectConstants.QUERYSTRING_SEARCH_MIN_ROW_TO_FETCH].ToString());
    0190.            intTmpMaxRowToFetchValue = Convert.ToInt32(tbMinRowToFetch.Value) + ProjectConstants.DEFAULT_SEARCH_FETCH_SIZE - 1 ;
    0191.            tbMaxRowToFetch.Value = intTmpMaxRowToFetchValue.ToString() ;
    0192.         }
    0193. 
    0194.      }
    0195.      catch(Exception)
    0196.      {
    0197.         // do nothing
    0198.      }
    0199. 
    0200.      #endregion
    0201. 
    0202.      #region Get User Id Section
    0203. 
    0204.      mintUserId = ProjectFunctions.GetUserId(Page);
    0205. 
    0206.      #endregion
    0207. 
    0208.      #region Get list of Role Acces to Module for the Username logged in and Organization Id
    0209.      string strUsername = ProjectFunctions.GetUsernameLoggedIn(Page);
    0210.      objArrRoleAccModSelXml = mobjWSEmployerServices.GetRoleAccessModList(strUsername,Convert.ToDecimal(mintOrgId),  ref mobjWSError, mstrLanguage);
    0211. 
    0212.      // If an error occured in the web service create a message for the administrator.
    0213.      // and throw an exception with the technical message.
    0214.      if (mobjWSError.Message != null)
    0215.      {
    0216.         string strTechnicalMsg = "An Error has occured in a critical area of PIBA Online Servies <BR>";
    0217.         strTechnicalMsg += "Task: Get Organization Selections for User logged in. <BR>";
    0218.         strTechnicalMsg += "Time:" + System.DateTime.Now + " <BR>";
    0219.         strTechnicalMsg += "Web Service: WSUpload <BR>";
    0220.         strTechnicalMsg += "Method: GetOrgSelectionList <BR>";
    0221.         strTechnicalMsg += "Error Context: Username " + strUsername + "<BR>";
    0222.         strTechnicalMsg += "User: "  + "<BR>";
    0223.         strTechnicalMsg += "Error Returned: " + mobjWSError.Message + "<BR>";
    0224.         mboolSendCriticalErr = true;
    0225. 
    0226.         throw new Exception(strTechnicalMsg);
    0227.      }
    0228. 
    0229.      #endregion           
    0230. 
    0231.      #region Initialize Controls Section
    0232. 
    0233.      InitializeControls(Controls, mintEmpDetailId.ToString()); 
    0234. 
    0235.      #endregion
    0236. 
    0237.      #endregion
    0238.   }
    0239.   catch(Exception ex)
    0240.   {
    0241.      HandleError(ex);
    0242.   }
    0243.}
    0244. 
    0245.public void InitializeControls(ControlCollection Controls, string IdGeneratorSeed)
    0246.{
    0247.   try
    0248.   {
    0249.      #region Initialize Controls Code
    0250. 
    0251.      #region Ajax Controls
    0252. 
    0253.      #region Ajax Ids
    0254. 
    0255.      ctlAjax_Manager.ID = "ctlAjax_Manager" + IdGeneratorSeed;
    0256.      ctlAjax_ldgPanel.ID = "ctlAjax_ldgPanel" + IdGeneratorSeed;
    0257.      ctlAjax_ldgPanelCombo.ID = "ctlAjax_ldgPanelCombo" + IdGeneratorSeed;
    0258.      ctlAjax_RequiredFields.ID = "ctlAjax_RequiredFields" + IdGeneratorSeed;
    0259.      ctlAjax_RequiredFieldsNew.ID = "ctlAjax_RequiredFieldsNew" + IdGeneratorSeed;
    0260.      ctlAjax_ScriptManager.ID = "ctlAjax_ScriptManager" + IdGeneratorSeed;
    0261. 
    0262.      #endregion
    0263. 
    0264.      #region Ajax Properties Section
    0265. 
    0266.      Image imgLoading = new Image();
    0267.      Image imgLoadingCombo = new Image();
    0268.      Image imgLoadingText = new Image();
    0269. 
    0270.      imgLoading.ID = "imgLoading" + IdGeneratorSeed;
    0271.      imgLoading.ImageUrl = ProjectFunctions.ImageLocation() + "POLSLoading.gif";
    0272.      imgLoadingCombo.ID = "imgLoadingCombo" + IdGeneratorSeed;
    0273.      imgLoadingCombo.ImageUrl = ProjectFunctions.ImageLocation() + "POLSLoading.gif";
    0274. 
    0275.      imgLoadingText.ID = "imgLoadingText" + IdGeneratorSeed;
    0276.      imgLoadingText.ImageUrl = ProjectFunctions.ImageLocation() + "POLSLoadingText.gif";
    0277. 
    0278.      ctlAjax_ldgPanel.Controls.Add(imgLoadingText);
    0279.      ctlAjax_ldgPanel.Controls.Add(imgLoading);
    0280.      ctlAjax_ldgPanel.IsSticky = true;
    0281.      ctlAjax_ldgPanel.BackColor = System.Drawing.Color.Gray;
    0282.      ctlAjax_ldgPanel.BorderColor = System.Drawing.Color.LightGray;
    0283.      ctlAjax_ldgPanel.BorderWidth = 3;
    0284. 
    0285.      ctlAjax_ldgPanelCombo.Controls.Add(imgLoadingCombo);
    0286.      ctlAjax_ldgPanelCombo.IsSticky = false;
    0287. 
    0288.      #endregion
    0289. 
    0290.      #region Add Controls to Ajax Section
    0291. 
    0292.      ctlAjax_RequiredFields.Controls.Add(rfvEmployersEmployeeNumber);
    0293.      //ctlAjax_RequiredFields.Controls.Add(revPersonBirthDate);
    0294.      ctlAjax_RequiredFields.Controls.Add(cvPersonBirthDate);
    0295.      ctlAjax_RequiredFields.Controls.Add(revPersonSIN);
    0296.      ctlAjax_RequiredFields.Controls.Add(rfvPersonSIN);
    0297.      ctlAjax_RequiredFields.Controls.Add(revOldSIN);
    0298.      //ctlAjax_RequiredFields.Controls.Add(revEeStatusStartDate);
    0299.      ctlAjax_RequiredFields.Controls.Add(cvEeStatusStartDate);
    0300.      //ctlAjax_RequiredFields.Controls.Add(revEeCntrctChangeDate);
    0301.      ctlAjax_RequiredFields.Controls.Add(cvEeCntrctChangeDate);
    0302.      ctlAjax_RequiredFields.Controls.Add(revEeCntrctedToWork);
    0303.      ctlAjax_RequiredFields.Controls.Add(revEeFullTime);
    0304. 
    0305.      ctlAjax_RequiredFieldsNew.Controls.Add(rfvEmployersEmployeeNumberNew);
    0306.      ctlAjax_RequiredFieldsNew.Controls.Add(revPersonBirthDateNew);
    0307.      ctlAjax_RequiredFieldsNew.Controls.Add(cvPersonBirthDateNew);
    0308.      ctlAjax_RequiredFieldsNew.Controls.Add(revPersonSINNew);
    0309.      ctlAjax_RequiredFieldsNew.Controls.Add(rfvPersonSINNew);
    0310.      ctlAjax_RequiredFieldsNew.Controls.Add(revOldSINNew);
    0311.      //ctlAjax_RequiredFieldsNew.Controls.Add(revEeStatusStartDateNew);
    0312.      ctlAjax_RequiredFieldsNew.Controls.Add(cvEeStatusStartDateNew);
    0313.      //ctlAjax_RequiredFieldsNew.Controls.Add(revEeCntrctChangeDateNew);
    0314.      ctlAjax_RequiredFieldsNew.Controls.Add(cvEeCntrctChangeDateNew);
    0315.      ctlAjax_RequiredFieldsNew.Controls.Add(revEeCntrctedToWorkNew);
    0316.      ctlAjax_RequiredFieldsNew.Controls.Add(revEeFullTimeNew);
    0317. 
    0318.      #endregion
    0319. 
    0320.      #region Add Ajax Controls
    0321. 
    0322.      Controls.Add(ctlAjax_ScriptManager);
    0323.      Controls.Add(ctlAjax_Manager);
    0324.      Controls.Add(ctlAjax_RequiredFields);
    0325.      Controls.Add(ctlAjax_RequiredFieldsNew);
    0326.      Controls.Add(ctlAjax_ldgPanel);
    0327.      Controls.Add(ctlAjax_ldgPanelCombo);
    0328.       
    0329. 
    0330.      #endregion
    0331. 
    0332.      #endregion
    0333. 
    0334.      InitializeEmpSearchToolBarControls();
    0335. 
    0336.      #region Resource String Section
    0337. 
    0338.      imgEmployeeDetailEdit.ToolTip = mrmResStrings.GetString("PayrollMaintenance.EmployeeEdit.ToolTip");
    0339.      //imgHistory.ToolTip = mrmResStrings.GetString("EmployeeAudit.imgHistory.ToolTip");
    0340.      btnViewHistory.ToolTip = mrmResStrings.GetString("EmployeeAudit.imgHistory.ToolTip");
    0341.      btnSaveEmployee.Text = mrmResStrings.GetString("EmployeeDetails.btnSaveEmployee.Text");
    0342.      btnCancel.Value = mrmResStrings.GetString("EmployeeDetails.btnCancel.Text");
    0343.      btnDeleteEmployee.ToolTip = mrmResStrings.GetString("PayrollMaintenance.EmployeeDelete.ToolTip");      
    0344.      btnReValEmployee.ToolTip = mrmResStrings.GetString("EmployeeDetails.imgRevalidateEmp.ToolTip");
    0345.      btnAddEmployee.Text = mrmResStrings.GetString("EmployeeDetails.btnSaveEmployee.Text");
    0346.      btnCancel.Value = mrmResStrings.GetString("EmployeeDetails.btnCancel.Text");
    0347.      btnCancelNew.Value = mrmResStrings.GetString("EmployeeDetails.btnCancel.Text");
    0348.      imgAddPension.ToolTip = mrmResStrings.GetString("EmployeeDetails.imgAddPension.ToolTip");
    0349.      imgAddInsurance.ToolTip = mrmResStrings.GetString("EmployeeDetails.imgAddInsurance.ToolTip");
    0350.      string strDelPrompt = mrmResStrings.GetString("PayrollMaintenance.EmployeeDeleteMsg.Prompt");
    0351. 
    0352.      #region Required Fields Resource String Section
    0353. 
    0354.      rfvEmployersEmployeeNumber.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.EmployersEmployeeNumberRequired.ErrorMessage");
    0355.      //revPersonBirthDate.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.PersonBirthDateFormat.ErrorMessage");
    0356.      cvPersonBirthDate.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.PersonBirthDateFormat.ErrorMessage");
    0357.      revPersonSIN.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.PersonSINFormat.ErrorMessage");
    0358.      rfvPersonSIN.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.PersonSINRequired.ErrorMessage");
    0359.      revOldSIN.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.OldSINFormat.ErrorMessage");
    0360.      //revEeStatusStartDate.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.EeStatusStartDateFormat.ErrorMessage");
    0361.      cvEeStatusStartDate.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.EeStatusStartDateFormat.ErrorMessage");
    0362.      //revEeCntrctChangeDate.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.EeCntrctChangeDateFormat.ErrorMessage");
    0363.      cvEeCntrctChangeDate.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.EeCntrctChangeDateFormat.ErrorMessage");
    0364.      revEeCntrctedToWork.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.EeCntrctedToWorkFormat.ErrorMessage");
    0365.      revEeFullTime.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.EeFullTimeFormat.ErrorMessage");
    0366. 
    0367.      rfvEmployersEmployeeNumberNew.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.EmployersEmployeeNumberRequired.ErrorMessage");
    0368.      revPersonBirthDateNew.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.PersonBirthDateFormat.ErrorMessage");
    0369.      cvPersonBirthDateNew.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.PersonBirthDateFormat.ErrorMessage");
    0370.      revPersonSINNew.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.PersonSINFormat.ErrorMessage");
    0371.      rfvPersonSINNew.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.PersonSINRequired.ErrorMessage");
    0372.      revOldSINNew.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.OldSINFormat.ErrorMessage");
    0373.      //revEeStatusStartDateNew.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.EeStatusStartDateFormat.ErrorMessage");
    0374.      cvEeStatusStartDateNew.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.EeStatusStartDateFormat.ErrorMessage");
    0375.      //revEeCntrctChangeDateNew.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.EeCntrctChangeDateFormat.ErrorMessage");
    0376.      cvEeCntrctChangeDateNew.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.EeCntrctChangeDateFormat.ErrorMessage");
    0377.      revEeCntrctedToWorkNew.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.EeCntrctedToWorkFormat.ErrorMessage");
    0378.      revEeFullTimeNew.ErrorMessage = mrmResStrings.GetString("EmployeeDetails.EeFullTimeFormat.ErrorMessage");
    0379. 
    0380.      #endregion
    0381. 
    0382.      #endregion
    0383. 
    0384.      #region Image Properties Section
    0385. 
    0386.      imgAddPension.ImageUrl = ProjectFunctions.ImageLocation() + "PolsAddPension.gif";
    0387.      imgAddPension.ImageAlign = ImageAlign.AbsMiddle;
    0388.      imgAddPension.CssClass = "toggle";
    0389.      imgAddPension.ToolTip = mrmResStrings.GetString("EmployeeDetails.imgAddPension.ToolTip");
    0390.      imgAddPension.Attributes.Add("onClick", "javascript: togglePensionDetailsSection('" + ProjectConstants.NEW_RECORD_ID + "','true');");
    0391.      imgAddPension.Attributes.Add("onMouseOver", "javascript: document.body.style.cursor = 'hand';");
    0392.      imgAddPension.Attributes.Add("onMouseOut", "javascript: document.body.style.cursor = 'default';");
    0393. 
    0394.      imgAddInsurance.ImageUrl = ProjectFunctions.ImageLocation() + "PolsAddPension.gif";
    0395.      imgAddInsurance.ImageAlign = ImageAlign.AbsMiddle;
    0396.      imgAddInsurance.CssClass = "toggle";
    0397.      imgAddInsurance.ToolTip = mrmResStrings.GetString("EmployeeDetails.imgAddInsurance.ToolTip");
    0398.      imgAddInsurance.Attributes.Add("onClick", "javascript: toggleInsuranceDetailsSection('" + ProjectConstants.NEW_RECORD_ID + "','true');");
    0399.      imgAddInsurance.Attributes.Add("onMouseOver", "javascript: document.body.style.cursor = 'hand';");
    0400.      imgAddInsurance.Attributes.Add("onMouseOut", "javascript: document.body.style.cursor = 'default';");
    0401. 
    0402.      imgEmployeeDetailAdd.ImageUrl = ProjectFunctions.ImageLocation() + "PolsAddPension.gif";
    0403.      imgEmployeeDetailAdd.Attributes.Add("onClick", "javascript: toggleNewEmployeeDetailsSection();");
    0404.      imgEmployeeDetailAdd.Attributes.Add("onMouseOver", "javascript: document.body.style.cursor = 'hand';");
    0405.      imgEmployeeDetailAdd.Attributes.Add("onMouseOut", "javascript: document.body.style.cursor = 'default';");
    0406.      imgEmployeeDetailAdd.ToolTip = mrmResStrings.GetString("PayrollMaintenance.AddEmployee.Label");
    0407.      imgEmployeeDetailAdd.CssClass = "toggle";
    0408. 
    0409.      #endregion
    0410. 
    0411.      #region Datagrid Properties Section
    0412. 
    0413.      dgEmpValidations.ItemCommand += new DataGridCommandEventHandler(dgEmpValidations_ItemCommand);
    0414.      dgEmpValidations.ItemDataBound += new DataGridItemEventHandler(dgEmpValidations_ItemDataBound);
    0415.           
    0416.      #endregion
    0417. 
    0418.      #region TextBox Properties Section
    0419. 
    0420.      tbEmployersEmployeeNumber.MaxLength = 20;
    0421.      tbEmployersEmployeeNumber.Width = System.Web.UI.WebControls.Unit.Pixel(60);
    0422.      tbPersonTitle.MaxLength = 5;
    0423.      tbPersonTitle.Width = System.Web.UI.WebControls.Unit.Pixel(35);
    0424.      tbPersonFirstName.MaxLength = 24;
    0425.      tbPersonFirstName.Width = System.Web.UI.WebControls.Unit.Pixel(105);
    0426.      tbPersonMidInitial.MaxLength = 1;
    0427.      tbPersonMidInitial.Width = System.Web.UI.WebControls.Unit.Pixel(16);
    0428.      tbPersonLastName.MaxLength = 30;
    0429.      tbPersonLastName.Width = System.Web.UI.WebControls.Unit.Pixel(105);
    0430.      tbPersonBirthDate.MaxLength = Constants.MAX_DATE_LENGTH;
    0431.      tbPersonBirthDate.Width = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DATE_FIELD);
    0432.      tbPersonSIN.MaxLength = 9;
    0433.      tbPersonSIN.Width = System.Web.UI.WebControls.Unit.Pixel(72);
    0434.      tbOldSIN.MaxLength = 9;
    0435.      tbOldSIN.Width = System.Web.UI.WebControls.Unit.Pixel(72);
    0436.      tbEeStatusStartDate.MaxLength = Constants.MAX_DATE_LENGTH;
    0437.      tbEeStatusStartDate.Width = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DATE_FIELD);
    0438.      tbEeCntrctedToWork.MaxLength = 7;
    0439.      tbEeCntrctedToWork.Width = System.Web.UI.WebControls.Unit.Pixel(55);
    0440.      tbEeCntrctChangeDate.MaxLength = Constants.MAX_DATE_LENGTH;
    0441.      tbEeCntrctChangeDate.Width = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DATE_FIELD);
    0442.      tbEeFullTime.MaxLength = 7;
    0443.      tbEeFullTime.Width = System.Web.UI.WebControls.Unit.Pixel(55);
    0444.      tbPositionNumber.MaxLength = 20;
    0445.      tbPositionNumber.Width = System.Web.UI.WebControls.Unit.Pixel(72);
    0446.      tbLocation.MaxLength = 10;
    0447.      tbLocation.Width = System.Web.UI.WebControls.Unit.Pixel(72);
    0448. 
    0449.      tbPercEmployment.Width = System.Web.UI.WebControls.Unit.Pixel(55);
    0450.      tbPercEmployment.MaxLength = 7;
    0451.      tbPercEmployment.ReadOnly = true;
    0452. 
    0453.      tbEmployersEmployeeNumberNew.MaxLength = 20;
    0454.      tbEmployersEmployeeNumberNew.Width = System.Web.UI.WebControls.Unit.Pixel(60);
    0455.      tbPersonTitleNew.MaxLength = 5;
    0456.      tbPersonTitleNew.Width = System.Web.UI.WebControls.Unit.Pixel(40);
    0457.      tbPersonFirstNameNew.MaxLength = 24;
    0458.      tbPersonFirstNameNew.Width = System.Web.UI.WebControls.Unit.Pixel(130);
    0459.      tbPersonMidInitialNew.MaxLength = 1;
    0460.      tbPersonMidInitialNew.Width = System.Web.UI.WebControls.Unit.Pixel(16);
    0461.      tbPersonLastNameNew.MaxLength = 30;
    0462.      tbPersonLastNameNew.Width = System.Web.UI.WebControls.Unit.Pixel(130);
    0463.      tbPersonBirthDateNew.MaxLength = Constants.MAX_DATE_LENGTH;
    0464.      tbPersonBirthDateNew.Width = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DATE_FIELD);
    0465.      tbPersonSINNew.MaxLength = 9;
    0466.      tbPersonSINNew.Width = System.Web.UI.WebControls.Unit.Pixel(72);
    0467.      tbOldSINNew.MaxLength = 9;
    0468.      tbOldSINNew.Width = System.Web.UI.WebControls.Unit.Pixel(72);
    0469.      tbEeStatusStartDateNew.MaxLength = Constants.MAX_DATE_LENGTH;
    0470.      tbEeStatusStartDateNew.Width = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DATE_FIELD);
    0471.      tbEeCntrctedToWorkNew.MaxLength = 7;
    0472.      tbEeCntrctedToWorkNew.Width = System.Web.UI.WebControls.Unit.Pixel(55);
    0473.      tbEeCntrctChangeDateNew.MaxLength = Constants.MAX_DATE_LENGTH;
    0474.      tbEeCntrctChangeDateNew.Width = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DATE_FIELD);
    0475.      tbEeFullTimeNew.MaxLength = 7;
    0476.      tbEeFullTimeNew.Width = System.Web.UI.WebControls.Unit.Pixel(55);
    0477.      tbPositionNumberNew.MaxLength = 20;
    0478.      tbPositionNumberNew.Width = System.Web.UI.WebControls.Unit.Pixel(80);
    0479.      tbLocationNew.MaxLength = 10;
    0480.      tbLocationNew.Width = System.Web.UI.WebControls.Unit.Pixel(80);
    0481.           
    0482.      tbPercEmploymentNew.Width = System.Web.UI.WebControls.Unit.Pixel(55);
    0483.      tbPercEmploymentNew.MaxLength = 7;
    0484.      tbPercEmploymentNew.ReadOnly = true;
    0485.           
    0486.      #endregion
    0487. 
    0488.      #region Drop Down List Properties Section
    0489. 
    0490.      ddlBargainingUnitTCode.Skin = "Windows7";
    0491.      ddlBargainingUnitTCode.Width = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_FIELD);
    0492.      ddlBargainingUnitTCode.DropDownWidth = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_EXPANDED);
    0493.      ddlBargainingUnitTCode.Height = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.HEIGHT_DDL_FIELD);
    0494.      ddlBargainingUnitTCode.MarkFirstMatch = true;
    0495.      ddlEmployeeCtrctStatTCode.Width = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_FIELD);
    0496.      ddlEmployeeCtrctStatTCode.Skin = "Windows7";
    0497.      ddlEmployeeCtrctStatTCode.DropDownWidth = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_EXPANDED);
    0498.      ddlEmployeeCtrctStatTCode.Height = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.HEIGHT_DDL_FIELD);
    0499.      ddlEmployeeCtrctStatTCode.MarkFirstMatch = true;
    0500.      ddlEmployeeCtrctTypeTCode.Width = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_FIELD);
    0501.      ddlEmployeeCtrctTypeTCode.Skin = "Windows7";
    0502.      ddlEmployeeCtrctTypeTCode.DropDownWidth = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_EXPANDED);
    0503.      ddlEmployeeCtrctTypeTCode.MarkFirstMatch = true;
    0504.      ddlGenderTCode.Width = System.Web.UI.WebControls.Unit.Pixel(40);
    0505.      ddlGenderTCode.Skin = "Windows7";
    0506.      ddlGenderTCode.DropDownWidth = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_EXPANDED);
    0507.      ddlGenderTCode.MarkFirstMatch = true;
    0508.      ddlTransFromOrgId.Width = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_FIELD);
    0509.      ddlTransFromOrgId.Skin = "Windows7";
    0510.      ddlTransFromOrgId.DropDownWidth = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_EXPANDED);
    0511.      ddlTransFromOrgId.MarkFirstMatch = true;
    0512. 
    0513.      ddlBargainingUnitTCodeNew.Skin = "Windows7";
    0514.      ddlBargainingUnitTCodeNew.Width = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_FIELD);
    0515.      ddlBargainingUnitTCodeNew.DropDownWidth = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_EXPANDED);
    0516.      ddlBargainingUnitTCodeNew.Height = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.HEIGHT_DDL_FIELD);
    0517.      ddlBargainingUnitTCodeNew.MarkFirstMatch = true;
    0518.      ddlEmployeeCtrctStatTCodeNew.Width = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_FIELD);
    0519.      ddlEmployeeCtrctStatTCodeNew.Skin = "Windows7";
    0520.      ddlEmployeeCtrctStatTCodeNew.DropDownWidth = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_EXPANDED);
    0521.      ddlEmployeeCtrctStatTCodeNew.Height = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.HEIGHT_DDL_FIELD);
    0522.      ddlEmployeeCtrctStatTCodeNew.MarkFirstMatch = true;
    0523.      ddlEmployeeCtrctTypeTCodeNew.Width = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_FIELD);
    0524.      ddlEmployeeCtrctTypeTCodeNew.Skin = "Windows7";
    0525.      ddlEmployeeCtrctTypeTCodeNew.DropDownWidth = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_EXPANDED);
    0526.      ddlEmployeeCtrctTypeTCodeNew.MarkFirstMatch = true;
    0527.      ddlGenderTCodeNew.Width = System.Web.UI.WebControls.Unit.Pixel(40);
    0528.      ddlGenderTCodeNew.Skin = "Windows7";
    0529.      ddlGenderTCodeNew.DropDownWidth = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_EXPANDED);
    0530.      ddlGenderTCodeNew.MarkFirstMatch = true;
    0531.      ddlTransFromOrgIdNew.Width = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_FIELD);
    0532.      ddlTransFromOrgIdNew.Skin = "Windows7";
    0533.      ddlTransFromOrgIdNew.DropDownWidth = System.Web.UI.WebControls.Unit.Pixel(ProjectConstants.WIDTH_DDL_EXPANDED);
    0534.      ddlTransFromOrgIdNew.MarkFirstMatch = true;
    0535. 
    0536.      #endregion
    0537. 
    0538.      #region Control ID Section
    0539. 
    0540.      #region Datagrid IDs
    0541. 
    0542.      dgEmpValidations.ID = "dgEmpValidations" + IdGeneratorSeed;
    0543. 
    0544.      #endregion
    0545. 
    0546.      #region DropDownList IDs
    0547. 
    0548.      ddlBargainingUnitTCode.ID = "ddlPEDBargainingUnitTCode" + IdGeneratorSeed;
    0549.      ddlGenderTCode.ID = "ddlPEDGenderTCode" + IdGeneratorSeed;
    0550.      ddlEmployeeCtrctStatTCode.ID = "ddlPEDEmployeeCtrctStatTCode" + IdGeneratorSeed;
    0551.      ddlEmployeeCtrctTypeTCode.ID = "ddlPEDEmployeeCtrctTypeTCode" + IdGeneratorSeed;
    0552.      ddlTransFromOrgId.ID = "ddlPEDTransFromOrgId" + IdGeneratorSeed;
    0553. 
    0554.      ddlBargainingUnitTCodeNew.ID = "ddlBargainingUnitTCodeNew" + IdGeneratorSeed;
    0555.      ddlGenderTCodeNew.ID = "ddlGenderTCodeNew" + IdGeneratorSeed;
    0556.      ddlEmployeeCtrctStatTCodeNew.ID = "ddlEmployeeCtrctStatTCodeNew" + IdGeneratorSeed;
    0557.      ddlEmployeeCtrctTypeTCodeNew.ID = "ddlEmployeeCtrctTypeTCodeNew" + IdGeneratorSeed;
    0558.      ddlTransFromOrgIdNew.ID = "ddlTransFromOrgIdNew" + IdGeneratorSeed;
    0559. 
    0560.      #endregion
    0561. 
    0562.      #region Button IDs
    0563. 
    0564.      btnCancel.ID = "btnCancel" + IdGeneratorSeed;
    0565.      btnSaveEmployee.ID = "btnSaveEmployee" + IdGeneratorSeed;
    0566.      imgEmployeeDetailEdit.ID = "imgEmployeeDetailEdit" + IdGeneratorSeed;
    0567.      //imgHistory.ID = "imgHistory" + IdGeneratorSeed;
    0568.      btnViewHistory.ID = "btnViewHistory" + IdGeneratorSeed;
    0569.      btnAddEmployee.ID = "imgbtnAddEmployee" + IdGeneratorSeed;
    0570.      btnDeleteEmployee.ID = "btnDeleteEmployee" + IdGeneratorSeed;
    0571.      btnReValEmployee.ID = "btnReValEmployee" + IdGeneratorSeed;
    0572.      imgEmployeeDetailAdd.ID = "imgEmployeeDetailAdd" + IdGeneratorSeed;
    0573. 
    0574.      #endregion
    0575. 
    0576.      #region Disable Submit Buttons
    0577. 
    0578.      #endregion
    0579. 
    0580.      #region Image IDs
    0581. 
    0582.      imgAddInsurance.ID = "imgAddInsurance" + IdGeneratorSeed;
    0583.           
    0584.      #endregion
    0585. 
    0586.      #region TextBox Ids
    0587. 
    0588.      tbModCount.ID = "tbModCount" + IdGeneratorSeed;
    0589.      tbEmpDetailId.ID = "tbEmpDetailId" + IdGeneratorSeed;
    0590.      tbEmployersEmployeeNumber.ID = "tbPEDEmployersEmployeeNumber" + IdGeneratorSeed;
    0591.      tbPersonTitle.ID = "tbPEDPersonTitle" + IdGeneratorSeed;
    0592.      tbPersonFirstName.ID = "tbPEDPersonFirstName" + IdGeneratorSeed;
    0593.      tbPersonMidInitial.ID = "tbPEDPersonMidInitial" + IdGeneratorSeed;
    0594.      tbPersonLastName.ID = "tbPEDPersonLastName" + IdGeneratorSeed;
    0595.      tbPersonBirthDate.ID = "tbPEDPersonBirthDate" + IdGeneratorSeed;
    0596.      tbPersonSIN.ID = "tbPEDPersonSIN" + IdGeneratorSeed;
    0597.      tbOldSIN.ID = "tbPEDOldSIN" + IdGeneratorSeed;
    0598.      tbEeStatusStartDate.ID = "tbPEDEeStatusStartDate" + IdGeneratorSeed;
    0599.      tbEeCntrctedToWork.ID = "tbPEDEeCntrctedToWork" + IdGeneratorSeed;
    0600.      tbEeCntrctChangeDate.ID = "tbPEDEeCntrctChangeDate" + IdGeneratorSeed;
    0601.      tbPositionNumber.ID = "tbPEDPositionNumber" + IdGeneratorSeed;
    0602.      tbLocation.ID = "tbPEDLocation" + IdGeneratorSeed;
    0603.      tbEeFullTime.ID = "tbPEDEeFullTime" + IdGeneratorSeed;
    0604.      tbPercEmployment.ID = "tbPEDPercEmployment" + IdGeneratorSeed;
    0605. 
    0606.      tbEmployersEmployeeNumberNew.ID = "tbPEDEmployersEmployeeNumberNew" + IdGeneratorSeed;
    0607.      tbPersonTitleNew.ID = "tbPEDPersonTitleNew" + IdGeneratorSeed;
    0608.      tbPersonFirstNameNew.ID = "tbPEDPersonFirstNameNew" + IdGeneratorSeed;
    0609.      tbPersonMidInitialNew.ID = "tbPEDPersonMidInitialNew" + IdGeneratorSeed;
    0610.      tbPersonLastNameNew.ID = "tbPEDPersonLastNameNew" + IdGeneratorSeed;
    0611.      tbPersonBirthDateNew.ID = "tbPEDPersonBirthDateNew" + IdGeneratorSeed;
    0612.      tbPersonSINNew.ID = "tbPEDPersonSINNew" + IdGeneratorSeed;
    0613.                           
    0614.      tbOldSINNew.ID = "tbPEDOldSINNew" + IdGeneratorSeed;
    0615.      tbEeStatusStartDateNew.ID = "tbPEDEeStatusStartDateNew" + IdGeneratorSeed;
    0616.      tbEeCntrctedToWorkNew.ID = "tbPEDEeCntrctedToWorkNew" + IdGeneratorSeed;
    0617.      tbEeCntrctChangeDateNew.ID = "tbPEDEeCntrctChangeDateNew" + IdGeneratorSeed;
    0618.      tbPositionNumberNew.ID = "tbPEDPositionNumberNew" + IdGeneratorSeed;
    0619.      tbLocationNew.ID = "tbPEDLocationNew" + IdGeneratorSeed;
    0620.      tbEeFullTimeNew.ID = "tbPEDEeFullTimeNew" + IdGeneratorSeed;
    0621.      tbPercEmploymentNew.ID = "tbPercEmploymentNew" + IdGeneratorSeed;
    0622.           
    0623.      #endregion
    0624. 
    0625.      #region Label Ids
    0626. 
    0627.      lblEmployersEmployeeNumber.ID = "lblEmployersEmployeeNumber" + IdGeneratorSeed;
    0628.      lblPersonTitle.ID = "lblPersonTitle" + IdGeneratorSeed;
    0629.      lblPersonFirstName.ID = "lblPersonFirstName" + IdGeneratorSeed;
    0630.      lblPersonMidInitial.ID = "lblPersonMidInitial" + IdGeneratorSeed;
    0631.      lblPersonLastName.ID = "lblPersonLastName" + IdGeneratorSeed;
    0632.      lblPersonBirthDate.ID = "lblPersonBirthDate" + IdGeneratorSeed;
    0633.      lblPersonSIN.ID = "lblPersonSIN" + IdGeneratorSeed;
    0634.      lblOldSIN.ID = "lblOldSIN" + IdGeneratorSeed;
    0635.      lblEeStatusStartDate.ID = "lblEeStatusStartDate" + IdGeneratorSeed;
    0636.      lblEeCntrctChangeDate.ID = "lblEeCntrctChangeDate" + IdGeneratorSeed;
    0637.      lblEeCntrctedToWork.ID = "lblEeCntrctedToWork" + IdGeneratorSeed;
    0638.      lblPercEmployment.ID = "lblPercEmployment" + IdGeneratorSeed;
    0639.      lblEeFullTime.ID = "lblEeFullTime" + IdGeneratorSeed;
    0640.      lblPositionNumber.ID = "lblPositionNumber" + IdGeneratorSeed;
    0641.      lblLocation.ID = "lblLocation" + IdGeneratorSeed;
    0642.      lblEmployeeUploadedTotal.ID = "lblEmployeeUploadedTotal" + IdGeneratorSeed;
    0643.      lblEmployeeCurrentTotal.ID = "lblEmployeeCurrentTotal" + IdGeneratorSeed;
    0644.      lblEmployeeTotalDiff.ID = "lblEmployeeTotalDiff" + IdGeneratorSeed;
    0645.           
    0646.      lblEmployeeCtrctStatTCode.ID = "lblEmployeeCtrctStatTCode" + IdGeneratorSeed;
    0647.      lblGenderTCode.ID = "lblGenderTCode" + IdGeneratorSeed;
    0648.      lblEmployeeCtrctTypeTCode.ID = "lblEmployeeCtrctTypeTCode" + IdGeneratorSeed;
    0649.      lblBargainingUnitTCode.ID = "lblBargainingUnitTCode" + IdGeneratorSeed;
    0650.      lblTransFromOrgId.ID = "lblTransFromOrgId" + IdGeneratorSeed;
    0651. 
    0652.      #endregion
    0653. 
    0654.      #region Field Validators Ids
    0655. 
    0656.      rfvEmployersEmployeeNumber.ID ="rfvPEDEmployersEmployeeNumber" + IdGeneratorSeed;
    0657.      //revPersonBirthDate.ID ="revPEDPersonBirthDate" + IdGeneratorSeed;
    0658.      cvPersonBirthDate.ID ="cvPEDPersonBirthDate" + IdGeneratorSeed;
    0659.      revPersonSIN.ID ="revPEDPersonSIN" + IdGeneratorSeed;
    0660.      rfvPersonSIN.ID ="rfvPEDPersonSIN" + IdGeneratorSeed;
    0661.      revOldSIN.ID ="revPEDOldSIN" + IdGeneratorSeed;
    0662.      //revEeStatusStartDate.ID ="revPEDEeStatusStartDate" + IdGeneratorSeed;
    0663.      rfvEeStatusStartDate.ID ="rfvPEDEeStatusStartDate" + IdGeneratorSeed;
    0664.      cvEeStatusStartDate.ID ="cvPEDEeStatusStartDate" + IdGeneratorSeed;
    0665.      revEeCntrctedToWork.ID ="revPEDEeCntrctedToWork" + IdGeneratorSeed;
    0666.      rfvEeCntrctedToWork.ID ="rfvPEDEeCntrctedToWork" + IdGeneratorSeed;
    0667.      //revEeCntrctChangeDate.ID ="revPEDEeCntrctChangeDate" + IdGeneratorSeed;
    0668.      rfvEeCntrctChangeDate.ID ="rfvPEDEeCntrctChangeDate" + IdGeneratorSeed;
    0669.      cvEeCntrctChangeDate.ID ="cvPEDEeCntrctChangeDate" + IdGeneratorSeed;
    0670.      revEeFullTime.ID ="revPEDEeFullTime" + IdGeneratorSeed;
    0671.      rfvEeFullTime.ID ="rfvPEDEeFullTime" + IdGeneratorSeed;
    0672. 
    0673.      rfvEmployersEmployeeNumberNew.ID ="rfvPEDEmployersEmployeeNumberNew" + IdGeneratorSeed;
    0674.      revPersonBirthDateNew.ID ="revPEDPersonBirthDateNew" + IdGeneratorSeed;
    0675.      cvPersonBirthDateNew.ID ="cvPEDPersonBirthDateNew" + IdGeneratorSeed;
    0676.      revPersonSINNew.ID ="revPEDPersonSINNew" + IdGeneratorSeed;
    0677.      rfvPersonSINNew.ID ="rfvPEDPersonSINNew" + IdGeneratorSeed;
    0678.      revOldSINNew.ID ="revPEDOldSINNew" + IdGeneratorSeed;
    0679.      //revEeStatusStartDateNew.ID ="revPEDEeStatusStartDateNew" + IdGeneratorSeed;
    0680.      rfvEeStatusStartDateNew.ID ="rfvPEDEeStatusStartDateNew" + IdGeneratorSeed;
    0681.      revEeCntrctedToWorkNew.ID ="revPEDEeCntrctedToWorkNew" + IdGeneratorSeed;
    0682.      rfvEeCntrctedToWorkNew.ID ="rfvPEDEeCntrctedToWorkNew" + IdGeneratorSeed;
    0683.      //revEeCntrctChangeDateNew.ID ="revPEDEeCntrctChangeDateNew" + IdGeneratorSeed;
    0684.      rfvEeCntrctChangeDateNew.ID ="rfvPEDEeCntrctChangeDateNew" + IdGeneratorSeed;
    0685.      revEeFullTimeNew.ID ="revPEDEeFullTimeNew" + IdGeneratorSeed;
    0686.      rfvEeFullTimeNew.ID ="rfvPEDEeFullTimeNew" + IdGeneratorSeed;
    0687. 
    0688.      #endregion
    0689. 
    0690.      #region HTML Anchor Ids
    0691.           
    0692.      ancPrevEmpDetail.ID = "ancPrevEmpDetail" + IdGeneratorSeed;
    0693.      ancNextEmpDetail.ID = "ancNextEmpDetail" + IdGeneratorSeed;
    0694.      string strNextLinkText = mrmResStrings.GetString("EmployeeDetails.NextLink.Label");
    0695.      string strPrevLinkText = mrmResStrings.GetString("EmployeeDetails.PreviousLink.Label");
    0696. 
    0697.      ancPrevEmpDetail.InnerText = strPrevLinkText;
    0698.      ancPrevEmpDetail.Title = strPrevLinkText;
    0699.       
    0700. 
    0701.      ancNextEmpDetail.InnerText = strNextLinkText;
    0702.      ancNextEmpDetail.Title = strNextLinkText;
    0703.         
    0704.      #endregion
    0705. 
    0706.      #endregion
    0707. 
    0708.      #region Validation Controls Section
    0709. 
    0710.      rfvEmployersEmployeeNumber.ControlToValidate = tbEmployersEmployeeNumber.ID;
    0711.      rfvEmployersEmployeeNumber.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0712.      rfvEmployersEmployeeNumber.EnableClientScript = false;
    0713.                                    
    0714.      //revPersonBirthDate.ControlToValidate = tbPersonBirthDate.ID;
    0715.      //revPersonBirthDate.ValidationExpression = ProjectConstants.DATE_FORMAT_EXPRESSION;
    0716.      //revPersonBirthDate.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0717.      //revPersonBirthDate.EnableClientScript = false;
    0718.      cvPersonBirthDate.ControlToValidate = tbPersonBirthDate.ID;
    0719.      cvPersonBirthDate.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0720.      cvPersonBirthDate.EnableClientScript = false;
    0721.      cvPersonBirthDate.ClientValidationFunction = "IsValidLeapYear";
    0722. 
    0723.      revPersonSIN.ControlToValidate = tbPersonSIN.ID;
    0724.      revPersonSIN.ValidationExpression = ProjectConstants.SIN_FORMAT_EXPRESSION;
    0725.      revPersonSIN.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0726.      revPersonSIN.EnableClientScript = false;
    0727.                           
    0728.      rfvPersonSIN.ControlToValidate = tbPersonSIN.ID;
    0729.      rfvPersonSIN.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0730.      rfvPersonSIN.EnableClientScript = false;
    0731.                                    
    0732.      revOldSIN.ControlToValidate = tbOldSIN.ID;
    0733.      revOldSIN.ValidationExpression = ProjectConstants.SIN_FORMAT_EXPRESSION;
    0734.      revOldSIN.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0735.      revOldSIN.EnableClientScript = false;
    0736.                                    
    0737.      //revEeStatusStartDate.ControlToValidate = tbEeStatusStartDate.ID;
    0738.      //revEeStatusStartDate.ValidationExpression = ProjectConstants.DATE_FORMAT_EXPRESSION;
    0739.      //revEeStatusStartDate.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0740.      //revEeStatusStartDate.EnableClientScript = false;
    0741.      cvEeStatusStartDate.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0742.      cvEeStatusStartDate.EnableClientScript = false;
    0743. 
    0744.                                    
    0745.      //revEeCntrctChangeDate.ControlToValidate = tbEeCntrctChangeDate.ID;
    0746.      //revEeCntrctChangeDate.ValidationExpression = ProjectConstants.DATE_FORMAT_EXPRESSION;
    0747.      //revEeCntrctChangeDate.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0748.      //revEeCntrctChangeDate.EnableClientScript = false;
    0749.      cvEeCntrctChangeDate.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0750.      cvEeCntrctChangeDate.EnableClientScript = false;
    0751.                                    
    0752.      revEeCntrctedToWork.ControlToValidate = tbEeCntrctedToWork.ID;
    0753.      revEeCntrctedToWork.ValidationExpression = ProjectConstants.NEG_HOURS_FORMAT_EXPRESSION;
    0754.      revEeCntrctedToWork.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0755.      revEeCntrctedToWork.EnableClientScript = false;
    0756.                                    
    0757.      revEeFullTime.ControlToValidate = tbEeFullTime.ID;
    0758.      revEeFullTime.ValidationExpression = ProjectConstants.HOURS_FORMAT_EXPRESSION;
    0759.      revEeFullTime.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0760.      revEeFullTime.EnableClientScript = false;
    0761. 
    0762.      #region New Field Validator Controls Section
    0763.   
    0764.      rfvEmployersEmployeeNumberNew.ControlToValidate = tbEmployersEmployeeNumberNew.ID;
    0765.      rfvEmployersEmployeeNumberNew.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0766.      rfvEmployersEmployeeNumberNew.EnableClientScript = false;
    0767.                            
    0768.      revPersonBirthDateNew.ControlToValidate = tbPersonBirthDateNew.ID;
    0769.      revPersonBirthDateNew.ValidationExpression = ProjectConstants.DATE_FORMAT_EXPRESSION;
    0770.      revPersonBirthDateNew.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0771.      revPersonBirthDateNew.EnableClientScript = false;
    0772.      cvPersonBirthDateNew.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0773.      cvPersonBirthDateNew.EnableClientScript = false;
    0774.                            
    0775.      revPersonSINNew.ControlToValidate = tbPersonSINNew.ID;
    0776.      revPersonSINNew.ValidationExpression = ProjectConstants.SIN_FORMAT_EXPRESSION;
    0777.      revPersonSINNew.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0778.      revPersonSINNew.EnableClientScript = false;
    0779.                   
    0780.      rfvPersonSINNew.ControlToValidate = tbPersonSINNew.ID;
    0781.      rfvPersonSINNew.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0782.      rfvPersonSINNew.EnableClientScript = false;
    0783.                            
    0784.      revOldSINNew.ControlToValidate = tbOldSINNew.ID;
    0785.      revOldSINNew.ValidationExpression = ProjectConstants.SIN_FORMAT_EXPRESSION;
    0786.      revOldSINNew.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0787.      revOldSINNew.EnableClientScript = false;
    0788.                            
    0789.      //revEeStatusStartDateNew.ControlToValidate = tbEeStatusStartDateNew.ID;
    0790.      //revEeStatusStartDateNew.ValidationExpression = ProjectConstants.DATE_FORMAT_EXPRESSION;
    0791.      //revEeStatusStartDateNew.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0792.      //revEeStatusStartDateNew.EnableClientScript = false;
    0793.      cvEeStatusStartDateNew.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0794.      cvEeStatusStartDateNew.EnableClientScript = false;
    0795.                            
    0796.      //revEeCntrctChangeDateNew.ControlToValidate = tbEeCntrctChangeDateNew.ID;
    0797.      //revEeCntrctChangeDateNew.ValidationExpression = ProjectConstants.DATE_FORMAT_EXPRESSION;
    0798.      //revEeCntrctChangeDateNew.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0799.      //revEeCntrctChangeDateNew.EnableClientScript = false;
    0800.      cvEeCntrctChangeDateNew.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0801.      cvEeCntrctChangeDateNew.EnableClientScript = false;
    0802.                            
    0803.      revEeCntrctedToWorkNew.ControlToValidate = tbEeCntrctedToWorkNew.ID;
    0804.      revEeCntrctedToWorkNew.ValidationExpression = ProjectConstants.NEG_HOURS_FORMAT_EXPRESSION;
    0805.      revEeCntrctedToWorkNew.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0806.      revEeCntrctedToWorkNew.EnableClientScript = false;
    0807.                            
    0808.      revEeFullTimeNew.ControlToValidate = tbEeFullTimeNew.ID;
    0809.      revEeFullTimeNew.ValidationExpression = ProjectConstants.HOURS_FORMAT_EXPRESSION;
    0810.      revEeFullTimeNew.Display = System.Web.UI.WebControls.ValidatorDisplay.Dynamic;
    0811.      revEeFullTimeNew.EnableClientScript = false;
    0812.   
    0813.      #endregion
    0814. 
    0815.      #endregion
    0816. 
    0817.      #region Attributes (for calling client-side Javasript)
    0818. 
    0819.      tbEeCntrctedToWork.Attributes.Add("onBlur", "javascript: CalculatePercWork();");
    0820.      tbEeFullTime.Attributes.Add("onBlur", "javascript: CalculatePercWork();");
    0821.           
    0822.      tbEeCntrctedToWorkNew.Attributes.Add("onBlur", "javascript: CalculatePercWorkNewEmployee();");
    0823.      tbEeFullTimeNew.Attributes.Add("onBlur", "javascript: CalculatePercWorkNewEmployee();");
    0824.           
    0825.      tbEeCntrctChangeDate.Attributes.Add("onKeyPress", "javascript: return NoEnter();");
    0826.      tbEeCntrctedToWork.Attributes.Add("onKeyPress", "javascript: return NoEnter();");
    0827.      tbEeFullTime.Attributes.Add("onKeyPress", "javascript: return NoEnter();");
    0828.      tbEeStatusStartDate.Attributes.Add("onKeyPress", "javascript: return NoEnter();");
    0829.      tbEmployersEmployeeNumber.Attributes.Add("onKeyPress", "javascript: return NoEnter();");
    0830.      tbLocation.Attributes.Add("onKeyPress", "javascript: return NoEnter();");
    0831.      tbOldSIN.Attributes.Add("onKeyPress", "javascript: return NoEnter();");
    0832.      tbPercEmployment.Attributes.Add("onKeyPress", "javascript: return NoEnter();");
    0833.      tbPersonBirthDate.Attributes.Add("onKeyPress", "javascript: return NoEnter();");
    0834.      tbPersonFirstName.Attributes.Add("onKeyPress", "javascript: return NoEnter();");
    0835.      tbPersonLastName.Attributes.Add("onKeyPress", "javascript: return NoEnter();");
    0836.      tbPersonMidInitial.Attributes.Add("onKeyPress", "javascript: return NoEnter();");
    0837.      tbPersonSIN.Attributes.Add("onKeyPress", "javascript: return NoEnter();");
    0838.      tbPersonTitle.Attributes.Add("onKeyPress", "javascript: return NoEnter();");
    0839.      tbPositionNumber.Attributes.Add("onKeyPress", "javascript: return NoEnter();");
    0840.           
    0841.      #endregion
    0842. 
    0843.      #region Create Event Handlers.
    0844. 
    0845.      btnDeleteEmployee.Click += new ImageClickEventHandler(btnDeleteEmployee_Click);
    0846.      btnReValEmployee.Click += new ImageClickEventHandler(btnReValEmployee_Click);
    0847.      btnAddEmployee.Click += new EventHandler(btnAddEmployee_Click);
    0848.      btnViewHistory.Click += new ImageClickEventHandler(btnViewHistory_Click);
    0849. 
    0850.      btnViewHistory.Attributes["onclick"] += ";javascript: document.body.style.cursor = 'wait'; this.style.cursor = 'wait' ";
    0851.       
    0852.      #endregion
    0853. 
    0854. 
    0855.      #region Add Controls to Control Collection
    0856.           
    0857.      Controls.Add(dgEmpValidations);
    0858.      Controls.Add(imgAddInsurance);
    0859.      Controls.Add(imgEmployeeDetailEdit);
    0860.      //Controls.Add(imgHistory);
    0861.      Controls.Add(btnViewHistory);
    0862.      Controls.Add(imgEmployeeDetailAdd);
    0863.      Controls.Add(btnAddEmployee);
    0864.      Controls.Add(btnSaveEmployee);
    0865.      Controls.Add(btnDeleteEmployee);
    0866.      Controls.Add(btnReValEmployee);
    0867.      Controls.Add(btnCancel);
    0868. 
    0869.      Controls.Add(lblEmployersEmployeeNumber);
    0870.      Controls.Add(lblPersonTitle);
    0871.      Controls.Add(lblPersonFirstName);
    0872.      Controls.Add(lblPersonMidInitial);
    0873.      Controls.Add(lblPersonLastName);
    0874.      Controls.Add(lblPersonBirthDate);
    0875.      Controls.Add(lblPersonSIN);
    0876.      Controls.Add(lblOldSIN);
    0877.      Controls.Add(lblEeStatusStartDate);
    0878.      Controls.Add(lblEeCntrctChangeDate);
    0879.      Controls.Add(lblEeCntrctedToWork);
    0880.      Controls.Add(lblEeFullTime);
    0881.      Controls.Add(lblPercEmployment);
    0882.      Controls.Add(lblPositionNumber);
    0883.      Controls.Add(lblLocation);
    0884.      Controls.Add(lblEmployeeCtrctStatTCode);
    0885.      Controls.Add(lblEmployeeCtrctTypeTCode);
    0886.      Controls.Add(lblGenderTCode);
    0887.      Controls.Add(lblBargainingUnitTCode);
    0888.      Controls.Add(lblTransFromOrgId);
    0889.      Controls.Add(lblEmployeeUploadedTotal);
    0890.      Controls.Add(lblEmployeeCurrentTotal);
    0891.      Controls.Add(lblEmployeeTotalDiff);
    0892.      Controls.Add(tbModCount);
    0893.      Controls.Add(tbEmpDetailId);
    0894.      Controls.Add(ddlTransFromOrgId);
    0895.      Controls.Add(ddlEmployeeCtrctStatTCode);
    0896.      Controls.Add(ddlEmployeeCtrctTypeTCode);
    0897.      Controls.Add(ddlBargainingUnitTCode);
    0898.      Controls.Add(ddlGenderTCode);
    0899.      Controls.Add(tbEmployersEmployeeNumber);
    0900.      Controls.Add(tbPersonTitle);
    0901.      Controls.Add(tbPersonFirstName);
    0902.      Controls.Add(tbPersonMidInitial);
    0903.      Controls.Add(tbPersonLastName);
    0904.      Controls.Add(tbPersonBirthDate);
    0905.      Controls.Add(tbPersonSIN);
    0906.      Controls.Add(tbOldSIN);
    0907.      Controls.Add(tbEeStatusStartDate);
    0908.      Controls.Add(tbEeCntrctChangeDate);
    0909.      Controls.Add(tbEeCntrctedToWork);
    0910.      Controls.Add(tbEeFullTime);
    0911.      Controls.Add(tbPositionNumber);
    0912.      Controls.Add(tbLocation);
    0913.      Controls.Add(tbPercEmployment);
    0914. 
    0915.      Controls.Add(ddlBargainingUnitTCodeNew);
    0916.      Controls.Add(ddlTransFromOrgIdNew);
    0917.      Controls.Add(ddlEmployeeCtrctStatTCodeNew);
    0918.      Controls.Add(ddlEmployeeCtrctTypeTCodeNew);
    0919.      Controls.Add(ddlGenderTCodeNew);
    0920.           
    0921.      Controls.Add(tbModCountNew);
    0922.      Controls.Add(tbEmployersEmployeeNumberNew);
    0923.      Controls.Add(tbPersonTitleNew);
    0924.      Controls.Add(tbPersonFirstNameNew);
    0925.      Controls.Add(tbPersonMidInitialNew);
    0926.      Controls.Add(tbPersonLastNameNew);
    0927.      Controls.Add(tbPersonBirthDateNew);
    0928.      Controls.Add(tbPersonSINNew);
    0929.      Controls.Add(tbOldSINNew);
    0930.      Controls.Add(tbEeStatusStartDateNew);
    0931.      Controls.Add(tbEeCntrctChangeDateNew);
    0932.      Controls.Add(tbEeCntrctedToWorkNew);
    0933.      Controls.Add(tbEeFullTimeNew);
    0934.      Controls.Add(tbPositionNumberNew);
    0935.      Controls.Add(tbLocationNew);
    0936.      Controls.Add(tbPercEmploymentNew);
    0937. 
    0938.      //Controls.Add(ancPrevEmpDetail);
    0939.      //Controls.Add(ancNextEmpDetail);
    0940. 
    0941.      #endregion
    0942. 
    0943.      #region Button Properties Section
    0944. 
    0945.      btnDeleteEmployee.CausesValidation = false;
    0946.      btnDeleteEmployee.ImageUrl = ProjectFunctions.ImageLocation() + "PolsDelete.gif";
    0947.      btnDeleteEmployee.ImageAlign = ImageAlign.AbsMiddle;
    0948.      btnDeleteEmployee.CssClass = "toggle";
    0949.      //btnDeleteEmployee.Attributes.Add("onClick", "javascript: if (confirm('" + strDelPrompt + "?')) {return true;} else {return false;}");
    0950.      btnDeleteEmployee.Attributes.Add("onClick", "javascript: if (confirm('" + strDelPrompt + "?')) {document.body.style.cursor = 'wait'; this.style.cursor = 'wait'; return true;} else {document.body.style.cursor = 'default'; this.style.cursor = 'hand'; return false;}");
    0951.      //btnDeleteEmployee.Attributes.Add("onMouseOver", "javascript: document.body.style.cursor = 'hand';");
    0952.      //btnDeleteEmployee.Attributes.Add("onMouseOut", "javascript: document.body.style.cursor = 'default';");
    0953. 
    0954.       
    0955. 
    0956.      btnReValEmployee.CausesValidation = false;
    0957.      btnReValEmployee.ImageUrl = ProjectFunctions.ImageLocation() + ProjectConstants.ICON_REVAL_EMPLOYEE;
    0958.      btnReValEmployee.ImageAlign = ImageAlign.AbsMiddle;
    0959.      btnReValEmployee.CssClass = "toggle";
    0960.      btnReValEmployee.Attributes.Add("onMouseOver", "javascript: document.body.style.cursor = 'hand';");
    0961.      btnReValEmployee.Attributes.Add("onMouseOut", "javascript: document.body.style.cursor = 'default';");
    0962. 
    0963.      imgEmployeeDetailEdit.ImageUrl = ProjectFunctions.ImageLocation() + "PolsEdit.GIF";
    0964.      imgEmployeeDetailEdit.Attributes.Add("onClick", "javascript: toggleEmployeeDetailsSection();");
    0965.      imgEmployeeDetailEdit.Attributes.Add("onMouseOver", "javascript: document.body.style.cursor = 'hand';");
    0966.      imgEmployeeDetailEdit.Attributes.Add("onMouseOut", "javascript: document.body.style.cursor = 'default';");
    0967.      imgEmployeeDetailEdit.CssClass = "toggle";
    0968.           
    0969.      btnSaveEmployee.CausesValidation = false;
    0970.      btnSaveEmployee.Click += new EventHandler(btnSaveEmployee_Click);
    0971.      btnSaveEmployee.Attributes["onclick"] += ";javascript:this.disabled=true; document.body.style.cursor = 'wait';";
    0972. 
    0973.      btnCancel.CausesValidation = false;
    0974.      btnCancel.Attributes.Add("onClick", "javascript: toggleEmployeeDetailsSection();\r\n if(typeof ResetEmployee == 'function'){ResetEmployee();}\r\n");
    0975. 
    0976.      btnCancelNew.CausesValidation = false;
    0977.      btnCancelNew.Attributes.Add("onClick", "javascript: toggleNewEmployeeDetailsSection();\r\n if(typeof ClearEmployeeNew == 'function'){ClearEmployeeNew();}\r\n");
    0978. 
    0979.      btnAddEmployee.CausesValidation = false;
    0980.      btnAddEmployee.Attributes["onclick"] += ";javascript:this.disabled=true; document.body.style.cursor = 'wait'; this.style.cursor = 'wait';";
    0981. 
    0982.      //imgHistory.ImageUrl = ProjectFunctions.ImageLocation() + "PolsHistory.GIF";
    0983.      //imgHistory.CssClass = "toggle";
    0984.      //imgHistory.Attributes.Add("onMouseOver", "javascript: document.body.style.cursor = 'hand';");
    0985.      //imgHistory.Attributes.Add("onMouseOut", "javascript: document.body.style.cursor = 'default';");
    0986. 
    0987.      btnViewHistory.ImageUrl = ProjectFunctions.ImageLocation() + "PolsHistory.GIF";
    0988.      btnViewHistory.CssClass = "toggle";
    0989.      btnViewHistory.CausesValidation = false;
    0990.      btnViewHistory.ImageAlign = ImageAlign.AbsMiddle;
    0991. 
    0992. 
    0993. 
    0994. 
    0995.      btnCancel.CausesValidation = false;
    0996.           
    0997.      #endregion
    0998.       
    0999.      #endregion
    1000.   }
    1001.   catch (Exception ex)
    1002.   {
    1003.      HandleError(ex);
    1004.   }
    1005.}
    001.protected override void OnLoad(EventArgs e)
    002.{
    003.   try
    004.   {
    005.      InitializeAjaxManagerSettings();
    006. 
    007.      #region Populate Screen
    008. 
    009.      PopulateScreen();
    010. 
    011.      #endregion
    012. 
    013.      #region Set Previous and Next EmpDetailId
    014.           
    015.      FindNextEmpDetailId(mintEmpDetailId, ref mstrPrevEmpDetailId, ref mstrNextEmpDetailId);
    016. 
    017.      #endregion
    018. 
    019.      //            #region Populate Header Section
    020.      //            PopulateHeaderSection();
    021.      //            #endregion
    022.   }
    023.   catch (Exception ex)
    024.   {
    025.      HandleError(ex);
    026.   }  
    027. 
    028.   base.OnLoad (e);
    029. 
    030.   // WriteControlListToFile("d:\\junk\\ControlList.txt");
    031. 
    032.}
    033. 
    034.private void InitializeAjaxManagerSettings()
    035.{
    036.   #region Ajax Manager Properties Section
    037. 
    038.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSaveEmployee, tbModCount, null);
    039.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSaveEmployee, tbEmpDetailId, null);
    040.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSaveEmployee, ctlAjax_RequiredFields, null);
    041.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSaveEmployee, dgSearchResults, null);
    042.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSaveEmployee, lblSearchRecordCount, null);
    043.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSaveEmployee, lblErrorMessage, null);
    044.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSaveEmployee, ddlValidationExceptions, null);
    045. 
    046.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, tbModCount, null);
    047.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, tbEmpDetailId, null);
    048.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, ctlAjax_RequiredFields, null);
    049.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblEmployersEmployeeNumber, null);
    050.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblPersonTitle, null);
    051.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblPersonFirstName, null);
    052.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblPersonMidInitial, null);
    053.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblPersonLastName, null);
    054.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblPersonBirthDate, null);
    055.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblPersonSIN, null);
    056.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblOldSIN, null);
    057.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblEeStatusStartDate, null);
    058.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblEeCntrctChangeDate, null);
    059.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblEeCntrctedToWork, null);
    060.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblEeFullTime, null);
    061.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblPercEmployment, null);
    062.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblPositionNumber, null);
    063.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblLocation, null);
    064.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblEmployeeCtrctStatTCode, null);
    065.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblEmployeeCtrctTypeTCode, null);
    066.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblGenderTCode, null);
    067.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblTransFromOrgId, null);
    068.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblBargainingUnitTCode, null);
    069.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, dgEmpValidations, null);
    070.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, dgSearchResults, null);
    071.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblSearchRecordCount, null);
    072.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblErrorMessage, null);
    073.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, ddlValidationExceptions, null);
    074. 
    075.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSearch, dgSearchResults, null);
    076.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSearch, lblSearchRecordCount, null);
    077.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSearch, lblCurrentRecords, null);
    078.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSearch, lblErrorMessage, null);
    079.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSearch, tbMinRowToFetch, null);
    080.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSearch, tbMaxRowToFetch, null);
    081.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSearch, ancPrevEmpDetail, null);
    082.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSearch, ancNextEmpDetail, null);
    083.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSearch, lnkSearchPrevious, null);
    084.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSearch, lnkSearchNext, null);
    085.   //ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSearch, imgHistory, null);
    086.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSearch, btnViewHistory, null);
    087. 
    088.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(lnkSearchNext, dgSearchResults, null);
    089.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(lnkSearchNext, lblSearchRecordCount, null);
    090.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(lnkSearchNext, lblCurrentRecords, null);
    091.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(lnkSearchNext, lblErrorMessage, null);
    092.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(lnkSearchNext, tbMaxRowToFetch, null);
    093.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(lnkSearchNext, tbMinRowToFetch, null);
    094.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(lnkSearchNext, lnkSearchPrevious, null);
    095.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(lnkSearchNext, lnkSearchNext, null);
    096. 
    097.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(lnkSearchPrevious, dgSearchResults, null);
    098.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(lnkSearchPrevious, lblSearchRecordCount, null);
    099.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(lnkSearchPrevious, lblErrorMessage, null);
    100.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(lnkSearchPrevious, lblCurrentRecords, null);
    101.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(lnkSearchPrevious, tbMaxRowToFetch, null);
    102.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(lnkSearchPrevious, tbMinRowToFetch, null);
    103.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(lnkSearchPrevious, lnkSearchPrevious, null);
    104.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(lnkSearchPrevious, lnkSearchNext, null);
    105. 
    106.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnAddEmployee, ctlAjax_RequiredFieldsNew, null);
    107.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnAddEmployee, dgSearchResults, null);
    108.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnAddEmployee, lblErrorMessage, null);
    109. 
    110.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, dgSearchResults, null);
    111.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnDeleteEmployee, lblErrorMessage, null);
    112. 
    113.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgEmpValidations, dgEmpValidations, null);
    114.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgEmpValidations, dgSearchResults, null);
    115.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgEmpValidations, ddlValidationExceptions, null);
    116.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgEmpValidations, lblErrorMessage, null);
    117. 
    118.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblEmployersEmployeeNumber, null);
    119.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblPersonTitle, null);
    120.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblPersonFirstName, null);
    121.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblPersonMidInitial, null);
    122.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblPersonLastName, null);
    123.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblPersonBirthDate, null);
    124.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblPersonSIN, null);
    125.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblOldSIN, null);
    126.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblEeStatusStartDate, null);
    127.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblEeCntrctChangeDate, null);
    128.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblEeCntrctedToWork, null);
    129.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblEeFullTime, null);
    130.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblPercEmployment, null);
    131.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblPositionNumber, null);
    132.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblLocation, null);
    133.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblEmployeeCtrctStatTCode, null);
    134.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblEmployeeCtrctTypeTCode, null);
    135.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblGenderTCode, null);
    136.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblTransFromOrgId, null);
    137.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblBargainingUnitTCode, null);
    138.   ctlAjax_Manager.AjaxSettings.AddAjaxSetting(dgSearchResults, lblErrorMessage, null);
    139. 
    140.   #endregion
    141.}
    142. 
    143.private void PopulateScreen()
    144.{
    145.   try
    146.   {
    147.      #region Populate Screen Code
    148. 
    149.      #region Variable Declarations
    150. 
    151.      WSEmployerServices.EmployeeDetail objXMLPayrollEmployee;
    152.      clsPensionDetailFEL objPayrollPensionRecord = null;
    153.      clsInsuranceDetailFEL objPayrollInsuranceRecord = null;
    154. 
    155.      WSEmployerServices.PensionContributionDetail[] objArrXMLPensionDetails;
    156.      WSEmployerServices.InsurancePremiumDetail[] objArrXMLInsuranceDetails;
    157. 
    158.      string strAdjOrRetroStartDate = string.Empty;
    159.      string strAdjOrRetroEndDate = string.Empty;
    160.      string strAdjStartDate = string.Empty;
    161.      string strAdjEndDate = string.Empty;
    162. 
    163.      string strPersonBirthDate = string.Empty;
    164.      string strEmployeeStatusStartDate = string.Empty;
    165.      string strCntrctChangeDate = string.Empty;
    166.      int intPensionSeqId = 0;
    167.       
    168.      #endregion
    169.           
    170.      #region Set Language Section
    171.           
    172.      mstrLanguage = ProjectFunctions.GetLanguagePreference(Page);
    173.      mrmResStrings = new clsResourceManager(mstrLanguage);
    174. 
    175.      #endregion
    176. 
    177.      if (ProjectFunctions.GetOrgAccessListForLoggedInUser(Page, ref marrXmlOrgAccessList, mstrLanguage))
    178.      {
    179. 
    180.         #region Populate Header Section
    181.         PopulateHeaderSection();
    182.         #endregion
    183. 
    184.         #region Populate Employee Search Toolbar Controls
    185. 
    186.         PopulateSearchResultsDataGrid();
    187. 
    188.         #endregion
    189. 
    190.         if (mintEmpDetailId == 0)
    191.         {
    192.            // We did not get the emp id from the query string.  We'll see if it has been saved off in the hidden field.
    193.            if (tbEmpDetailId.Value != string.Empty)
    194.            {
    195.               try
    196.               {
    197.                  mintEmpDetailId = Convert.ToInt32(tbEmpDetailId.Value);
    198.               }
    199.               catch(Exception)
    200.               {
    201.                  // do nothing;
    202.               }
    203.            }
    204.         }
    205. 
    206.         if (mintEmpDetailId == 0)
    207.         {
    208.            // Last resort.  Get the ID from the search table on the side.
    209.            mintEmpDetailId = GetFirstEmpDetailId();
    210.         }
    211. 
    212.         #region Create Employee, Pension and Insurance Information
    213. 
    214.         if (mintEmpDetailId != 0)
    215.         {
    216. 
    217.            #region Create Employee Detail Information
    218. 
    219.            #region Call Get Employee Detail Webservice
    220. 
    221.            objXMLPayrollEmployee = mobjWSEmployerServices.GetEmployeeDetailWithChildren(mintEmpDetailId, ref mobjWSError, mstrLanguage);
    222. 
    223.            if (mobjWSError.Message != null)
    224.            {
    225.               string strTechnicalMsg = "An Error has occured in a critical area of PIBA Online Servies <BR>";
    226.               strTechnicalMsg += "Task: Get Employee Details by Employee Upload Id. <BR>";
    227.               strTechnicalMsg += "Time:" + System.DateTime.Now + " <BR>";
    228.               strTechnicalMsg += "Web Service: objWSEmployerServices <BR>";
    229.               strTechnicalMsg += "Method: GetEmployeeDetailWithChildren <BR>";
    230.               strTechnicalMsg += "Error Context: Payroll Stmt Id " + mintPyrllStmtId + " Employee Upload Id " + mintEmpDetailId + " Organization Id " + mintOrgId + "<BR>";
    231.               strTechnicalMsg += "User: "  + "<BR>";
    232.               strTechnicalMsg += "Error Returned: " + mobjWSError.Message + "<BR>";
    233.               mboolSendCriticalErr = true;
    234. 
    235.               throw new Exception(strTechnicalMsg);
    236.            }
    237. 
    238.            #region get the Payroll Header Data
    239.            GetHeaderData();
    240.            #endregion
    241. 
    242.            strPersonBirthDate = Functions.ToDate(objXMLPayrollEmployee.PersonBirthDate.Year, objXMLPayrollEmployee.PersonBirthDate.Month, objXMLPayrollEmployee.PersonBirthDate.Day);
    243.            strEmployeeStatusStartDate = Functions.ToDate(objXMLPayrollEmployee.EeStatusStartDate.Year, objXMLPayrollEmployee.EeStatusStartDate.Month, objXMLPayrollEmployee.EeStatusStartDate.Day);
    244.            strCntrctChangeDate = Functions.ToDate(objXMLPayrollEmployee.EeCntrctChangeDate.Year, objXMLPayrollEmployee.EeCntrctChangeDate.Month, objXMLPayrollEmployee.EeCntrctChangeDate.Day);
    245. 
    246.            if (Page.IsPostBack == false)
    247.            {
    248.               PopulateControlsWithData(
    249.                  mstrLanguage,
    250.                  mintUserId,
    251.                  ProjectConstants.FALSE_INDICATOR,
    252.                  mintEmpDetailId.ToString(),
    253.                  mintPyrllStmtId.ToString(),
    254.                  mintOrgId.ToString(),
    255.                  mintOrgStatusId.ToString(),
    256.                  mstrOrganizationName,
    257.                  objXMLPayrollEmployee.EmployersEmployeeNumber,
    258.                  objXMLPayrollEmployee.PersonTitleName,
    259.                  objXMLPayrollEmployee.PersonFirstName,
    260.                  objXMLPayrollEmployee.PersonMidInitial,
    261.                  objXMLPayrollEmployee.PersonLastName,
    262.                  strPersonBirthDate,
    263.                  objXMLPayrollEmployee.GenderTcode,
    264.                  objXMLPayrollEmployee.PersonSin,
    265.                  objXMLPayrollEmployee.OldSin,
    266.                  objXMLPayrollEmployee.TransFromOrgId,
    267.                  objXMLPayrollEmployee.EmployeeCtrctStatTcode,
    268.                  strEmployeeStatusStartDate,
    269.                  objXMLPayrollEmployee.EmployeeCtrctTypeTcode,
    270.                  objXMLPayrollEmployee.BargainingUnitTcode,
    271.                  strCntrctChangeDate,
    272.                  objXMLPayrollEmployee.EeCntrctedToWork.ToString(),
    273.                  objXMLPayrollEmployee.EeFullTime.ToString(),
    274.                  objXMLPayrollEmployee.PositionNumber,
    275.                  objXMLPayrollEmployee.Location,
    276.                  objXMLPayrollEmployee.ModCount);
    277.               PopulateEmployeeValidationDataGrid();
    278.            }
    279.            else
    280.            {
    281.               lblEmployersEmployeeNumber.Text = string.Empty;
    282.               lblPersonFirstName.Text = string.Empty;
    283.               lblPersonLastName.Text = string.Empty;
    284.               lblPersonSIN.Text = string.Empty;
    285.               lblPersonTitle.Text = string.Empty;
    286.               lblGenderTCode.Text = string.Empty;
    287. 
    288.               PopulateEmployeeValidationDataGrid();
    289.            }
    290.                   
    291.            #endregion
    292.                   
    293.            #endregion
    294. 
    295.            #region Create Pension Information.
    296. 
    297.            objArrXMLPensionDetails = objXMLPayrollEmployee.PensionDetails;
    298.                       
    299.            #region Create new Pension record
    300.            objPayrollPensionRecord = new clsPensionDetailFEL(this);
    301.            objPayrollPensionRecord.strLanguage = mstrLanguage ;
    302.                       
    303.            objPayrollPensionRecord.InitializeControls(Controls,
    304.               ProjectConstants.NEW_RECORD_ID,
    305.               mstrLanguage);
    306. 
    307.            objPayrollPensionRecord.InitializeAjaxControls();
    308.                                                       
    309.            objPayrollPensionRecord.PopulateControlsWithData(mstrLanguage,
    310.               ProjectConstants.FALSE_INDICATOR,
    311.               mintUserId,
    312.               mintPyrllStmtId.ToString(),
    313.               mintOrgId.ToString(),
    314.               mintOrgStatusId.ToString(),
    315.               mintEmpDetailId.ToString(),
    316.               ProjectConstants.NEW_RECORD_ID,
    317.               string.Empty,
    318.               string.Empty,
    319.               string.Empty,
    320.               string.Empty,
    321.               string.Empty,
    322.               string.Empty,
    323.               string.Empty,
    324.               string.Empty,
    325.               "0",
    326.               objXMLPayrollEmployee.EmployersEmployeeNumber,
    327.               mobjXmlPayrollHeader.IsCurrentPayroll,
    328.               ref objArrRoleAccModSelXml);
    329.                       
    330.            if (Page.IsPostBack == false)
    331.            {
    332.               objPayrollPensionRecord.PopulateDDLControlsAndLabels(string.Empty, string.Empty);
    333.            }
    334.             
    335.            alPensionRecords.Add(objPayrollPensionRecord);
    336.                       
    337.            #endregion
    338. 
    339.            #region Loop through the array of Payroll Headers and create a Payroll Header class for each one.
    340.                                                   
    341.            intPensionSeqId = 0;
    342.                       
    343.            if (objArrXMLPensionDetails != null)
    344.            {
    345.                       
    346.               foreach(WSEmployerServices.PensionContributionDetail objWSPensionDetail in objArrXMLPensionDetails)
    347.               {
    348.                  objPayrollPensionRecord = new clsPensionDetailFEL(this);
    349.                       
    350.                  intPensionSeqId = Convert.ToInt32(objWSPensionDetail.PenUploadDetailId);
    351.                       
    352.                  #region Get the various date values.
    353.                                                       
    354.                  strAdjOrRetroStartDate = Functions.ToDate(objWSPensionDetail.AdjOrRetroStartDate.Year, objWSPensionDetail.AdjOrRetroStartDate.Month, objWSPensionDetail.AdjOrRetroStartDate.Day);
    355.                  strAdjOrRetroEndDate = Functions.ToDate(objWSPensionDetail.AdjOrRetroEndDate.Year, objWSPensionDetail.AdjOrRetroEndDate.Month, objWSPensionDetail.AdjOrRetroEndDate.Day);
    356.                                                       
    357.                  #endregion
    358.                       
    359.                  #region Setup the Pension FEL class
    360.                  objPayrollPensionRecord.InitializeControls(Controls,
    361.                     objWSPensionDetail.PenUploadDetailId,
    362.                     mstrLanguage);
    363. 
    364.                  objPayrollPensionRecord.InitializeAjaxControls();
    365.                                                       
    366.                  objPayrollPensionRecord.PopulateControlsWithData(mstrLanguage,
    367.                     ProjectConstants.TRUE_INDICATOR,
    368.                     mintUserId,                            
    369.                     mintPyrllStmtId.ToString(),
    370.                     mintOrgId.ToString(),
    371.                     mintOrgStatusId.ToString(),
    372.                     mintEmpDetailId.ToString(),
    373.                     objWSPensionDetail.PenUploadDetailId,
    374.                     objWSPensionDetail.PlanId,
    375.                     objWSPensionDetail.ContributionType,
    376.                     objWSPensionDetail.EeContrReportedAmt.ToString(),
    377.                     objWSPensionDetail.ErContrReportedAmt.ToString(),
    378.                     objWSPensionDetail.PensionableEarnings.ToString(),
    379.                     objWSPensionDetail.ActualEarnings.ToString(),
    380.                     strAdjOrRetroStartDate,
    381.                     strAdjOrRetroEndDate,
    382.                     objWSPensionDetail.ModCount,
    383.                     objXMLPayrollEmployee.EmployersEmployeeNumber,
    384.                     mobjXmlPayrollHeader.IsCurrentPayroll,
    385.                     ref objArrRoleAccModSelXml);
    386.                       
    387.                  if (Page.IsPostBack == false)
    388.                  {
    389.                     objPayrollPensionRecord.PopulateDDLControlsAndLabels(objWSPensionDetail.PlanId, objWSPensionDetail.ContributionType);
    390.                     objPayrollPensionRecord.PopulatePensionValidationDataGrid();
    391.                  }
    392.                  else
    393.                  {
    394.                     objPayrollPensionRecord.PopulatePensionValidationDataGrid();
    395.                  }
    396.                                                   
    397.                  #endregion
    398.                       
    399.                  #region Register AJAX Manager with btnSaveEmployee event
    400. 
    401.                  ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSaveEmployee, objPayrollPensionRecord.dgPensionValidations, null);
    402. 
    403.                  #endregion
    404. 
    405.                  #region Add the Payroll Header object to the PayrollFiles list
    406.                                                       
    407.                  alPensionRecords.Add(objPayrollPensionRecord);
    408.                                                       
    409.                  #endregion
    410.               }
    411.            }
    412.            #region Link Pension Save buttons to Insurance Validation Datagrids
    413.            // Link all of the pension validation datagrids to all of the pension save buttons. 
    414.            // We need to do this because when a pension record is saved, all of the pension records for said
    415.            // employee detail are re-validated.  There is a potential that cross record validations exceptions that are
    416.            // created or cleared when the single record is saved.  If this happens we need to re-fetch the exceptions
    417.            // for all of the pension records (the exceptions may have changed in the DB, but not yet reflected on the screen).
    418.            for(int intOuterLoop = 1; intOuterLoop < alPensionRecords.Count; intOuterLoop++)
    419.            {
    420.               // Get every pension record except for the first one (it's the new one).
    421.               clsPensionDetailFEL objPenOuter = (clsPensionDetailFEL)alPensionRecords[intOuterLoop];
    422.               // Don't want it to bomb if there is no save button.
    423.               if (objPenOuter.SaveButton != null)
    424.               {
    425.                  for(int intInnerLoop = 1; intInnerLoop < alPensionRecords.Count; intInnerLoop++)
    426.                  {
    427.                     // We do nothing if the inner and outer loops point to each other.
    428.                     if (intInnerLoop != intOuterLoop)
    429.                     {
    430.                        clsPensionDetailFEL objPenInner = (clsPensionDetailFEL)alPensionRecords[intInnerLoop];
    431.                        // Link the save button to the validation dg so that it will be refreshed if the user presses save.
    432.                        ctlAjax_Manager.AjaxSettings.AddAjaxSetting(objPenOuter.SaveButton, objPenInner.ValidationDataGrid, null);
    433.                     }
    434.                  }
    435.               }
    436.            }
    437.            #endregion
    438.                       
    439.            #endregion
    440.               
    441.            #endregion
    442. 
    443. 
    444.            #region Create Insurance Information.
    445. 
    446.            #region Create New Insurance record
    447.            objPayrollInsuranceRecord = new clsInsuranceDetailFEL(this);
    448.            objPayrollInsuranceRecord.strLanguage = mstrLanguage ;
    449.                       
    450.            objPayrollInsuranceRecord.InitializeControls(Controls,
    451.               ProjectConstants.NEW_RECORD_ID,
    452.               mstrLanguage);
    453. 
    454.            objPayrollInsuranceRecord.InitializeAjaxControls();
    455.                                                       
    456.            objPayrollInsuranceRecord.PopulateControlsWithData(mstrLanguage,
    457.               ProjectConstants.FALSE_INDICATOR,
    458.               mintUserId,
    459.               mintPyrllStmtId.ToString(),
    460.               mintOrgId.ToString(),
    461.               mintOrgStatusId.ToString(),
    462.               mintEmpDetailId.ToString(),
    463.               ProjectConstants.NEW_RECORD_ID,
    464.               string.Empty,
    465.               string.Empty,
    466.               string.Empty,
    467.               string.Empty,
    468.               string.Empty,
    469.               string.Empty,
    470.               string.Empty,
    471.               string.Empty,
    472.               "0",
    473.               objXMLPayrollEmployee.EmployersEmployeeNumber,
    474.               mobjXmlPayrollHeader.IsCurrentPayroll,
    475.               ref objArrRoleAccModSelXml);
    476.                       
    477.            if (Page.IsPostBack == false)
    478.            {
    479.               objPayrollInsuranceRecord.PopulateDDLControlsAndLabels(string.Empty, string.Empty, string.Empty);
    480.            }
    481.                       
    482.            alInsuranceRecords.Add(objPayrollInsuranceRecord);
    483.                       
    484.            #endregion
    485.                                                           
    486.            if (objXMLPayrollEmployee.InsuranceDetails != null)
    487.            {
    488.               objArrXMLInsuranceDetails = objXMLPayrollEmployee.InsuranceDetails;
    489.                       
    490.               int intInsuranceSeqId = 0;
    491.                                                       
    492.                       
    493.               foreach(WSEmployerServices.InsurancePremiumDetail objWSInsuranceDetail in objArrXMLInsuranceDetails)
    494.               {
    495.                  clsInsuranceDetailFEL objInsuranceRecord = new clsInsuranceDetailFEL(this);
    496.                   
    497.                  intInsuranceSeqId = Convert.ToInt32(objWSInsuranceDetail.InsUploadDetailId);
    498.                       
    499.                  #region Get Date Values
    500.                                                       
    501.                  strAdjStartDate = Functions.ToDate(objWSInsuranceDetail.AdjStartDate.Year, objWSInsuranceDetail.AdjStartDate.Month, objWSInsuranceDetail.AdjStartDate.Day);
    502.                  strAdjEndDate = Functions.ToDate(objWSInsuranceDetail.AdjEndDate.Year, objWSInsuranceDetail.AdjEndDate.Month, objWSInsuranceDetail.AdjEndDate.Day);
    503.                                                       
    504.                  #endregion
    505.                                                       
    506.                  #region Setup Insurance FEL object
    507.                       
    508.                  objInsuranceRecord.InitializeControls(Controls,
    509.                     objWSInsuranceDetail.InsUploadDetailId,
    510.                     mstrLanguage);
    511. 
    512.                  objPayrollInsuranceRecord.InitializeAjaxControls();
    513.                       
    514.                  objInsuranceRecord.PopulateControlsWithData(mstrLanguage,
    515.                     ProjectConstants.TRUE_INDICATOR,
    516.                     mintUserId,
    517.                     mintPyrllStmtId.ToString(),
    518.                     mintOrgId.ToString(),
    519.                     mintOrgStatusId.ToString(),
    520.                     mintEmpDetailId.ToString(),
    521.                     objWSInsuranceDetail.InsUploadDetailId,
    522.                     objWSInsuranceDetail.PremiumType,
    523.                     objWSInsuranceDetail.InsurProgramTcode,
    524.                     objWSInsuranceDetail.CovrgOptionTcode,
    525.                     objWSInsuranceDetail.PremiumEeReportedAmt.ToString(),
    526.                     objWSInsuranceDetail.PremiumErReportedAmt.ToString(),                                   
    527.                     strAdjStartDate,
    528.                     strAdjEndDate,
    529.                     objWSInsuranceDetail.PremiumInsurableEarnings.ToString(),
    530.                     objWSInsuranceDetail.ModCount,
    531.                     objXMLPayrollEmployee.EmployersEmployeeNumber,
    532.                     mobjXmlPayrollHeader.IsCurrentPayroll,
    533.                     ref objArrRoleAccModSelXml);
    534.                       
    535.                  if (Page.IsPostBack == false)
    536.                  {
    537.                     objInsuranceRecord.PopulateDDLControlsAndLabels(objWSInsuranceDetail.InsurProgramTcode, objWSInsuranceDetail.CovrgOptionTcode, objWSInsuranceDetail.PremiumType);
    538.                     objInsuranceRecord.PopulateInsuranceValidationDataGrid();
    539.                  }
    540.                  else
    541.                  {
    542.                     objInsuranceRecord.PopulateInsuranceValidationDataGrid();
    543.                  }
    544.                                                       
    545.                  #endregion
    546. 
    547.                  #region Register AJAX Manager with btnSaveEmployee event
    548. 
    549.                  ctlAjax_Manager.AjaxSettings.AddAjaxSetting(btnSaveEmployee, objInsuranceRecord.dgInsuranceValidations, null);
    550. 
    551.                  #endregion
    552.                                           
    553.                  #region Add the Payroll Header object to the PayrollFiles list
    554.                                                       
    555.                  alInsuranceRecords.Add(objInsuranceRecord);
    556.                       
    557.                  #endregion
    558.                       
    559.               }
    560.            }
    561.            #region Link Insurance Save buttons to Insurance Validation Datagrids
    562.            // Link all of the insurance validation datagrids to all of the insurance save buttons. 
    563.            // We need to do this because when a insurance record is saved, all of the insurance records for said
    564.            // employee detail are re-validated.  There is a potential that cross record validations exceptions that are
    565.            // created or cleared when the single record is saved.  If this happens we need to re-fetch the exceptions
    566.            // for all of the insurance records (the exceptions may have changed in the DB, but not yet reflected on the screen).
    567.            for(int intOuterLoop = 1; intOuterLoop < alInsuranceRecords.Count; intOuterLoop++)
    568.            {
    569.               // Get every insurance record except for the first one (it's the new one).
    570.               clsInsuranceDetailFEL objInsOuter = (clsInsuranceDetailFEL)alInsuranceRecords[intOuterLoop];
    571.               // Don't want it to bomb if there is no save button.
    572.               if (objInsOuter.SaveButton != null)
    573.               {
    574.                  for(int intInnerLoop = 1; intInnerLoop < alInsuranceRecords.Count; intInnerLoop++)
    575.                  {
    576.                     // We do nothing if the inner and outer loops point to each other.
    577.                     if (intInnerLoop != intOuterLoop)
    578.                     {
    579.                        clsInsuranceDetailFEL objInsInner = (clsInsuranceDetailFEL)alInsuranceRecords[intInnerLoop];
    580.                        // Link the save button to the validation dg so that it will be refreshed if the user presses save.
    581.                        ctlAjax_Manager.AjaxSettings.AddAjaxSetting(objInsOuter.SaveButton, objInsInner.ValidationDataGrid, null);
    582.                     }
    583.                  }
    584.               }
    585.            }
    586.            #endregion
    587. 
    588.            #endregion
    589. 
    590.         }
    591.         else
    592.         {
    593.            PopulateNewEmployeeDDLs();   
    594.         }
    595. 
    596.         #endregion
    597.      }
    598.           
    599.      #endregion
    600.   }
    601.   catch(Exception ex)
    602.   {
    603.      HandleError(ex);
    604.   }
    605. 
    606.}
  5. Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 24 Mar 2014 Link to this post

    Hello Carl,

    I have reviewed the provided code but did not notice anything disturbing. It would be hard to tell what exactly is causing the unwanted behavior without debugging the code. That said would like to ask you to open a formal support ticket and attach a runnable sample in which it can be observed. This would be of great help to us as we will be able to inspect the project locally. Another option for you would be to upload the project and provide us with a download link.

    Regards,
    Angel Petrov
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
Back to Top