Frogleg
posted
831 posts
since
Aug 13, 2010
from
Australia
|
|
Re: Help with program
|
|
|
|
|
|
|
|
|
|
|
When I use either button- it moves to last name ? As to check id try this
public void checkId() { foreach (Student stu in students) { if (stu.IdNumber.ToString() == idAddTextBox.Text) { MessageBox.Show("Sorry.Student id already in use"); return; } } }
|
|
|
|
|
|
Kevin
posted
7 posts
since
Feb 03, 2012
from
|
|
Re: Help with program
|
|
|
|
|
|
|
|
|
|
|
Thank you for that code to compare if the ID is already in the array list. They should not both go straight to the last name the lastStudent button should go straight to the last name but as for the nextStudent button it should display a different student every time until the end of the array list. But what I am having trouble with is that when I click the nextStudentButton I can continue to click until the end of the array not the last student.
|
|
|
|
|
|
Frogleg
posted
831 posts
since
Aug 13, 2010
from
Australia
|
|
Re: Help with program
|
|
|
|
|
|
|
|
|
|
|
There is a problem in your code - but it will take some time to work it out. Soon as I get somewhere, I'll post result
|
|
|
|
|
|
Frogleg
posted
831 posts
since
Aug 13, 2010
from
Australia
|
|
Re: Help with program
|
|
|
|
|
|
|
|
|
|
|
Here is my idea on your project
|
|
|
|
|
|