public ExitReasons GetExitReasonsByBenefitCode(string schemeName, string benefitCode) { var user = UserManager.Users.Where(x => x.UserName == User.Identity.Name).FirstOrDefault(); var SchemeName = GetSchemeNameAsync(user.SponsorNumber); ExitReasons_Service service = new ExitReasons_Service(); service.UseDefaultCredentials = false; service.Credentials = new NetworkCredential(PensionSetup.SoapUsername, PensionSetup.SoapPassword); service.Url = "http://" + PensionSetup.ServerName + ":" + PensionSetup.ServerPort + "/" + PensionSetup.ServerInstance + "/WS/" + SchemeName + "/Page/ExitReasons"; ExitReasons reason = new ExitReasons(); reason = service.Read(benefitCode); return(reason); }
public ActionResult GetBenefitConfigurationMatrixByBenefitCode(string benefitCode) { var user = UserManager.Users.Where(x => x.UserName == User.Identity.Name).FirstOrDefault(); var SchemeName = GetSchemeNameAsync(user.SponsorNumber); ExitReasons_Service service = new ExitReasons_Service(); service.UseDefaultCredentials = false; service.Credentials = new NetworkCredential(PensionSetup.SoapUsername, PensionSetup.SoapPassword); service.Url = "http://" + PensionSetup.ServerName + ":" + PensionSetup.ServerPort + "/" + PensionSetup.ServerInstance + "/WS/" + SchemeName + "/Page/ExitReasons"; ExitReasons reason = new ExitReasons(); var data = new { reason = service.Read(benefitCode) }; return(Json(data, JsonRequestBehavior.AllowGet)); }