CCRR
vbnet
posted: Jan, 19th 2012 | jump to bottom
<%@ Page Title="Home Page" Language="vb" %> <%@ Import namespace="LFSO83Lib" %> <script runat="server"> Protected Overrides Sub OnLoad(e As EventArgs) Try ' Instantiates a new LFApplication object. Dim app As New LFApplication ' Connects to repository. Dim db As LFDatabase = app.ConnectToDatabase("DEV", "SFA30197APP100", "CCUSER", "srvcu$er101") Dim Conn As LFConnection = db.CurrentConnection Dim ID As String = Request.QueryString(0) Dim Entry As ILFEntry = db.GetEntryByID(ID) If Entry.EntryType = Entry_Type.ENTRY_TYPE_DOCUMENT Then Dim Document As LFDocument = db.GetEntryByID(ID) Dim DocumentFD As LFFieldData = Document.FieldData Dim IGA As String = DocumentFD.Field("IGA") Dim ClaimNumber As String = DocumentFD.Field("Claim Number") Dim IGAPlusClaimNumber As String = IGA & "-" & ClaimNumber Response.Redirect("http://localhost?claimNumber=" & IGAPlusClaimNumber) MyBase.OnLoad(e) ElseIf Entry.EntryType = Entry_Type.ENTRY_TYPE_SHORTCUT Then Dim Shortcut As LFShortcut = db.GetEntryByID(ID) If Shortcut.EntryReferencedType = Entry_Type.ENTRY_TYPE_DOCUMENT Then Dim Document As LFDocument = Shortcut.EntryReferenced Dim DocumentFD As LFFieldData = Document.FieldData Dim IGA As String = DocumentFD.Field("IGA") Dim ClaimNumber As String = DocumentFD.Field("Claim Number") Dim IGAPlusClaimNumber As String = IGA & "-" & ClaimNumber Response.Redirect("http://localhost?claimNumber=" & IGAPlusClaimNumber) MyBase.OnLoad(e) End If Else Response.Redirect("http://localhost/laserfiche8/ccrerouteerror.aspx") MyBase.OnLoad(e) End If Conn.Terminate() Catch ex as System.Exception Response.Redirect("http://localhost/laserfiche8/ccrerouteerror.aspx") MyBase.OnLoad(e) Conn.Terminate() End Try End Sub </script>
38 views




