|hcs consulting group.|
|we make complex systems simple|
in the above example we are actually moving people from one room in a tour to another room. in the above example the tour on the left side is the same as the one on the right side, but it does not have to be.
this cute simple screen is very complex. when i want to move that person, tons of things like room pricing has to be re-calculated for that one person. that pricing comes from a complex seasonal pricing table. i have to check for bus availability (the person likely has to be moved from one bus to another, and this is done automatically). however, before moving to that bus, availability of that bus must be checked. so, the problem becomes that i need two sets of a very complex system in memory (the tour on the left side, and the tour on the right side).
the point here is that for each tour, there is a ton of things need to have in memory:
What are the opportunities for housewivesIntroduction:part time online jobs no experience needed
- how many rooms available.
- how many tour buses available.
- how many seats on each tour bus.
- name of the tour bus company.
- how many corporate bookings are holding seats..but not yet used.
the above list gets quite long. each of the above "how many" questions is fact a bunch of code and queues to calculate the results. note that if my design has stored the above results, then probably i could get away not using a class object. however, every single one of the above values requires some code to calculate. so, i don't store how many rooms are available anywhere in the database. i don't store how many seats are available where. all of these values are the result of on the fly calculations. so, it becomes really hard to write code. when we move a person from one booking to another, all of the above information will have to be dealt with (i need it at my finger tips while writing code). further, if we need to display and have two bookings on the screen at the same time, that amount of information becomes very difficult when you now have to deal with two copies. using class objects made the whole thing quite easy.
lets try a bit of regular code here to ask a few questions about our tour. lets assume we have a booking record for a customer. ok, lets display the tour name, and the hotel a user is booked into. lets just assume that the user is booked to tour in the tours table (the tour table will define things like the hotel etc). heck, lets just say the tour id is 222. (this number is just the simple internal auto number for that tour record).
to get the hotel name for this booking, i would have to do the following.
set rsttour = currentdb.openrecordset("select * from tbltours where tourid = " & lngtourid)
online work from home without investmentIf you are interested in applying for an Amazon virtual job, you can start by visiting the Amazon jobs website. From there, you can search for jobs that are available in your area and submit an application online. You will need to provide information about your education and work experience, as well as any relevant skills or certifications that you have.online jobs part time no experience
earning part time through internetThere are many benefits to working as a data entry professional, particularly if you choose to work online and part-time. Some of the key benefits include:work from home for students without investment
ok...so now we have the tour, lets display the tour name
msgbox "tour name = " & rsttour!tourname
ok, now display the hotel name. the hotel name of course is simply a hotelid in the tour.
lnghotelid = rsttour!hotel
set rsthotel = currentdb.openrecordset("select * from tblhotels where hotelid = " & lnghotelid)
msgbox "hotel name = " & rsthotel!hotelname
you can see what pain it is to just get the tour name, and the hotel name. we have to deal with two related tables, build two queries, declare two recordsets. man, what a pain! we could perhaps use the dlookup function above to reduce some code, but even dlookup becomes a real hassle here. we also could use a query that is a relational join to reduce the above code. however, there is a lot of additional things we need when working with the tour.
now extend the above to include the room type description (a another table), the room rates (another table, and complex looking to a seasonal pricing system). grab the bus? heck...this is becoming a night mare to simply display a few things about the users booking. and, do you want to try and work with two of these tours in memory at the same time?
now, lets do all of the above with a class object.
these properties of the object are actual ones that i use:
' declare an instance of our tour object.
dim mytour as new clsridestour
mytour.tourid = lngtourid
' at this point, i can retrieve, and ask virtually anything i want about his tour. so.
mytour.tourname returns the name of the tour
mytour.hotelname returns the name of the hotel
mytour.hotelspace returns the space allocated in the hotel
mytour.hotelrooms returns the number of rooms in this tour
mytour.hotelroomsused returns the number of rooms used
i will stop at this point, but to get the above simple answers with regular coding methods..it will requite at lest 50 lines or more of code? yikes!! is not the above incredibly easy? hey, lets get the space remaining in the tour:
work from home jobs near me part time no experienceVirtual Assistant:online encoder part time
you could just write a bunch of regular subroutines for each of the above questions, but you can see that many of the questions like tourname, hotel name etc will requite you to load a set of related records.
part time eveningEstablish a Routine � Create a daily routine for yourself that includes breaks, exercise, and time away from your computer.part time remote bookkeeping jobs
how nice and easy it is to get the hotel space remaining. note only that, but inteli-sense works for all of the above..so i don't even have to remember all the names of subroutines/code as i type!
and to get number of people on the bus for this tour..?
here is the actual class code for above example in the class object for inbustotal:
public property get inbustotal() as integer inbustotal = 0 if m_rstbuslist.recordcount > 0 then m_rstbuslist.movefirst do while m_rstbuslist.eof = false inbustotal = inbustotal + nz(m_rstbuslist!inbus) m_rstbuslist.movenext loop end if end property
now, if you look at the above property of the object, you will notice
that a recordset m_rstbuslist is already loaded. in other words, when i
create and set the mytour = "tour id", then all of the recordsets for
bus company, hotels, rates etc gets loaded into the object. hence, the
above code as a result is much better then just writing a stand alone
subroutine called "in bus total". since, a stand alone routine would
have to still load up a very complex query into the recordset. i don't
have to do that since the class object is a collection of those
reocrdsets and routines to give me the "things" i need to know about a
tour. the more you add code to the class object...the more it simplifies
the application. when you don't use a object the more code you write the
worse your application will get! (ask your self, where would i put those
recordsets? and how would i share them between each routine? i can't use
global vars, since then i would be restricted to working with one tour
in memory at a time).
no experience data entry jobs from homeHow to Apply:work from home part time jobs for students without investment
part time home jobsAffiliate Marketing:no experience data entry jobs from home
anyway...you can see that the whole thing just becomes such a pain to
code simple questions about a tour. create a tour object, and virtually
anything you need about that tour is ready made at your finger tips.
offline typing jobs from home without investment and registration feesFinding online part-time jobs can be challenging, but there are several strategies one can use to increase their chances of success. Some of these strategies include:part time remote jobs that pay well
work from home jobs for housewife part timeOnline Form Filling Jobs: These jobs involve filling out online forms with the required information.part time customer service remote jobs
data entry jobs online from home without investmentSummer Camp Counselor: Working as a summer camp counselor can be a rewarding experience. You'll be responsible for leading and supervising campers in various activities, such as arts and crafts, sports, and games.part time work from home jobs
full time evening jobsThe quality of your work will be the most important factor in determining your success as an online part-time worker. Make sure to create high-quality work that showcases your skills and expertise.best online part time jobs for students