Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,223 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,242 people online right now. Registration is fast and FREE... Join Now!




course scheduler

 
Reply to this topicStart new topic

course scheduler, need help with limiting schedule to 4 courses and making sure none are

harleykay
6 Dec, 2007 - 01:47 PM
Post #1

New D.I.C Head
*

Joined: 24 Oct, 2007
Posts: 9


My Contributions
I need to make a course scheduler...and in this, i need to limit the number of courses to 4. also, none of the courses can have conflicting times.
i know the class name and times should be parallel arrays...i may or may not be doing that correctly. I've tried the following:

CODE
         Dim times As String
        Dim intindex As Integer = strLine.IndexOf("/")
        times = strLine.Substring(intindex + 1).Trim

note that the character that comes between the class and its times is "/", so i know that part is ok.

as for the other bits, i've done the following code (all variables are declared as such, although its not listed here):


CODE
Dim i As Integer
        i = (lstSchedule.Items.Count()) <= 4
        If i > 4 Then
            MessageBox.Show("Sorry, no more than 4 classes...Too much work!")
        End If
        Dim k As Integer
        k = 1
        For k = 1 To lstSchedule.Items.Count
            class1 = times(k)
            class2 = lstSchedule.FindStringExact(times(k))
            If class1 = class2 Then
                lblConflicts.Text = class1 & vbCrLf & class2
            End If
        Next


i have this in the "add" button code....perhaps that's the wrong place ,but i'm not sure where else to put it. this code doesn't have any visible effect....what am i doing wrong?

thanks so much!!!
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 05:56AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month