diff --git a/DVSRegister/Controllers/CabProviderController.cs b/DVSRegister/Controllers/CabProviderController.cs index f1045e7..fe48241 100644 --- a/DVSRegister/Controllers/CabProviderController.cs +++ b/DVSRegister/Controllers/CabProviderController.cs @@ -692,10 +692,10 @@ public async Task UpdatePrimaryContact(PrimaryContactViewModel pr ValidationHelper.ValidateDuplicateFields( ModelState, - primaryValue: primaryContactViewModel.PrimaryContactEmail, - secondaryValue: providerProfileDto.SecondaryContactEmail, + primaryValue: primaryContactViewModel.PrimaryContactEmail, + secondaryValue: providerProfileDto.SecondaryContactEmail, new ValidationHelper.FieldComparisonConfig( - "PrimaryContactEmail", + "PrimaryContactEmail", "SecondaryContactEmail", "Email address of secondary contact cannot be the same as primary contact" ) @@ -703,10 +703,10 @@ public async Task UpdatePrimaryContact(PrimaryContactViewModel pr ValidationHelper.ValidateDuplicateFields( ModelState, - primaryValue: primaryContactViewModel.PrimaryContactTelephoneNumber, - secondaryValue: providerProfileDto.SecondaryContactTelephoneNumber, + primaryValue: primaryContactViewModel.PrimaryContactTelephoneNumber, + secondaryValue: providerProfileDto.SecondaryContactTelephoneNumber, new ValidationHelper.FieldComparisonConfig( - "PrimaryContactTelephoneNumber", + "PrimaryContactTelephoneNumber", "SecondaryContactTelephoneNumber", "Telephone number of secondary contact cannot be the same as primary contact" ) @@ -726,16 +726,15 @@ public async Task UpdatePrimaryContact(PrimaryContactViewModel pr } else { - return RedirectToAction("CabHandleException", "Error"); + return RedirectToAction("CabHandleException", "Error"); } } else { - return View("EditPrimaryContact", primaryContactViewModel); + return View("EditPrimaryContact", primaryContactViewModel); } } - - + #endregion #region Edit secondary contact @@ -782,10 +781,10 @@ public async Task UpdateSecondaryContact(SecondaryContactViewMode ValidationHelper.ValidateDuplicateFields( ModelState, - primaryValue: providerProfileDto.PrimaryContactEmail, - secondaryValue: secondaryContactViewModel.SecondaryContactEmail, + primaryValue: providerProfileDto.PrimaryContactEmail, + secondaryValue: secondaryContactViewModel.SecondaryContactEmail, new ValidationHelper.FieldComparisonConfig( - "PrimaryContactEmail", + "PrimaryContactEmail", "SecondaryContactEmail", "Email address of secondary contact cannot be the same as primary contact" ) @@ -793,10 +792,10 @@ public async Task UpdateSecondaryContact(SecondaryContactViewMode ValidationHelper.ValidateDuplicateFields( ModelState, - primaryValue: providerProfileDto.PrimaryContactTelephoneNumber, - secondaryValue: secondaryContactViewModel.SecondaryContactTelephoneNumber, + primaryValue: providerProfileDto.PrimaryContactTelephoneNumber, + secondaryValue: secondaryContactViewModel.SecondaryContactTelephoneNumber, new ValidationHelper.FieldComparisonConfig( - "PrimaryContactTelephoneNumber", + "PrimaryContactTelephoneNumber", "SecondaryContactTelephoneNumber", "Telephone number of secondary contact cannot be the same as primary contact" ) @@ -814,14 +813,14 @@ public async Task UpdateSecondaryContact(SecondaryContactViewMode { return RedirectToAction("ProviderProfileDetails", "Cab", new { providerId = providerProfileDto.Id }); } - else + else { - return RedirectToAction("CabHandleException", "Error"); + return RedirectToAction("CabHandleException", "Error"); } } else { - return View("EditSecondaryContact", secondaryContactViewModel); + return View("EditSecondaryContact", secondaryContactViewModel); } }