/// <summary> /// Method executes during page load /// </summary> public void MachineExecute() { //used to set wizard header Machine["ListSection"] = LookupUtil.GetValues(LookupTable.WizEmployerRegistration, null, "{DisplaySortOrder}", null); Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerRegistration, LookupTable_WizEmployerRegistration.EnterLiabilityInformation); Machine["ShowHeader"] = false; //initialize EmployerRegistration object and required address objects Machine["EmployerRegistration"] = new EmployerRegistrationViewModel(); Machine["EntityAddress"] = new AddressLinkDto() { Address = new AddressDto() { StateCode = LookupTable_StatePrvnc.Washington, CountryCode = LookupTable_Country.UnitedStates }, AddressTypeCode = LookupTable_AddressType.Mailing }; Machine["PhysicalAddress"] = new AddressLinkDto() { Address = new AddressDto() { StateCode = LookupTable_StatePrvnc.Washington, CountryCode = LookupTable_Country.UnitedStates }, AddressTypeCode = LookupTable_AddressType.Physical }; Machine["BusinessAddress"] = new AddressLinkDto() { Address = new AddressDto() { StateCode = LookupTable_StatePrvnc.Washington, CountryCode = LookupTable_Country.UnitedStates }, AddressTypeCode = LookupTable_AddressType.Business }; Machine["YearList"] = DateUtil.PopulateYears(Convert.ToInt16(LookupTable_WageDetailUnitYears.YearsForWageFiling), 0, false); }
public void MachineExecute() { //used to set wizard header Machine["ListSection"] = LookupUtil.GetValues(LookupTable.WizEmployerRegistration, null, "{DisplaySortOrder}", null); Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerRegistration, LookupTable_WizEmployerRegistration.EnterLiabilityInformation); Machine["ShowHeader"] = false; //initialize EmployerRegistration object and required address objects Machine["EmployerRegistration"] = new EmployerRegistrationViewModel(); Machine["EntityAddress"] = new AddressLinkDto() { Address = new AddressDto() }; Machine["PhysicalAddress"] = new AddressLinkDto() { Address = new AddressDto() { StateCode = LookupTable_State.Washington, CountryCode = LookupTable_Country.UnitedStates } }; Machine["BusinessAddress"] = new AddressLinkDto() { Address = new AddressDto() }; Machine["YearList"] = PopulateYears(4, 0, true); }
/// <summary> /// Validates 'Employer Identification' wizard step /// </summary> public void EmpIdentificationNext() { var employerRegistration = (EmployerRegistrationViewModel)Machine["EmployerRegistration"]; if (employerRegistration.EmployerDto.EmployerLiability.HasPaid450RegularWages == true || employerRegistration.EmployerDto.EmployerLiability.HasEmployed1In20Weeks == true) { employerRegistration.EmployerDto.BusinessTypeCode = LookupTable_BusinessType.NonAgriculturalRegularEmployment; } if (employerRegistration.EmployerDto.EmployerLiability.HasPaid20KAgriculturalLaborWages == true || employerRegistration.EmployerDto.EmployerLiability.HasEmployed10In20Weeks == true) { employerRegistration.EmployerDto.BusinessTypeCode = LookupTable_BusinessType.Agricultural; } if (employerRegistration.EmployerDto.EmployerLiability.HasPaid1KDomesticWages == true) { employerRegistration.EmployerDto.BusinessTypeCode = LookupTable_BusinessType.Domestic; } string entityTypeCode = employerRegistration.EmployerDto.EntityTypeCode; Machine["IsPublicEntity"] = entityTypeCode.Equals(LookupTable_LegalEntity.City) || entityTypeCode.Equals(LookupTable_LegalEntity.GovernmentStateAgency) || entityTypeCode.Equals(LookupTable_LegalEntity.LocalPublicBody) || entityTypeCode.Equals(LookupTable_LegalEntity.USMilitary) || entityTypeCode.Equals(LookupTable_LegalEntity.County) ? true : false; ValidateAddress((AddressDto)Machine["EntityAddress.Address"], Machine["LegalAddrReEmail"]?.ToString()); if (Context.ValidationMessages.Count(ValidationMessageSeverity.Error) == 0) { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerRegistration, LookupTable_WizEmployerRegistration.EnterBusinessInformation); } }
public void PaymentConfirmationExecute() { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.MakePaymentWizardFlow, LookupTable_MakePaymentWizardFlow.Complete); decimal pmtAmount = Convert.ToDecimal(Machine["PmtAmount"]); decimal totalAmountDue = Convert.ToDecimal(Machine["TotalAmount"]); Machine["BalanceAmount"] = (totalAmountDue - pmtAmount); }
public void SubmitRegistrationNext() { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerRegistration, LookupTable_WizEmployerRegistration.Complete); var employerRegistration = (EmployerRegistrationViewModel)Machine["EmployerRegistration"]; DateTime liabilityDate = Convert.ToDateTime(employerRegistration.EmployerDto.LiabilityDate); int currentQuarter = (liabilityDate.Month - 1) / 3 + 1; Machine["LastDayCurrentQuarter"] = new DateTime(liabilityDate.Year, 3 * currentQuarter + 1, 1).AddDays(-1); }
public void SelectPaymentMethodNext() { decimal pmtAmount = Convert.ToDecimal(Machine["PmtAmount"]); decimal totalAmountDue = Convert.ToDecimal(Machine["TotalAmount"]); string pmtMethod = Machine["CheckPaymentMethodType"].ToString(); string OnlinePaymentMthod = LookupUtil.GetLookupCode(LookupTable.PaymentMethodType, LookupTable_PaymentMethodType.ACHDebit).Code; Machine["CheckPayment"] = ((totalAmountDue - pmtAmount) > 0) ? "Partial" : "Full"; Machine["CheckPaymentMethodType"] = (pmtMethod.Equals(OnlinePaymentMthod, StringComparison.InvariantCultureIgnoreCase)) ? "Online" : "Paper"; }
/// <summary> /// Method executes during page load /// </summary> public void MachineExecute() { Machine["ListSection"] = LookupUtil.GetValues(LookupTable.WizEmployerWageFiling, null, "{DisplaySortOrder}", null); Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerWageFiling, LookupTable_WizEmployerWageFiling.SelectFilingMethod); Machine["ShowHeader"] = true; Machine["ReportingYearList"] = DateUtil.PopulateYears(Convert.ToInt16(LookupTable_WageDetailUnitYears.YearsForWageFiling), 0, false); //Set Default Values for Year and Quarter SetReportingYearAndQuarterDefaultValues(); }
public void MachineExecute() { //TO DO //Get Values from the DB Context Machine["emprAccountID"] = 100101; Machine["emprName"] = "Test Employer"; Machine["dbaName"] = "Test DBA"; Machine["ListSection"] = LookupUtil.GetValues(LookupTable.MakePaymentWizardFlow, null, "{DisplaySortOrder}", null); Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.MakePaymentWizardFlow, LookupTable_MakePaymentWizardFlow.SelectPaymentMethod); Machine["ShowHeader"] = true; }
public static WageSubmissionViewModel ValidateSelectionMethod(WageSubmissionViewModel wageDetail) { using (DbContext context = new DbContext()) { if (context.TaxableAmountSums.Any(x => x.ReportingQuarter == wageDetail.ReportingQuarter && x.ReportingYear == wageDetail.ReportingYear && x.EmployerId == wageDetail.Employer.EmployerId)) { Context.ValidationMessages.AddError("Original Employment and Wage Detail Report for this year " + wageDetail.ReportingYear + " and quarter " + LookupUtil.GetLookupCode(LookupTable.Quarter, wageDetail.ReportingQuarter).Display + " has already been submitted"); } } wageDetail.AdjReasonDisplay = LookupUtil.GetLookupCode(LookupTable.WageDetailAdjReasonCode, LookupTable_WageDetailAdjReasonCode.Original).Display.ToString(); wageDetail.AdjReasonCode = LookupTable_WageDetailAdjReasonCode.Original; return(wageDetail); }
public void PaymentDetailsNext() { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.MakePaymentWizardFlow, LookupTable_MakePaymentWizardFlow.SubmitPaymentDetails); if (Machine["SaveBankInformation"] != null && Machine["SaveBankInformation"].ToString().Equals("true", StringComparison.InvariantCultureIgnoreCase)) { Machine["SaveBankInformationText"] = "Yes"; } else { Machine["SaveBankInformationText"] = "No"; } Machine["PaymentEffectiveDate"] = DateTime.Today; Machine["AccountType"] = Machine["AccountTypeDDL"].ToString().Equals(LookupTable_BankAccountType.Savings, StringComparison.InvariantCultureIgnoreCase) ? "Savings" : "Checking"; //TO DO //Get Values from the DB Context Machine["PmtVerificationMsg"] = String.Format("By paying your New Mexico Department of Workforce Solutions bill by way of this online service, you are authorizing NMDWS to charge your {0} account for the amount you submitted.", Machine["AccountType"]); }
public void SelectPaymentMethodExecute() { //TO DO //Get Values from the DB Context decimal amountDue = 987; Machine["PaymentDueDates"] = "<b>Quarter 1 - April 30<br/>Quarter 2 - July 31<br/>Quarter 3 - October 31<br/>Quarter 4 - January 31</b>"; Machine["PrepaymentDueDates"] = "<b>10 calendar days after the start of the quarter</b>"; Machine["ActualDueDate"] = DateTime.Today; Machine["AmountDue"] = amountDue; Machine["TotalAmount"] = amountDue; Machine["PmtAmount"] = amountDue; Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.MakePaymentWizardFlow, LookupTable_MakePaymentWizardFlow.SelectPaymentMethod); Machine["CheckPayment"] = Machine["SearchType"]; }
public void SelectFilingMethodNext() { int currentQtr = Convert.ToInt16(DateUtil.GetQuarterNumber(DateTimeUtil.Now.Month)); DateTime subjDt = DateTimeUtil.Now; int selYr = Convert.ToInt16(Machine["WageUnitDetail.ReportingYear"]); int selQtr = Convert.ToInt16(Machine["WageUnitDetail.ReportingQuarter"].ToString().Remove(0, 1)); bool isValidSubjDate = ((selYr > subjDt.Year) || (subjDt.Year == selYr && selQtr <= currentQtr)); if (subjDt.Year <= selYr) { if (currentQtr < selQtr) { Context.ValidationMessages.AddError("Submission not allowed for future quarter."); return; } } Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerWageFiling, LookupTable_WizEmployerWageFiling.SubmitWageInformation); }
public void LiabilityWagesNext() { List <bool> listUserInput = new List <bool> { (bool)Machine["EmployerRegistration.EmployerDto.EmployerLiability.HasPaid450RegularWages"], (bool)Machine["EmployerRegistration.EmployerDto.EmployerLiability.HasPaid1KDomesticWages"], (bool)Machine["EmployerRegistration.EmployerDto.EmployerLiability.HasPaid20KAgriculturalLaborWages"] }; if (listUserInput.FindAll(l => l.Equals(true))?.Count >= 2) { Context.ValidationMessages.AddError("Only one answer can be Yes. Select the question that occurred first as Yes and the other(s) as No."); return; } else if (listUserInput.FindAll(l => l.Equals(true))?.Count >= 1) { Machine["IsLiableWages"] = "Yes"; Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerRegistration, LookupTable_WizEmployerRegistration.EnterUsers); } else { Machine["IsLiableWages"] = "No"; Machine["EmployerRegistration.EmployerDto.EmployerLiability.LiabilityAmountMetYear"] = null; Machine["EmployerRegistration.EmployerDto.EmployerLiability.LiabilityAmountMetQuarter"] = null; } }
public void EnterBusinessInfoPrevious() { Machine["IsPublicEntity"] = false; Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerRegistration, LookupTable_WizEmployerRegistration.EnterEmployerInformation); }
public void ValidateEnterBusiRcdsAddrNext() { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerRegistration, LookupTable_WizEmployerRegistration.Summary); }
public void EmpIdentificationPrevious() { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerRegistration, LookupTable_WizEmployerRegistration.EnterUsers); }
public void ValidateEmpIdentificationNext() { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerRegistration, LookupTable_WizEmployerRegistration.EnterBusinessInformation); }
public void AdminInfoPrevious() { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerRegistration, LookupTable_WizEmployerRegistration.EnterLiabilityInformation); }
public void ValidateAdminInfoNext() { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerRegistration, LookupTable_WizEmployerRegistration.EnterEmployerInformation); }
public void ValidateIntroductionNext() { Machine["ShowHeader"] = true; Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerRegistration, LookupTable_WizEmployerRegistration.EnterLiabilityInformation); }
public void ValidateLiabilityWeeksNext() { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerRegistration, LookupTable_WizEmployerRegistration.EnterUsers); }
public void RegistrationSummaryPrevious() { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerRegistration, LookupTable_WizEmployerRegistration.EnterBusinessInformation); }
public void DetailedSummaryNext() { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerWageFiling, LookupTable_WizEmployerWageFiling.ProcessandCalculate); }
public void DetailedSummaryPrevious() { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerWageFiling, LookupTable_WizEmployerWageFiling.SubmitWageInformation); }
public void IsLiableWeeksCheckTrue() { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerRegistration, LookupTable_WizEmployerRegistration.EnterUsers); }
public void ManualEntryNext() { WageSubmissionViewModel wageSubmissionViewModel = new WageSubmissionViewModel(); wageSubmissionViewModel.ListWageUnitDetailDto = (List <WageSubmissionViewModel.WageUnitCustomDto>)Machine["WageUnitDetail.ListWageUnitDetailDto"]; if (wageSubmissionViewModel.ListWageUnitDetailDto.Where(x => x.Ssn != null).Count() == 0) { Context.ValidationMessages.AddError("Please enter atleast one record."); } foreach (var wageUnitDetail in wageSubmissionViewModel.ListWageUnitDetailDto) { if (wageSubmissionViewModel.ListWageUnitDetailDto.Where((x => (x.Ssn != null) && (x.Ssn == wageUnitDetail.Ssn) && (x.EmployerUnitId == wageUnitDetail.EmployerUnitId) && x.SrNo != wageUnitDetail.SrNo)).Count() > 0) { Context.ValidationMessages.AddError(String.Format("Duplicate Social Security Number {0} within Unit {1} on line {2}.", wageUnitDetail.Ssn, wageUnitDetail.EmployerUnitId, wageUnitDetail.SrNo)); } if ((String.IsNullOrWhiteSpace(wageUnitDetail.Ssn)) && (!String.IsNullOrWhiteSpace(wageUnitDetail.LastName) || !String.IsNullOrWhiteSpace(wageUnitDetail.FirstName) || wageUnitDetail.IsEmploymentMonth1 == true || wageUnitDetail.IsEmploymentMonth2 == true || wageUnitDetail.IsEmploymentMonth3 == true || wageUnitDetail.HoursWorked.HasValue || !String.IsNullOrWhiteSpace(wageUnitDetail.MiddleInitialName) || !String.IsNullOrWhiteSpace(wageUnitDetail.Occupation) || wageUnitDetail.IsOwnerOrOfficer.HasValue || wageUnitDetail.WageAmount > 0)) { Context.ValidationMessages.AddError(String.Format("Missing SSN on line {0}.", wageUnitDetail.SrNo)); } if ((String.IsNullOrWhiteSpace(wageUnitDetail.LastName)) && (!String.IsNullOrWhiteSpace(wageUnitDetail.Ssn) || !String.IsNullOrWhiteSpace(wageUnitDetail.FirstName) || wageUnitDetail.IsEmploymentMonth1 == true || wageUnitDetail.IsEmploymentMonth2 == true || wageUnitDetail.IsEmploymentMonth3 == true || wageUnitDetail.HoursWorked.HasValue || !String.IsNullOrWhiteSpace(wageUnitDetail.MiddleInitialName) || !String.IsNullOrWhiteSpace(wageUnitDetail.Occupation) || wageUnitDetail.IsOwnerOrOfficer.HasValue || wageUnitDetail.WageAmount > 0)) { Context.ValidationMessages.AddWarning(String.Format("Missing last name on line {0}.", wageUnitDetail.SrNo)); } if ((String.IsNullOrWhiteSpace(wageUnitDetail.FirstName)) && (!String.IsNullOrWhiteSpace(wageUnitDetail.Ssn) || !String.IsNullOrWhiteSpace(wageUnitDetail.LastName) || wageUnitDetail.IsEmploymentMonth1 == true || wageUnitDetail.IsEmploymentMonth2 == true || wageUnitDetail.IsEmploymentMonth3 == true || wageUnitDetail.HoursWorked.HasValue || !String.IsNullOrWhiteSpace(wageUnitDetail.MiddleInitialName) || !String.IsNullOrWhiteSpace(wageUnitDetail.Occupation) || wageUnitDetail.IsOwnerOrOfficer.HasValue || wageUnitDetail.WageAmount > 0)) { Context.ValidationMessages.AddWarning(String.Format("Missing first name on line {0}.", wageUnitDetail.SrNo)); } if ((wageUnitDetail.WageAmount == 0) && (!String.IsNullOrWhiteSpace(wageUnitDetail.Ssn) || !String.IsNullOrWhiteSpace(wageUnitDetail.LastName) || wageUnitDetail.IsEmploymentMonth1 == true || wageUnitDetail.IsEmploymentMonth2 == true || wageUnitDetail.IsEmploymentMonth3 == true || wageUnitDetail.HoursWorked.HasValue || !String.IsNullOrWhiteSpace(wageUnitDetail.MiddleInitialName) || !String.IsNullOrWhiteSpace(wageUnitDetail.Occupation) || wageUnitDetail.IsOwnerOrOfficer.HasValue || !String.IsNullOrWhiteSpace(wageUnitDetail.FirstName))) { Context.ValidationMessages.AddError(String.Format("Missing Gross Wages on line {0}.", wageUnitDetail.SrNo)); } if ((!(wageUnitDetail.IsEmploymentMonth1 ?? false) && !(wageUnitDetail.IsEmploymentMonth2 ?? false) && !(wageUnitDetail.IsEmploymentMonth3 ?? false)) && (!String.IsNullOrWhiteSpace(wageUnitDetail.LastName) || !String.IsNullOrWhiteSpace(wageUnitDetail.FirstName) || wageUnitDetail.HoursWorked.HasValue || !String.IsNullOrWhiteSpace(wageUnitDetail.MiddleInitialName) || !String.IsNullOrWhiteSpace(wageUnitDetail.Ssn) || !String.IsNullOrWhiteSpace(wageUnitDetail.Occupation) || wageUnitDetail.IsOwnerOrOfficer.HasValue || wageUnitDetail.WageAmount > 0)) { Context.ValidationMessages.AddError(String.Format("Select atleast one Employment Month on line {0}.", wageUnitDetail.SrNo)); } if (wageUnitDetail.WageAmount > Convert.ToDecimal(999999999.99)) { Context.ValidationMessages.AddError(String.Format("Gross Wages cannot exceed 999999999.99 on line {0}.", wageUnitDetail.SrNo)); } } if (Context.ValidationMessages.Count(ValidationMessageSeverity.Error) > 0) { return; } Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerWageFiling, LookupTable_WizEmployerWageFiling.ConfirmSubmission); }
public void ManualEntryPrevious() { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerWageFiling, LookupTable_WizEmployerWageFiling.SelectFilingMethod); }
public void ProcessAndCalculateTaxPrevious() { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerWageFiling, LookupTable_WizEmployerWageFiling.ConfirmSubmission); }
public void SubmitRegistrationNext() { Machine["CurrentSection"] = LookupUtil.GetLookupCode(LookupTable.WizEmployerRegistration, LookupTable_WizEmployerRegistration.Complete); }
/// <summary> /// Method executes during page load for Confirmation Page /// </summary> public void WageDetailConfirmationExecute() { Machine["ReportingQuatertoDispay"] = LookupUtil.GetLookupCode(LookupTable.Quarter, Machine["WageUnitDetail.ReportingQuarter"].ToString()).Display; }