|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: |
Imports System.Text
Imports System.Collections.Generic
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Web.Services.Protocols
Imports System.Xml
Public Class TransactionWAM
Inherits Transaction
Private Enum WAMTransactionType As Integer
Activation = 201
Deactivation = 211
ProfileChange = 501
SIMQuery = 601
RatePlanChange = 701
End Enum
''' <summary>
''' A rogers activation will be data only or voice enabled, at the SIM features level
''' </summary>
''' <remarks></remarks>
Private Enum SIMDataOnlyStatus As Integer
HasDataOnly = 1
HasVoiceEnabled = 2
Issue_NoKeySAFFeature = 3
Issue_ConflictingSAFFeature = 4
End Enum
'Fields
Private strSQL As String = ""
Private m_simID As Integer = 0
Private m_imei As String = "222222222222228"
Private m_subscriberName As String = "KORE Telematics"
Private m_msisdn As String = ""
Private m_simNumber As String = ""
Private m_pricePlanCode As String = ""
Private m_simDataOnlyStatus As Integer = 0
Private m_contractType As String = ""
Private m_pricePlanCodeID As Integer = 0
Private arrServices As New ArrayList()
Private serviceList As List(Of Service) = New List(Of Service)
Private m_batch As SAGBatch
Public Property Batch() As SAGBatch
Get
Return m_batch
End Get
Set(ByVal Value As SAGBatch)
m_batch = Value
End Set
End Property
'Constructor
Sub New(ByVal intTransactionID As Integer, ByVal intSIMTypeID As Integer, _
ByVal sagBatch As SAGBatch)
MyBase.New(intTransactionID, intSIMTypeID)
Batch = sagBatch
Dim intResult As Integer = 0
Dim strSQL As String = ""
Dim dr As SqlClient.SqlDataReader
'Get all the transaction info we need, which now includes the ContractType
strSQL = ""
strSQL = strSQL & "SELECT "
strSQL = strSQL & "tbl_sag_transaction.SIMID, "
strSQL = strSQL & "tbl_sag_transaction.[SIM_Number], "
strSQL = strSQL & "tbl_sag_transaction.MSISDN, "
strSQL = strSQL & "tbl_sag_transaction.TransactionTypeID, "
strSQL = strSQL & "ISNULL(tbl_sims.PricePlan, 0) AS PricePlanCodeID, "
strSQL = strSQL & "tbl_billing_contracts.ContractType "
strSQL = strSQL & "FROM tbl_sag_transaction "
strSQL = strSQL & "JOIN tbl_sims "
strSQL = strSQL & "ON tbl_sag_transaction.SIMID = tbl_sims.SIMID "
strSQL = strSQL & "JOIN tbl_locations "
strSQL = strSQL & "ON tbl_sims.LocationID = tbl_locations.LocationID "
strSQL = strSQL & "JOIN tbl_billing_contracts "
strSQL = strSQL & "ON tbl_locations.LocationID = tbl_billing_contracts.LocationID "
strSQL = strSQL & "WHERE tbl_sag_transaction.TransactionID = " & Me.TransactionID.ToString
dr = helperData.GetSQLDataReader(strSQL, "sid")
'A note about Price Plans.
'when you are activating a SIM the correct price plan is calculated based on contract type & features.
'when this is a general request bulk feature change (501) the SIM is already active on a price plan
'which does not change.
If dr.Read Then
TransactionTypeID = Convert.ToInt32(dr("TransactionTypeID"))
m_simID = Convert.ToInt32(dr("SIMID"))
m_simNumber = dr("SIM_Number").ToString()
m_msisdn = dr("MSISDN").ToString()
m_contractType = dr("ContractType").ToString
m_pricePlanCodeID = dr("PricePlanCodeID").ToString
'Create Services from tbl_sag_commands
'Dim arrServices As New ArrayList()
arrServices = GetServices(TransactionID)
'Dim serviceList As List(Of Service) = New List(Of Service)
If arrServices.Count > 0 Then
For i As Integer = 0 To arrServices.Count - 1
If Not arrServices(i) Is Nothing AndAlso CStr(arrServices(i)) <> "" Then
Dim service As New Service()
service.code = Trim(arrServices(i).ToString())
serviceList.Add(service)
End If
Next
End If
End If 'If dr.Read
dr.Close()
End Sub
Public Sub ActivateWAMTransaction()
Dim intResult As Integer = 0
Dim status As New TransactionStatus()
Dim errorCode As String = ""
Dim errorMessage As String = ""
Dim sagStatus As String = ""
Dim transactionState As String = ""
Try 'SoapException handler
Dim Obj As New RogersWebService.Wam
Obj.Url = "127.0.0.1"
status = Obj.activateSubscriber(TransactionID.ToString(), _
Me.m_msisdn, _
EquipmentType.GSM, _
Language.English, _
Me.m_simNumber, _
Me.m_imei, _
Me.m_subscriberName, _
Me.m_pricePlanCode, _
serviceList.ToArray())
Catch sExp As SoapException
status.status = TransactionStatusStatus.apperror
Dim xmlDoc As New XmlDocument()
xmlDoc.LoadXml(sExp.Detail.InnerXml)
Dim elemList As XmlNodeList = xmlDoc.GetElementsByTagName("wam:englishMessage")
If elemList.Count > 0 Then errorMessage = elemList(0).InnerText
elemList = xmlDoc.GetElementsByTagName("wam:errorCode")
If elemList.Count > 0 Then errorCode = elemList(0).InnerText
End Try
End Sub
Private Function GetServices(ByVal transactionID As Integer) As ArrayList
Dim arr As New ArrayList()
Dim sql As String = "select [Service] from tbl_sag_command where transactionid=" & transactionID.ToString() & " "
Dim dr As SqlDataReader = helperData.GetSQLDataReader(sql, "sid")
If dr.Read() Then
Dim services As String = dr("Service").ToString()
For Each s As String In services.Split(Convert.ToChar(";"))
arr.Add(s)
Next
End If
dr.Close()
Return arr
End Function
End Class
--------------------------------------------------------------------------------------------------
|
Advertisement
| Hall of Fame |