Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
hi.

i have a project that after executing returns query results as a dataset and i want to present that data with dasboard charts as a Html file. Since i'm running a windows form i want to add in the same solution a MVC project, but i don't know how to make them interact, sending the dataset to the MVC project so it can analyze it and construct the charts.

1º how can i add a project to the solution so they can communicate with each other

2º how to send the dataset so MVC can do his magic.

thk
Posted
Comments
Sergey Alexandrovich Kryukov 26-Nov-13 13:20pm    
Projects do not communicate. You don't send anything to a project. Projects simply do not exist during run time. Assemblies can use each other, processes can communication. The question is too vague to be answered. You need to explain what do you really need to achieve.
—SA
Lopezd 26-Nov-13 14:09pm    
i have a windows form that based on a selected server name, given login data presents a list of databases from that server. from that and a structure that i define to associate some database columns, i create queries to obtain those column data. know i want to present that data with dashboard charts and other graphical items, but i have to create another project that takes care of that part. based on that i need to send the queries results so i can read it and present it as a chart. that's why i want to know how to send objects (in my case i want to send a list<dataset> )

1 solution

Ideally, that "another project" should be of the class library type (by default, it produces an assembly with main executable module *.DLL), better be in the same solution. Then, you need to add it as a reference to your application project (or whatever assemblies using the library). This is done through the Solution Explorer, context menu "Add Reference…" on theh "References" node. Use the ".NET" tab of the "Add Reference" window, it will ensure that the assembly reference is added by the build even if you relocate any of the projects. It will automatically resolve dependencies and set up project dependencies in the solution.

When it's done, you can browse the referenced item. Practically, you will be able to use any types and their members of the referenced solution, if they are marked by public access modifier. The use of these declaration is exactly the same as they were in the same assembly.

Try to avoid having more than one process in the application product, unless it is absolutely necessary (for example, processes working on different computers, communicating via a network) — processes are well isolated. If you really need processes and communications between them, ask separate questions, but it does not look like you are ready to get there or have any immediate needs for that.

You really need to learn technology basics: assemblies and modules, applications and processes, structure of the projects and solutions and their roles, product life cycle.

—SA
 
Share this answer
 
Comments
Lopezd 26-Nov-13 16:59pm    
thk, i will do that
Sergey Alexandrovich Kryukov 26-Nov-13 18:06pm    
Great. Good luck, call again.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900