All pastes #75731 Raw Edit

shane

public text v1 · immutable
#75731 ·published 2006-06-30 14:25 UTC
rendered paste body
Imports FTP
Imports System.IO
Imports DirectBillnetServer.DataAccess.DAO

Namespace Domain
   <Serializable()> _
   Public Class BlockControl
      Inherits MarshalByRefObject

#Region "Private Members"
      Private m_Account As Integer
      Private m_User As Integer
      Private m_Errors As ArrayList
#End Region

#Region "Constructor"
      ''' <summary>
      ''' Initialize members
      ''' </summary>
      ''' <remarks></remarks>
      Public Sub New()
         m_Account = 0
         m_User = 0
         m_Errors = New ArrayList
      End Sub


      ''' <summary>
      ''' Populates the members
      ''' </summary>
      ''' <param name="p_Account">Account ID</param>
      ''' <param name="p_User">User ID</param>
      ''' <remarks>Since remoting doesn't support constructor parameters, treat constructor like new()</remarks>
      Public Sub Constructor(ByVal p_Account As Integer, ByVal p_User As Integer)
         m_Account = p_Account
         m_User = p_User
      End Sub
#End Region

#Region "Public Methods"
      ''' <summary>
      ''' Blocks an account
      ''' </summary>
      ''' <returns></returns>
      ''' <remarks></remarks>
      Public Function BlockAccount(ByVal p_BlockID As Integer, ByVal p_BlockTypeID As Integer, ByVal p_BlockTypeText As String, ByVal p_BlockTreatment As Integer, ByVal p_ANI As String, ByVal p_County As String)
         Dim l_Result As Boolean

         ' Create a new block log entry
         Try
            l_Result = BlockLogDAO.CreateNew(p_BlockID, p_ANI, p_BlockTypeText, "Modify", p_County, False)
         Catch ex As Exception
            Me.m_Errors.Add("Error creating block log. Block successfully applied." & vbCrLf & ex.Message)
            Return False
         End Try

         Return True
      End Function
#End Region

   End Class
End Namespace