Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Book: C# 2008 Programmer's Reference ISBN: 978-0-470-28581-7
This is the forum to discuss the Wrox book C# 2008 Programmer's Reference by Wei-Meng Lee; ISBN: 9780470285817
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Book: C# 2008 Programmer's Reference ISBN: 978-0-470-28581-7 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old November 8th, 2009, 04:33 AM
Authorized User
Join Date: Jul 2008
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hashtable


I have vb.net code as below
can any one help me to convert it into c# 2008.
I am having problem that how to use multiple hashtable? means hashtable into hashtable? i am very confuced. thanks in advance.
   Private Shared Function getPatientDetail(ByVal Ticket As String) As Boolean
        Dim objDr As OleDb.OleDbDataReader
        Dim patient As PatientHeader
        Dim createNewPatient As Boolean
            getPatientDetail = False
            createNewPatient = False
            objDr = StatementCommon.AcCmd.GetReader(getSQLPatientDetail(Ticket))
            If objDr.HasRows Then
                StatementCommon.ObjLogWriter.AddToReport("Message : GetPatientDetail: Getting Information for  Ticket NO:  " & Ticket) ' 1.0.8a
                While objDr.Read()
                    If _patientCount = 0 Then
                        createNewPatient = True
                        _patientCount = _patientCount + 1
                        patient = New PatientHeader
                        _filehdr.StatementHeaderCollection.Item(_filehdr.StatementHeaderCollection.Count).PatientHeaderCollection.Add(_patientCount, patient)
                        _ticketCount = 0
                        _transactionCount = 0
                        If DirectCast(_filehdr.StatementHeaderCollection.Item(_statementCount).PatientHeaderCollection.Item(_patientCount).PatientNumber, String).Trim() <> DataCheck.NullString(objDr.Item("PatientNo")).Trim() Then
                            createNewPatient = True
                            _patientCount += 1
                            patient = New PatientHeader
                            _filehdr.StatementHeaderCollection.Item(_filehdr.StatementHeaderCollection.Count).PatientHeaderCollection.Add(_patientCount, patient)
                            _ticketCount = 0
                            _transactionCount = 0
                        End If
                    End If
                    With _filehdr.StatementHeaderCollection.Item(_statementCount).PatientHeaderCollection.Item(_patientCount)
                        .RecordType = "P"
                        .PatientNumber = IIf(DataCheck.NullString(objDr.Item("PatientNo")) <> String.Empty, DataCheck.NullString(objDr.Item("PatientNo")), .PatientNumber)
                        .PatientFirstName = IIf(DataCheck.NullString(objDr.Item("PatientFirstName")) <> String.Empty, DataCheck.NullString(objDr.Item("PatientFirstName")), .PatientFirstName)
                        .PatientMI = IIf(DataCheck.NullString(objDr.Item("PatientMI")) <> String.Empty, DataCheck.NullString(objDr.Item("PatientMI")), .PatientMI)
                        .PatientLastName = IIf(DataCheck.NullString(objDr.Item("PatientLastName")) <> String.Empty, DataCheck.NullString(objDr.Item("PatientLastName")), .PatientLastName)
                        .PatientSSN = IIf(DataCheck.NullString(objDr.Item("PatientSSN")) <> String.Empty, DataCheck.NullString(objDr.Item("PatientSSN")), .PatientSSN)
                        .PatientPhone = IIf(DataCheck.NullString(objDr.Item("PatientPhone")) <> String.Empty, DataCheck.NullString(objDr.Item("PatientPhone")), .PatientPhone)
                        .PatientPrimIns = IIf(DataCheck.NullString(objDr.Item("PrimInsName")) <> String.Empty, DataCheck.NullString(objDr.Item("PrimInsName")), .PatientPrimIns)
                        .PatientSecIns = IIf(DataCheck.NullString(objDr.Item("SecInsName")) <> String.Empty, DataCheck.NullString(objDr.Item("SecInsName")), .PatientSecIns)
                        .PatientAddressLine1 = IIf(DataCheck.NullString(objDr.Item("PatientAddressLine1")) <> String.Empty, DataCheck.NullString(objDr.Item("PatientAddressLine1")), .PatientAddressLine1)
                        .PatientAddressLine2 = IIf(DataCheck.NullString(objDr.Item("PatientAddressLine2")) <> String.Empty, DataCheck.NullString(objDr.Item("PatientAddressLine2")), .PatientAddressLine2)
                        .PatientCity = IIf(DataCheck.NullString(objDr.Item("PatientCity")) <> String.Empty, DataCheck.NullString(objDr.Item("PatientCity")), .PatientCity)
                        .PatientState = IIf(DataCheck.NullString(objDr.Item("PatientState")) <> String.Empty, DataCheck.NullString(objDr.Item("PatientState")), .PatientState)
                        .PatientZip = IIf(DataCheck.NullString(objDr.Item("PatientZip")) <> String.Empty, DataCheck.NullString(objDr.Item("PatientZip")), .PatientZip)
                        .PatientTotalDouble = 0.0
                    End With
                End While
            End If
            If _filehdr.StatementHeaderCollection.Item(_statementCount).PatientHeaderCollection.Item(_patientCount).HasError = False And _filehdr.StatementHeaderCollection.Item(_statementCount).PatientHeaderCollection.Item(_patientCount).HasTicketError = False Then
                getPatientDetail = True
            End If
        Catch ex As Exception
            StatementCommon.ObjExpWriter.WriteExceptions(ex, "GETStatementDetail")
            getPatientDetail = False
            If Not IsNothing(objDr) Then
                If Not objDr.IsClosed Then objDr.Close()
            End If
        End Try
    End Function
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hashtable ajit Java Basics 1 July 11th, 2006 01:25 AM
Hashtable Scott Rider General .NET 7 July 3rd, 2005 02:25 AM
Hashtable mahulda General .NET 2 August 2nd, 2004 07:49 AM
Hashtable in C# sachin-csharp .NET Framework 2.0 0 July 28th, 2004 01:45 AM
about hashtable csc820203 C# 1 July 11th, 2004 07:44 PM

All times are GMT -4. The time now is 03:38 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.