473,378 Members | 1,427 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,378 software developers and data experts.

ArrayList Function In Business Tier?

**I don't care if the solution is in C#!!!!!

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 16 '05 #1
0 1011

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...
5
by: G. Stewart | last post by:
The word "Business" in the term implies some sort of commercial aspects or connotations. But from what I can see, that is not necesserially the case at all? So what is the reasoning behind the...
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...
8
by: Keith-Earl | last post by:
Okay, looking for a Best Practice. We are building a classic three tier app in VB.NET. When we load up a WebForm we have access to very useful objects such as the Session object. We frequently...
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...
0
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...
18
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For...
1
by: Nemisis | last post by:
Hi everyone, We are currently re-developing our software, to asp.net 2.0 and taking a 3 tier architecture. I have been thinking about it, and i think that it belongs in the business tier. ...
4
by: pratham | last post by:
Hi! I'm making a database application and i heard from a friend that it is more proffecional and easy to do this with bussines objects. Can anyone tell me where i can find more info on bussines...
2
by: grawsha2000 | last post by:
Greetings, I am developing this N-tier business app. The problem I'm facing is when I try to pass business objects (employees, dept..etc) from business tier to data tier,i.e., the add method in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.