We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

integration of diagram application into a portal

Hello,

I’m searching for help to realize following scenario: After a user is logged in, the portal knows from which country the user is. In a dabase the information about a pocess is stored, which is typically for this certain country.
The next step is to read this information out of the database and display the process as a UML-diagram. The portal will be realized in ASP.NET

Is there an possiblity to realize the scenario with Essential Diagram? What is therefor to do? In what way the information about the diagram is sored?

Thanks a lot for the information
Alex

3 Replies

RR Ramya R Syncfusion Team January 24, 2007 07:50 PM UTC

Hi,

Please refer the below sample. In this sample, datas are collected from the database and symbols are created accordingly. And then links are established between the symbols and the symbols are arranged using the DirectedTreeLayoutManager.

The data is collected from the database as shown in the code snippet below,

[C#]
private void LoadData(string tablename)
{

string datasrcpath = Server.MapPath(String.Empty);
datasrcpath = datasrcpath + @"\App_Data\Country.mdb";

// Connection string for the Org.mdb Access database
string connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + datasrcpath + ";";
OleDbConnection orgdbconnection = new OleDbConnection(connectionstring);
// Query to select all records from the Org.mbd database
string orgdbselectquery = "SELECT * FROM " + tablename;
//CreateMajorSymbols(tablename);
OleDbCommand orgdbcommand = new OleDbCommand(orgdbselectquery, orgdbconnection);
// Create a connection to the datasource
orgdbconnection.Open();
// Execute the query command to build the data reader
OleDbDataReader orgdbreader = orgdbcommand.ExecuteReader();

// Extract employee data from the reader
while (orgdbreader.Read())
{
object[] data=new object[3];
int count=orgdbreader.GetValues(data);
string[] st = new string[10];
string[] str = new string[10];
for (int i = 0; i < count; i++)
{
st[i] = data[i].ToString();
str[i] = orgdbreader.GetName(i);
}
if (tablename == "Country")
{
CreateCountryMajorSymbol(st,tablename,str);
}

} // Close the reader
orgdbreader.Close();
// Close the connection
orgdbcommand.Connection.Close();
}


Sample:
https://www.syncfusion.com/Support/user/uploads/UMLDiagram_b652b219.zip

Please try this and let us know if this helps.

Thank you for your interest in Essential Diagram.

Regards,
Ramya


CU cuongnq July 28, 2007 02:01 AM UTC

Hi,
How to do this with Version=5.102.0.51.


MW Melba Winshia Syncfusion Team July 31, 2007 02:31 PM UTC

Hi,

Please refer the modified sample in below link which was created in 5.102.0.51.

https://websamples.syncfusion.com/samples/Diagram.Web/5.1.1.0/54725/main.htm

Major Changes in the Sample:

1) LineConnector is used instead of LinkCmd.
2) Diagram.Model.AppendChild() method is used instead of InsertNodesCmd.

Please refer the below migration document for more details regarding changes in 5.1

https://www.syncfusion.com/Support/user/uploads/Migration_f99181b5.doc

Please let me know if you have any other questions.

Thanks,
Melba

Loader.
Live Chat Icon For mobile
Up arrow icon