public async Task <IActionResult> CreateStep3() { IntakeFormViewModel3 ifvm = new IntakeFormViewModel3(); VeteranIntakeForm veteranIntakeForm = _context.VeteranIntakeForms.FirstOrDefault(form => form.VeteranApplicationUserId == _userManager.GetUserId(User) && form.IsCompleted == null ); if (veteranIntakeForm != null) { ifvm.MonthlyIncome = veteranIntakeForm.MonthlyIncome; ifvm.BankAccountAssets = veteranIntakeForm.BankAccountAssets; ifvm.RealEstateAssets = veteranIntakeForm.RealEstateAssets; ifvm.LifeInsuranceCashValue = veteranIntakeForm.LifeInsuranceCashValue; ifvm.RetirementAccounts = veteranIntakeForm.RetirementAccounts; ifvm.StockBonds = veteranIntakeForm.StockBonds; ifvm.Pension = veteranIntakeForm.Pension; ifvm.BusinessInterest = veteranIntakeForm.BusinessInterest; ifvm.MoneyOwedToYou = veteranIntakeForm.MoneyOwedToYou; ifvm.OtherAssetsOrMoney = veteranIntakeForm.OtherAssetsOrMoney; veteranIntakeForm.CurrentStep = 3; _context.Update(veteranIntakeForm); await _context.SaveChangesAsync(); return(View(ifvm)); } return(View(ifvm)); }
public IActionResult CreateStep8() { VeteranIntakeForm userForm = _context.VeteranIntakeForms.FirstOrDefault(form => form.VeteranApplicationUserId == _userManager.GetUserId(User) && form.IsCompleted == null); IntakeFormViewModelMaster ifvmm = new IntakeFormViewModelMaster { //TermsAndConditions = userForm.TermsAndConditions, FullLegalName = userForm.FullLegalName, Address = userForm.Address, PhoneNumber = userForm.PhoneNumber, VeteranStatus = userForm.VeteranStatus, ProofOfService = userForm.ProofOfService, ResidentStatus = userForm.ResidentStatus, NetWorth = userForm.NetWorth, MonthlyIncome = userForm.MonthlyIncome, BankAccountAssets = userForm.BankAccountAssets, RealEstateAssets = userForm.RealEstateAssets, LifeInsuranceCashValue = userForm.LifeInsuranceCashValue, RetirementAccounts = userForm.RetirementAccounts, StockBonds = userForm.StockBonds, Pension = userForm.Pension, BusinessInterest = userForm.BusinessInterest, MoneyOwedToYou = userForm.MoneyOwedToYou, OtherAssetsOrMoney = userForm.OtherAssetsOrMoney, HouseHoldSize = userForm.HouseHoldSize, MaritalStatus = userForm.MaritalStatus, FullNameSpouse = userForm.FullNameSpouse, HaveChildren = userForm.HaveChildren, UnderAgeChildren = userForm.UnderAgeChildren, MinorChildrenDifferentSpouse = userForm.MinorChildrenDifferentSpouse, CurrentlyPregnant = userForm.CurrentlyPregnant, SpecificBequest = userForm.SpecificBequest, BequestInfromation = userForm.BequestInfromation, InheritEstate = userForm.InheritEstate, InheritEstateSpecific = userForm.InheritEstateSpecific, RemainderBeneficiary = userForm.RemainderBeneficiary, RemainderBeneficiarySpecific = userForm.RemainderBeneficiarySpecific, DisinheritSomeone = userForm.DisinheritSomeone, DisinheritDescription = userForm.DisinheritDescription, PrimaryGuardian = userForm.PrimaryGuardian, AlternateGuardian = userForm.AlternateGuardian, PersonalRepresentative = userForm.PersonalRepresentative, AlternateRepresentative = userForm.AlternateRepresentative, RequestPowerOfAttorney = userForm.RequestPowerOfAttorney, PrimaryAttorney = userForm.PrimaryAttorney, AlternateAttorney = userForm.AlternateAttorney, HealthCareDirective = userForm.HealthCareDirective, HydrationDirective = userForm.HydrationDirective, NutritionDirective = userForm.NutritionDirective, ArtificialVentilation = userForm.ArtificialVentilation, DistressMedication = userForm.DistressMedication, HealthPOA = userForm.HealthPOA, PrimaryHealthAttorney = userForm.PrimaryHealthAttorney, SecondaryHealthAttorney = userForm.SecondaryHealthAttorney }; return(View(ifvmm)); }
public async Task <IActionResult> CreateStep6() { IntakeFormViewModel6 ifvm = new IntakeFormViewModel6(); VeteranIntakeForm veteranIntakeForm = _context.VeteranIntakeForms.FirstOrDefault(form => form.VeteranApplicationUserId == _userManager.GetUserId(User) && form.IsCompleted == null ); if (veteranIntakeForm != null) { ifvm.HealthCareDirective = veteranIntakeForm.HealthCareDirective; ifvm.HydrationDirective = veteranIntakeForm.HydrationDirective; ifvm.NutritionDirective = veteranIntakeForm.NutritionDirective; ifvm.ArtificialVentilation = veteranIntakeForm.ArtificialVentilation; ifvm.DistressMedication = veteranIntakeForm.DistressMedication; veteranIntakeForm.CurrentStep = 6; _context.Update(veteranIntakeForm); await _context.SaveChangesAsync(); return(View(ifvm)); } return(View(ifvm)); }
public async Task <IActionResult> CreateStep1([Bind("FullLegalName,Address,PhoneNumber,Exit")] IntakeFormViewModel1 intakeFormViewModel) { //if (ModelState.IsValid) //{ VeteranIntakeForm currentForm = _context.VeteranIntakeForms.FirstOrDefault(form => form.VeteranApplicationUserId == _userManager.GetUserId(User) && form.IsCompleted == null ); // currentForm.CurrentStep = 2; currentForm.TimeStamp = DateTime.Now; currentForm.FullLegalName = intakeFormViewModel.FullLegalName; currentForm.Address = intakeFormViewModel.Address; currentForm.PhoneNumber = intakeFormViewModel.PhoneNumber; if (intakeFormViewModel.Exit != null) { _context.VeteranIntakeForms.Update(currentForm); await _context.SaveChangesAsync(); return(RedirectToAction("Index", "Veteran")); } currentForm.CurrentStep = 2; _context.VeteranIntakeForms.Update(currentForm); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(GoToStep), new { step = currentForm.CurrentStep })); //} //return View(nameof(CreateStep1)); }
public async Task <IActionResult> CreateStep2( [Bind("VeteranStatus,ProofOfService,ResidentStatus,NetWorth,Exit")] IntakeFormViewModel2 intakeFormViewModel) { //if (ModelState.IsValid) //{ VeteranIntakeForm currentForm = _context.VeteranIntakeForms.FirstOrDefault(form => form.VeteranApplicationUserId == _userManager.GetUserId(User) && form.IsCompleted == null ); //currentForm.CurrentStep = 3; currentForm.TimeStamp = DateTime.Now; currentForm.VeteranStatus = intakeFormViewModel.VeteranStatus; currentForm.ProofOfService = intakeFormViewModel.ProofOfService; currentForm.ResidentStatus = intakeFormViewModel.ResidentStatus; currentForm.NetWorth = intakeFormViewModel.NetWorth; if (intakeFormViewModel.Exit != null) { _context.VeteranIntakeForms.Update(currentForm); await _context.SaveChangesAsync(); return(RedirectToAction("Index", "Veteran")); } currentForm.CurrentStep = 3; _context.VeteranIntakeForms.Update(currentForm); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(GoToStep), new { step = currentForm.CurrentStep })); // } // return View(nameof(CreateStep2)); }
public async Task <IActionResult> CreateStep7([Bind("HealthPOA,PrimaryHealthAttorney,SecondaryHealthAttorney,Exit")] IntakeFormViewModel7 intakeFormViewModel) { //if (ModelState.IsValid) //{ VeteranIntakeForm currentForm = _context.VeteranIntakeForms.FirstOrDefault(form => form.VeteranApplicationUserId == _userManager.GetUserId(User) && form.IsCompleted == null ); //currentForm.CurrentStep = 8; currentForm.TimeStamp = DateTime.Now; currentForm.HealthPOA = intakeFormViewModel.HealthPOA; currentForm.PrimaryHealthAttorney = intakeFormViewModel.PrimaryHealthAttorney; currentForm.SecondaryHealthAttorney = intakeFormViewModel.SecondaryHealthAttorney; if (intakeFormViewModel.Exit != null) { _context.VeteranIntakeForms.Update(currentForm); await _context.SaveChangesAsync(); return(RedirectToAction("Index", "Veteran")); } currentForm.CurrentStep = 8; _context.VeteranIntakeForms.Update(currentForm); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(GoToStep), new { step = currentForm.CurrentStep })); //} //return View(nameof(CreateStep7)); }
public async Task <IActionResult> CreateStep6([Bind("HealthCareDirective,HydrationDirective,NutritionDirective,ArtificialVentilation,DistressMedication,Exit")] IntakeFormViewModel6 intakeFormViewModel) { //if (ModelState.IsValid) //{ VeteranIntakeForm currentForm = _context.VeteranIntakeForms.FirstOrDefault(form => form.VeteranApplicationUserId == _userManager.GetUserId(User) && form.IsCompleted == null ); //currentForm.CurrentStep = 7; currentForm.TimeStamp = DateTime.Now; currentForm.HealthCareDirective = intakeFormViewModel.HealthCareDirective; currentForm.HydrationDirective = intakeFormViewModel.HydrationDirective; currentForm.NutritionDirective = intakeFormViewModel.NutritionDirective; currentForm.ArtificialVentilation = intakeFormViewModel.ArtificialVentilation; currentForm.DistressMedication = intakeFormViewModel.DistressMedication; if (intakeFormViewModel.Exit != null) { _context.VeteranIntakeForms.Update(currentForm); await _context.SaveChangesAsync(); return(RedirectToAction("Index", "Veteran")); } currentForm.CurrentStep = 7; _context.VeteranIntakeForms.Update(currentForm); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(GoToStep), new { step = currentForm.CurrentStep })); //} //return View(nameof(CreateStep6)); }
public void AlternateAttorney_TestingGetter_ReturnString() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.AlternateAttorney = "Veteran"; // Assert Assert.Equal("Veteran", n.AlternateAttorney); }
public void RemainderBeneficiarySpecific_TestingGetter_ReturnString() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.RemainderBeneficiarySpecific = "Veteran"; // Assert Assert.Equal("Veteran", n.RemainderBeneficiarySpecific); }
public void InheritEstateSpecific_TestingGetter_ReturnString() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.InheritEstateSpecific = "Veteran"; // Assert Assert.Equal("Veteran", n.InheritEstateSpecific); }
public void BequestInfromation_TestingGetter_ReturnString() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.BequestInfromation = "Veteran"; // Assert Assert.Equal("Veteran", n.BequestInfromation); }
public void Name_TestingGetter_ReturnString() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.FullLegalName = "Veteran"; // Assert Assert.Equal("Veteran", n.FullLegalName); }
public void AlternateRepresentative_TestingGetter_ReturnString() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.AlternateRepresentative = "Veteran"; // Assert Assert.Equal("Veteran", n.AlternateRepresentative); }
public void MonthlyIncome_TestingGetter_ReturnLong() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.MonthlyIncome = 5; // Assert Assert.Equal(5, n.MonthlyIncome); }
public void RealEstateAssets_TestingGetter_ReturnLong() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.RealEstateAssets = 5; // Assert Assert.Equal(5, n.RealEstateAssets); }
public void MoneyOwedToYou_TestingGetter_ReturnLong() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.MoneyOwedToYou = 5; // Assert Assert.Equal(5, n.MoneyOwedToYou); }
public void BusinessInterest_TestingGetter_ReturnLong() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.BusinessInterest = 5; // Assert Assert.Equal(5, n.BusinessInterest); }
public void Pension_TestingGetter_ReturnLong() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.Pension = 5; // Assert Assert.Equal(5, n.Pension); }
public void StockBonds_TestingGetter_ReturnLong() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.StockBonds = 5; // Assert Assert.Equal(5, n.StockBonds); }
public void RetirementAccounts_TestingGetter_ReturnLong() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.RetirementAccounts = 5; // Assert Assert.Equal(5, n.RetirementAccounts); }
public void LifeInsuranceCashValue_TestingGetter_ReturnLong() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.LifeInsuranceCashValue = 5; // Assert Assert.Equal(5, n.LifeInsuranceCashValue); }
public void HouseHoldSize_TestingGetter_ReturnLong() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.HouseHoldSize = 5; // Assert Assert.Equal(5, n.HouseHoldSize); }
public void PhoneNumber_TestingGetter_ReturnString() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.PhoneNumber = "Veteran"; // Assert Assert.Equal("Veteran", n.PhoneNumber); }
public void OtherAssetsOrMoney_TestingGetter_ReturnLong() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.OtherAssetsOrMoney = 5; // Assert Assert.Equal(5, n.OtherAssetsOrMoney); }
public void Address_TestingGetter_ReturnString() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.Address = "Veteran"; // Assert Assert.Equal("Veteran", n.Address); }
public void MinorChildrenDifferentSpouse_TestingGetter_ReturnString() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.MinorChildrenDifferentSpouse = "Veteran"; // Assert Assert.Equal("Veteran", n.MinorChildrenDifferentSpouse); }
public void AlternateGuardian_TestingGetter_ReturnString() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm(); // Act n.AlternateGuardian = "Veteran"; // Assert Assert.Equal("Veteran", n.AlternateGuardian); }
public async Task <IActionResult> CreateStep4( [Bind("HouseHoldSize,MaritalStatus,FullNameSpouse,HaveChildren,UnderAgeChildren,MinorChildrenDifferentSpouse,CurrentlyPregnant,SpecificBequest,BequestInfromation," + "InheritEstate,InheritEstateSpecific,RemainderBeneficiary,RemainderBeneficiarySpecific,DisinheritSomeone,DisinheritDescription,PrimaryGuardian,AlternateGuardian," + "PersonalRepresentative,AlternateRepresentative,Exit")] IntakeFormViewModel4 intakeFormViewModel) { //if (ModelState.IsValid) //{ VeteranIntakeForm currentForm = _context.VeteranIntakeForms.FirstOrDefault(form => form.VeteranApplicationUserId == _userManager.GetUserId(User) && form.IsCompleted == null ); //currentForm.CurrentStep = 5; currentForm.TimeStamp = DateTime.Now; currentForm.HouseHoldSize = intakeFormViewModel.HouseHoldSize; currentForm.MaritalStatus = intakeFormViewModel.MaritalStatus; currentForm.FullNameSpouse = intakeFormViewModel.FullNameSpouse; currentForm.HaveChildren = intakeFormViewModel.HaveChildren; currentForm.UnderAgeChildren = intakeFormViewModel.UnderAgeChildren; currentForm.MinorChildrenDifferentSpouse = intakeFormViewModel.MinorChildrenDifferentSpouse; currentForm.CurrentlyPregnant = intakeFormViewModel.CurrentlyPregnant; currentForm.SpecificBequest = intakeFormViewModel.SpecificBequest; currentForm.BequestInfromation = intakeFormViewModel.BequestInfromation; currentForm.InheritEstate = intakeFormViewModel.InheritEstate; currentForm.InheritEstateSpecific = intakeFormViewModel.InheritEstateSpecific; currentForm.RemainderBeneficiary = intakeFormViewModel.RemainderBeneficiary; currentForm.RemainderBeneficiarySpecific = intakeFormViewModel.RemainderBeneficiarySpecific; currentForm.DisinheritSomeone = intakeFormViewModel.DisinheritSomeone; currentForm.DisinheritDescription = intakeFormViewModel.DisinheritDescription; currentForm.PrimaryGuardian = intakeFormViewModel.PrimaryGuardian; currentForm.AlternateGuardian = intakeFormViewModel.AlternateGuardian; currentForm.PersonalRepresentative = intakeFormViewModel.PersonalRepresentative; currentForm.AlternateRepresentative = intakeFormViewModel.AlternateRepresentative; _context.VeteranIntakeForms.Update(currentForm); if (intakeFormViewModel.Exit != null) { _context.VeteranIntakeForms.Update(currentForm); await _context.SaveChangesAsync(); return(RedirectToAction("Index", "Veteran")); } currentForm.CurrentStep = 5; _context.VeteranIntakeForms.Update(currentForm); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(GoToStep), new { step = currentForm.CurrentStep })); //} //return View(nameof(CreateStep4)); }
public void DisinheritSomeone_TestingSetter_ReturnBool() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm() { DisinheritSomeone = false }; // Act n.DisinheritSomeone = true; // Assert Assert.True(n.DisinheritSomeone); }
public void DisinheretDescription_TestingSetter_ReturnString() { // Arrange VeteranIntakeForm n = new VeteranIntakeForm() { DisinheritDescription = "Lawyer" }; // Act n.DisinheritDescription = "Veteran"; // Assert Assert.Equal("Veteran", n.DisinheritDescription); }