@ Html.ActionLink("Details","Details",new {id = item.PatientsId})
因此,我可以选择要编辑或查看详细信息的记录.
适用于一个模型
first question where can I find a excellent book on MVC, LINQ, Entity Framework. Not a beginners book. I have to join 12 tables on to on view page. I am having problems.
Here is what I have accomplished.Created a MVC form that allows input of customer data this works everything saves. I have created a query with LINQ to display all save data into a table grid. The two problems I am having is on the table grid view I have the @Html.ActionLink("Details", "Details", new { id = item.PatientsId })
So I can choose what record to edit or view the details.
This works for one model
var patients = ((from p in _db.Patients
select new PatientsModel()
{
PatientsId = p.PatientsId,
ClientID = p.ClientID,
DOB = p.DOB,
Gender = p.Gender,
Handedness = p.Handedness,
RecordingDate = p.RecordingDate,
TimeRecording = p.TimeRecording,
EO = p.EO,
EC = p.EC,
Task = p.Task,
Referred_for = p.Referred_for,
Evaluation_Number = p.Evaluation_Number,
Years_of_Education = p.Years_of_Education.Value,
Marital_Status = p.Marital_Status,
Abnormality = p.Abnormality,
Vision = p.Vision,
Appearance = p.Appearance,
Sleep_Disorder = p.Sleep_Disorder,
Accident = p.Accident,
Employed = p.Employed,
Veteran = p.Veteran,
Activities = p.Activities,
FileUrl = p.FilesUrl,
}).SingleOrDefault(i => i.PatientsId == id));
return View(patients);
代表一张桌子.我还有11个需要填写表格的其余部分.
任何帮助将不胜感激.
其他11个表或模型是(MedicalBackgroundModel,PsycologicModel,CurrentMoodModel,DietInformationModel,BehaviorModel,MedicationModel,SupplementsInformationModel,EvaluationModel,NeurofeedbackModel,OtherDataModel,NarrativeModel)
谢谢, |
which represents one table. I have 11 more that need to populate rest of the form.
Any help will be appreciated.
The other 11 tables or models are(MedicalBackgroundModel,PsycologicalModel, CurrentMoodModel, DietInformationModel, BehaviorModel, MedicationModel, SupplementsInformationModel, AssessmentModel, NeurofeedbackModel, OtherDataModel, NarrativeModel )
Thanks,
|