Hello,
For school i have to make a order program.
But i am struggling with 2 last things.
When someone clicks on a line he can use the nummeric up/down to order a value of that product.
After that he can click on the "add to chart" button and it's added to a txt file.
But when the button is pressed the line or the up/down value has to be disabled.
But i can't figure out how (damn thing!) hihi
There is a txt file from where i fill the listbox. like this:
Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
Try
Dim Text(23, 4) As String
Dim StockList As New StreamReader("w oodsheets.txt")
Do While StockList.Peek <> -1
Dim fileName As String = StockList.ReadL ine
Stock.Items.Add (fileName)
Loop
StockList.Close ()
Catch
MsgBox("Can't find the orderlist.")
End Try
End Sub
I think the problem is starting here, because i think that the txt file has to be putted into a public array, not an variable
Also there is another thing.
In the text file (for example: 3344838; White Oak; 21.85; 0 )
you'll see at the end a 0.
When a amount has been ordered, that 0 has to become the value of the ordered amount...
I hope i explained it well...
If not, i can email you the original program and my source code.
Thanx in advance!
Paul
1 1261 vanc 211
Recognized Expert New Member
The first thing is clicking on "a line", I don't know how you handle this, since the line has no event.
The second thing is about your text file. If I don't misunderstand, you want to make orders and write it back to text file. There many ways to do it, but I recommend you should create a class called Order and when you read data from text file, you then create all current Orders object in memory, so it's very easy for you to modify any order, because you have all orders in memory and each order has a object referenced to it. You modify any info in those objects then write it back out.
cheers.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: hortoristic |
last post by:
We are using JavaScript to Enable/Disable certain fields on web pages
based on business rules.
A simple example is if when using an option type tag, and the two
options are Yes and No. If YES is selected - enable a field to use
the M$ Datepicker. Using the code below works for most of our fields,
however the problem is that when the field is re-enabled - it
remembers the original date or data prior to it being disabled -
despite the...
|
by: Jim Cobban |
last post by:
I cannot get Netscape 4.79 to properly display the ordered list in the
following fragment.
<P>Get a specific portion of the date.
Depending upon the value of index:
<ol start=0>
<li>complete value, usually as a <code>String</code>, or if
an integral value as an <code>Integer</code>.
<li>year as an <code>Integer</code>
<li>month number as an <code>Integer</code>
|
by: Danny Lesandrini |
last post by:
I'm using an Access database to drive a web site and the
colors of various table backgrounds are stored in Access.
I want users of the Access database to be able to select
colors for the site, but my mappings between named colors,
HEX values and the Long Integer values used in Access are
not jibbing. Anyone have a nice list laying around?
Danny J Lesandrini
dlesandrini@hotmail.com
|
by: surf_doggie |
last post by:
Im not sure if this is the group to post in, if anyone knows a more
appropriate one please let me know.
Please consider the following example of a feature most all browsers
have that I would like to either disable or find a work around for.
Background:
I have a form that has 3 input type="text" fields. The fields are
Quantity, Amount and total. OnKeyUp is used when you enter something in
Quantity or Amount to trigger a javaScript...
|
by: User |
last post by:
Hi,
Is it possible to transform Ordered/Unordered list into navigation dropdown
menus?
Is this effect achieved by CSS? or via Javascript?
PLease advise
Thanks.
| |
by: secndChildhood |
last post by:
I hope someone can help with this problem:
I have a perl cgi form that has a popup_list. Based on a value that
is coming in from a database query, I want to either
1) display the value (from the databse) and let the user change it;
OR
2) display the value (from the database), but NOT let the user change
it.
I tried using javascript to disable the popup list, and that works,
except the form "loses" the value of the entry in the popup...
|
by: Guy |
last post by:
Is there a better way to search identical elements in a sorted array
list than the following:
iIndex = Array.BinarySearch( m_Array, 0, m_Array.Count,
aSearchedObject );
aFoundObject= m_Array;
m_ResultArray.Add ( aFoundObject);
|
by: shapper |
last post by:
Hello,
I have the following:
<ol id ="ol">
<li id="li1">item1</li>
<li id="li2">item2</li>
<ol>
Is it possible to display the List Items on the horizontal, i.e., side
|
by: dineshv |
last post by:
I want to see if there is an alternative method for fast list
traversal. The code is very simple:
dict_long_lists = defaultdict(list)
for long_list in dict_long_lists.itervalues()
for element in long_list:
array_a = m + n + p # m,n,p
are variable numbers
The long_list's are read from a defaultdict(list) dictionary and so
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |