473,413 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

ArrayList Function In Bussiness Tier?

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
Nov 21 '05 #1
0 896

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: C Downey | last post by:
Hello: I have an arraylist storing some very basic objects. The object is very basic, it has 2 properties : ID, and COUNT Before I add an object to the arraylist, I want to check if an...
9
by: Leon | last post by:
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...
1
by: sd | last post by:
QUESTION: How can my ASP page - which uses language="VBScript" - pass a "System.Collections.ArrayList" object - as a parameter - to a C# method in the middle-tier ??? ----- Is it possible at...
20
by: Dennis | last post by:
I use the following code for a strongly typed arraylist and it works great. However, I was wondering if this is the proper way to do it. I realize that if I want to implement sorting of the...
18
by: JohnR | last post by:
From reading the documentation, this should be a relatively easy thing. I have an arraylist of custom class instances which I want to search with an"indexof" where I'm passing an instance if the...
2
by: James MA | last post by:
I'm going to build a project which contain the business logic only, and it should be device independent. And I'll have different program to build the UI in for different platform using the same...
8
by: amazon | last post by:
I have a following structure that I am using with array list: Private Structure arrayliststruct Public Name As String Public value As String Public type As String End Structure and following...
1
by: Jarsinio | last post by:
Hi, In my aplication I have an ArrayList thay hold many instances of a class. ( The bussiness layer return to the UI layer an ArrayList) I want to know how Can I fill the DataGrid with the...
6
by: fniles | last post by:
I am using VB.NET 2003 and a socket control to receive and sending data to clients. As I receive data in 1 thread, I put it into an arraylist, and then I remove the data from arraylist and send it...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.