Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seat reservation
Message
From
02/10/2011 07:01:59
Muthu Vel
Sty Company
India
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Seat reservation
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01525382
Message ID:
01525382
Views:
142
I have two tables
1) Student_master having fields 1. regno(I) 2.name(c) 3.dob(d) 4.result(c) 5.caste(c)

2) seat_mbbs havind fileds 1. College(c) 2. Ge(I) 3. MBC(I) 4.OBC(I) 5. Ka(I) 6.Ma(I)

In my seat allotemnt.scx i placed three text boxes 1.txtregno 2.txtname 3. txtcaste and two command button 1. cmdpims caption = PIMS 2.cmdavmc caption = AVMC.

herewith we attach model of our tables and form.

In our counseling we have followed two types of seat reservation 1. Vertical reservation 2.Horizontal reservation. so I request two types of code

1. Vertical Reservation - if student Caste = Ge or MBC or OBC first we allot the seat in Ge field of seat_mbbs.dbf, once GE field will become 0 then we allot the seat in their corresponding caste field.

2. Horizontal Reservation - if student Caste = Ka or Ma first we allot the seat in their corresponding caste field and once their caste become 0 then we will allot the seat in Ge field.

Let assume the txtregno is 20001 and txtname = kumar.S and txtcaste = MBC , the student want PIMS college means then i simply click on the cmdpims button then go the seat_mbbs.dbf and allot the seat in Ge field(i.e subtract -1).

Let assume the txtregno is 20002 and txtname = saravanan.R and txtcaste = Ka , the student want AVMC college means then i simply click on the cmdavmc button then go the seat_mbbs.dbf and allot the seat in Ka field(i.e subtract -1).

How to write code?
Reply
Map
View

Click here to load this message in the networking platform