Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Saving flowchart details (everything) into databas (Read 3390 times)
mah
Guest


Saving flowchart details (everything) into databas
Sep 23rd, 2005 at 1:35am
Print Post  
let say currently i dunwan to save the files into .fns extension, and i dunwan to save it as binary, i wanan save every details into the database. then how i can do it?

currently i am creating the data modelling for the flowchart, where i will use the mindfusion component to let the user drag and create flowchart, after the user click on 'save' button, we will save the save inti temp.fns and then convert to binary and save into database.

At the same time, We also given those boxes a tag name and we save down their relationship on temp's array and then store into database (parentID,ChildID) to define their relationship. Let say if someone change the database value (either delete the record or insert more without using the mindfusion component, is it mindfusion able to recreate the flowchart from those relationship nodes??
  
Back to top
 
IP Logged
 
sovietmah
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 1
Joined: Aug 26th, 2005
Re: Saving flowchart details (everything) into dat
Reply #1 - Sep 23rd, 2005 at 1:38am
Print Post  
yeah, i register here as a user. my name is mah.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Saving flowchart details (everything) into dat
Reply #2 - Sep 23rd, 2005 at 4:59am
Print Post  
Hello Mah,

The FlowChart.NET control doesn't know anything about databases, so it can't recreate itself the diagram structure from your data.

If that data can change outside the diagram editor, you might have to store in a table what modifications were done (e.g. Insert, Delete, etc). When the editor runs the next time, perform all the modifications recorded in that table on the flowchart. The table might look like

[ActionsBatch]
ActionName (insert, delete, rename, etc)
ParentNodeId (needed for Insert)
ChildNodeId
etc...

Another possibility is to load the flowchart without showing it on the screen, and perform the actions both on your data and on the flowchart simultaneously.

Btw. you can skip the 'save to temp.fns' step by using SaveToString and store the resulting string in a TEXT or BLOB field, then load the diagram with LoadFromString.

HTH
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Saving flowchart details (everything) into dat
Reply #3 - Sep 23rd, 2005 at 5:03am
Print Post  
Of course if you are up to it, you can store all the diagram data in distinct fields of the database tables, e.g. nodes coordinates, colors, fonts, etc. You can save that data from the diagram by enumerating the Boxes, Arrows, etc collections and storing the items properties. When loading the diagram, for each item record in the database call CreateBox/CreateArrow and assign to the item's properties the values from the database.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint