PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Complex Data Operations
Complex Data Operations
Débuté par Steve Erts, 22 juil. 2005 03:25 - 8 réponses
Posté le 22 juillet 2005 - 03:25
I am new to Windev and am not sure how to approach a certain issue using Windev.
I am creating a Travel Reservation System.
In this system the user can Create Packages (Trips) that have Prices, Inventory, and Components associated to them.
When a user wants to create a new Reservation teh user will select a package and the application will then need read to through the components associated to a package (there may be one or many) and load them automatically into the reservation components table without the user having to select them individually. Additionally, the application will have to load any prices associated to the component (from a prices table) and read inventory (from an inventory table.)
I am stumped as to how I would approach such a requirement in WinDev.
Any guidance would be greatly appreciated.
Posté le 22 juillet 2005 - 04:59
I suggest you find a book call Code Complete from Microsoft. What you are describing is a relational database. The success of such a program starts with the data design. You can do your design with the data tools windev provides.
How long have you been writing software ?
joe
Posté le 22 juillet 2005 - 07:44
and actually I have a great many of my data entry screens done already and have found windev quite easy for doing this. I have roughly 90 tables defines so far.
I suggest you find a book call Code Complete from Microsoft. What you are describing is a relational database. The success of such a program starts with the data design. You can do your design with the data tools windev provides.
How long have you been writing software ?
joe
Posté le 22 juillet 2005 - 08:39
G'day Steve
I am in the same spot as Joe in not really appreciating exactly what you want to know, but now that you have established it is not a data design issue, I will try it from the presentation aspect which is largely a matter of personal preference, but one approach would be to use linked tables on a single window
The main table would hold the packages with smaller subsidiary tables underneath it to hold the components. You could set the tables up as file browse, sql or memory tables. The subsidiary tables would be triggered from the rowselection code of the main table so that when a package is selected then its components would be selected and displayed in a subsidiary table and they could in turn fill any other tables from either the rowdisplay or rowselection table code. Your primary and foreign keys will set up the links. The final selection of a set of linked data would be saved from either a screen button or double click on main table etc. You would gather the data from the table rows for the save process and just save the keys in a reservation table.
Regards
Al
Posté le 22 juillet 2005 - 12:48
Hi Steve,
this is the classic 'parts list / assembly / restaurant menue' plot.
In principle, a 'product/assembly/menue' consists of parts which themselves can be assemblies - it's like a tree. One of the basic questions is about the maximum possible depth of the 'tree'.
There are different ways to handle a product/assembly/menue. Can one edit the parts list or not, i.e. remove or add parts to any sub-level??
As far as I understand your problem, you will have a file containing those once defined products/assemblies and an order file whereto the product tree of each product is to be copied. In between there should be an editing mask where the user calls / copies the desired product/s into and can/cannot edit the product tree data. Whenever the list is finsihed and checked for availability it would be saved in the order file and printed as an order or invoice. At any time, the order could be called up again on screen and re-edited again, re-print the order, save the changed order ...
For defining the products with indefinite tree-depths you can use a two-file system. This is very convenient but rather tricky to handle too. I have such a test project, it's in German but it shows how the tree-building with just two files works out. If you want it, I'll zip and send it to your e-mail address,
Regards,
Guenter
Posté le 22 juillet 2005 - 13:49
>I have such a test project, it's in German but it shows how the tree-building with just two files works out. If you want it, I'll zip and send it to ............<
Günter,
As I want to learn as much as I can from WinDev guru's like you, because I am just started (real a newbie when I take in account the WinDev knowledge of most of the forum members), I ask you to mail this also to me when you think I can learn about it (and that's for sure in my opinion).
I have the same 'problems' like Steve ( I am also coming from Magic) especially queries, SQL and to go back to the 'normal' way of thinking/developing, because in Magic you had to think/develop on a total different way.
I'll check my mailbox on regular times .
Günter, you are almost (!) indispensable, but at least priceless with all your magnificent info .

TIA, Teun.
Posté le 22 juillet 2005 - 13:56
For defining the products with indefinite tree-depths you can use a two-file system. This is very convenient but rather tricky to handle too. I have such a test project, it's in German but it shows how the tree-building with just two files works out. If you want it, I'll zip and send it to your e-mail address,
Regards,
Guenter

Hi Günter,
Although a two file solution works, indefinite three depths are usually designed and managed through a single table solution where the table is linked to itself. This is called 'a reflexive link'. It's pretty tricky to maintain using SQL because of the indefinite roll up and drill down capabilities, but it can easily be solved by the use of a pattern.
A few years ago, I have created such a class managing this. You can download an example application including the source code from my website under the tips and tricks section. It also manages drag and drop (and copy/paste when the control key is pressed during drag and drop) in the treeview while the underlying datafile is immediately maintained.
Regards,
Peter


PeHoBe Online
Posté le 22 juillet 2005 - 14:41
For defining the products with indefinite tree-depths you can use a two-file system. This is very convenient but rather tricky to handle too. I have such a test project, it's in German but it shows how the tree-building with just two files works out. If you want it, I'll zip and send it to your e-mail address,
Regards,
Guenter
Hi Günter,

Although a two file solution works, indefinite three depths are usually designed and managed through a single table solution where the table is linked to itself. This is called 'a reflexive link'. It's pretty tricky to maintain using SQL because of the indefinite roll up and drill down capabilities, but it can easily be solved by the use of a pattern.

Hi Peter,
you're right with the one-file-solution. However, this works only without additional information. Info like

1 dish of soup
1 dish
1 spoon
0.25 liter of noodle soup
100 Gramm noodles
50 Gramm vegetables
100 ccm beef soup

would have to carry the quantity-info somewhere. This is where the two-file solution comes in. However, it's reflexive too and the basic concept stays the same


Kind regards,
Guenter

A few years ago, I have created such a class managing this. You can download an example application including the source code from my website under the tips and tricks section. It also manages drag and drop (and copy/paste when the control key is pressed during drag and drop) in the treeview while the underlying datafile is immediately maintained.
Regards,
Peter
Posté le 03 novembre 2005 - 08:53
Hi Guenter,

Your two file system sounds great, would be possible for you to email me a copy.

regards
Mark