home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / NETFrameworkSDK.exe / comsdk.cab / samples.exe / Remoting / MyCOM / MyCOMRate.aspx < prev    next >
Encoding:
ASP.NET Web Form  |  2000-06-23  |  2.3 KB  |  89 lines

  1. <%@ Page Language="C#" %>
  2. <%@ Assembly Name="RateSvr" %>
  3. <%@ Import Namespace="RateSvr" %>
  4.  
  5. <html>
  6. <head>
  7.     <script runat="server">
  8.      double loanAmount = 0;
  9.      short loanTerm = 0;
  10.      double loanMinRate = 0;
  11.  
  12.      String statusText;
  13.      String statusType;
  14.  
  15.      void LoanAmount_change(Object Source, EventArgs E)
  16.      {
  17.      }
  18.  
  19.      void LoanTerm_change(Object Source, EventArgs E)
  20.      {
  21.      }
  22.  
  23.      void CalcLoan_Click(Object Source, EventArgs E)
  24.      {
  25.  
  26.          Object o1;
  27.  
  28.          o1 = new RateSvr.RateLookup(); // Activator.GetObject(typeof(RateLookup), "http://localhost:80/COMZone/RateSvr.soap");
  29.  
  30.  
  31.          statusType = o1.ToString();
  32.  
  33. //
  34.          RateSvr._RateLookup _rateLookup = null;
  35.          _rateLookup = (_RateLookup)o1;
  36.  
  37.          if (null == _rateLookup) {
  38.              statusText = "FAILED _rateLookup";
  39.          }
  40.  
  41. //
  42.          statusText = "OK _rateLookup";
  43.  
  44.          statusType = _rateLookup.ToString();
  45.          statusText = "OK _rateLookup::ToString";
  46.  
  47. //
  48.          loanAmount = Convert.ToDouble(LoanAmount.Value);
  49.          loanTerm = Convert.ToInt16(LoanTerm.Value);
  50.      
  51.         if (_rateLookup == null)
  52.         {
  53.             statusText = "RateLookUpObj == null!";
  54.         }
  55.         else
  56.         {
  57.             statusText = "RateLookUpObj non null: calling GetLoanRate";
  58.             //System.Diagnostics.Debugger.Break();
  59.             // throw new Exception("this works?");
  60.             loanMinRate = _rateLookup.GetLoanRate(loanAmount,loanTerm);
  61.             statusText = "SUCCEEDED _rateLookup";
  62.         }
  63. /*
  64. */
  65. //
  66.      }
  67.     </script>
  68. </head>
  69.  
  70. <body style="font: 10pt verdana">
  71. <h3>MyCOMRate - RateLookup.GetLoanRate </h3>
  72.  
  73. <form runat="server">
  74.     <font face="Verdana"><b>Please Enter Loan Amount: </b>
  75.     <INPUT id="LoanAmount" VALUE="" TYPE="TEXT" runat="server" OnServerChange = "LoanAmount_change">
  76.     <p>
  77.  
  78.     <b>Please Enter Load Term (months): </b>
  79.     <INPUT id="LoanTerm" VALUE="" TYPE="TEXT" runat="server" OnServerChange = "LoanTerm_change">
  80.     <p>
  81.  
  82.     <ASP:Button id="CalcLoan" text="Calculate Loan" OnClick="CalcLoan_Click" runat="server" /></font>
  83. </form>
  84.  
  85. <h3>Status : <%=statusText%></h3> <h3>StatusType : <%=statusType%></h3> <h3>Loan 
  86. Min Rate : <%=loanMinRate%></h3>
  87.  
  88. <h4><SOAP XML Request Message></h4>
  89.