Sneha K

Sneha K

  • 1.2k
  • 527
  • 196k

How to retrieve and show data from Multiple table in index?

Apr 15 2016 6:22 AM
Hi I want to retrieve and show the data from multiple table in MVC4. i will explain my issue with one example.
 
 
 
 
 
In this view i have max 22 fields

When i enter all the details and click the save button it will save the details in that appropriate tables.

Now i want i show the details in Index page.

My Table

Customer

CustomerID uniqueidentifier primary key not null,

DisplayName Varchar(100) null,

PrintName Varchar(100) null,

CustomerTypeID uniqueidentifier null,

Employee

EmployeeID uniqueidentifier primary key not null,

DisplayName varchar(100) null,

VisitorsForm (Main Table)

VisitingID uniqueidntifier primary key not null,

CustomerID uniqueidentifier null,

EmployeeID uniqueidentifier null,

PovisitID uniqueidentifier null,

DepartmentID uniqueidentifier null,

DesignationID uniqueidentifier null,

NextActivityID uniqueidentifier null,

Nextappointment DateTime null,

Description varchar(max)null

Department

DepartmentID uniqueidentifier primary key not null,

DisplayName varchar(100) null,

PrintName varchar(100), null

Designation

DesignationID uniqueidentifier primary key not null,

Designation varchar(100) null,

Designation varchar(100), null

POVisit

POVisitID uniqueidentifier primary key not null,

POVisit varchar(100) null,

Next appointment

NextAppointmentID uniqueidentifier primary key not null,

NextAppointment varchar(100) null,

Now i want to create a index page same as like which is mentioned in the below image

                         

Now Povisit, NextAppointment, Department, designation, CustomerName , Employee name are dropdowns. Suppose i wrote inner join query to show the details means when one dropdown field value is null means i wont show that record. Now any one give idea how to retrieve and show the data in index page using MVC4? I tried my level best to explain my issue. please any one give me solution.

Advance thanks...

 
 

Answers (4)