home *** CD-ROM | disk | FTP | other *** search
ASP.NET Web Form | 2000-06-23 | 2.3 KB | 89 lines |
- <%@ Page Language="C#" %>
- <%@ Assembly Name="RateSvr" %>
- <%@ Import Namespace="RateSvr" %>
-
- <html>
- <head>
- <script runat="server">
- double loanAmount = 0;
- short loanTerm = 0;
- double loanMinRate = 0;
-
- String statusText;
- String statusType;
-
- void LoanAmount_change(Object Source, EventArgs E)
- {
- }
-
- void LoanTerm_change(Object Source, EventArgs E)
- {
- }
-
- void CalcLoan_Click(Object Source, EventArgs E)
- {
-
- Object o1;
-
- o1 = new RateSvr.RateLookup(); // Activator.GetObject(typeof(RateLookup), "http://localhost:80/COMZone/RateSvr.soap");
-
-
- statusType = o1.ToString();
-
- //
- RateSvr._RateLookup _rateLookup = null;
- _rateLookup = (_RateLookup)o1;
-
- if (null == _rateLookup) {
- statusText = "FAILED _rateLookup";
- }
-
- //
- statusText = "OK _rateLookup";
-
- statusType = _rateLookup.ToString();
- statusText = "OK _rateLookup::ToString";
-
- //
- loanAmount = Convert.ToDouble(LoanAmount.Value);
- loanTerm = Convert.ToInt16(LoanTerm.Value);
-
- if (_rateLookup == null)
- {
- statusText = "RateLookUpObj == null!";
- }
- else
- {
- statusText = "RateLookUpObj non null: calling GetLoanRate";
- //System.Diagnostics.Debugger.Break();
- // throw new Exception("this works?");
- loanMinRate = _rateLookup.GetLoanRate(loanAmount,loanTerm);
- statusText = "SUCCEEDED _rateLookup";
- }
- /*
- */
- //
- }
- </script>
- </head>
-
- <body style="font: 10pt verdana">
- <h3>MyCOMRate - RateLookup.GetLoanRate </h3>
-
- <form runat="server">
- <font face="Verdana"><b>Please Enter Loan Amount: </b>
- <INPUT id="LoanAmount" VALUE="" TYPE="TEXT" runat="server" OnServerChange = "LoanAmount_change">
- <p>
-
- <b>Please Enter Load Term (months): </b>
- <INPUT id="LoanTerm" VALUE="" TYPE="TEXT" runat="server" OnServerChange = "LoanTerm_change">
- <p>
-
- <ASP:Button id="CalcLoan" text="Calculate Loan" OnClick="CalcLoan_Click" runat="server" /></font>
- </form>
-
- <h3>Status : <%=statusText%></h3> <h3>StatusType : <%=statusType%></h3> <h3>Loan
- Min Rate : <%=loanMinRate%></h3>
-
- <h4><SOAP XML Request Message></h4>
-