Protected Sub btnRaiseOutboundRequestOperation_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRaiseOutboundRequestOperation.Click
Dim request As New Request Dim isOperationSuccessfull As Boolean = False
If Not String.IsNullOrEmpty(Session("GalaxyId")) Then
If Not String.IsNullOrEmpty(Current.Request.QueryString("reqid")) Then
Dim requestId As Integer = Integer.Parse(Current.Request.QueryString("reqid")) request = bl_Request.LoadRequest(requestId) request = CreateRequestObject(Enumerations.Operation.Update, request)
If bl_Request.UpdateRequest(request) Then isOperationSuccessfull = True End If
Else
request = CreateRequestObject(Enumerations.Operation.Create, Nothing) request.RequestId = bl_Request.RaiseRequest(request)
If request.RequestId > 0 Then isOperationSuccessfull = True End If
End If
If isOperationSuccessfull Then
Dim thisOperationsRequestHistory As RequestHistory = bl_RequestHistory.CreateRequestHistoryObject(Session("GalaxyId"), request.RequestId, txtRaiseOutboundRequestRemark.Text)
If bl_RequestHistory.CreateRequestHistoryEntry(thisOperationsRequestHistory) Then Response.Redirect("RequestPool.aspx") Else lblMessage.Text = "<span style='color: Red;'>Creation of request trace failed.</span>" lblMessage.Visible = True End If
Else lblMessage.Text = "<span style='color: Red;'>Request operation failed.</span>" lblMessage.Visible = True End If
End Sub