예제 #1
0
        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);
        }
예제 #2
0
        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));
        }