PC Review


Reply
Thread Tools Rate Thread

ArrayList Function In Bussiness Tier?

 
 
Leon
Guest
Posts: n/a
 
      25th Nov 2004
I have a webform in which when the user press generate button the form
generate six unique ramdon numbers, the user can also type these six numbers
in manually in any order. however, the user can also press a post button
that post these six numbers into the database. My problem is that these six
numbers need to be posted to the database from less to greatest, and all of
my code is within the business tier class not the code behind class.

After looking at my code below...
How do I create an ArrayList that can get the values from the Generate
function ("which include a stack") and pass the values to the form, and get
the values from the form and pass them to the database? **Please note where
you see is my problem. Thanks


Private Function Generate(ByVal Value As Integer) As Integer

Dim arrl(Value) As Integer

Dim x As Integer

Dim j As Integer

Dim s As Stack = New Stack

Dim blnexists As Boolean = True

For j = 0 To Value

arr1(j) = GetRandomNumber()

blnexists = s.Contains(arr1(j))

While blnexists = True

arr1(j) = GetRandomNumber()

blnexists = s.Contains(arr1(j))

End While

s.Push(arr1(j))

Next



For x = 0 To Value

arr1(x) = s.Pop()

Next


'Just Tried something did not work

'Dim I As Integer

'Dim pickNums As ArrayList = New ArrayList



'For I = 0 To PickCount

'pickNums.Add(arrl(I))

'Next

'GeneratePick = SortPick(pickNums)


End Function



'Just Tried something did not work

'Public Function SortPick(ByVal UserPick As ArrayList)

'UserPick.Sort()

'End Function


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Word 2003 - Two tier index repeates same top tier. Warren Postm4 Microsoft Word Document Management 3 6th Feb 2010 02:13 PM
Tier As Range Function Jim Microsoft Excel Programming 4 20th Aug 2009 05:35 PM
ArrayList Function In Business Tier? Leon Microsoft ASP .NET 9 30th Nov 2004 08:52 AM
ArrayList Function In Business Tier? Leon Microsoft C# .NET 0 25th Nov 2004 02:02 PM
Message board layered architecture 2-tier or 3-tier? Vin Microsoft Dot NET 0 22nd Jul 2004 07:46 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:41 PM.