- 实现数据回填方法:也就是把从数据库获取的数据回填到界面端显示。
- 经典代码如下:
public ActionResult SelectByInHospitalNumber(string InHospitalNumber)//根据住院编号查询信息
{
List<AdvanceVo> listAdvance = new List<AdvanceVo>();
AdvanceVo advance = new AdvanceVo();
string str = "";
listAdvance = (from tbInHospitalRegister in myModels.PW_InHospitalRegister
join tbRegistrationBill in myModels.PW_RegistrationBill on tbInHospitalRegister.RegistrationBillID equals tbRegistrationBill.RegistrationBillID
join tbPatientMessage in myModels.PW_PatientMessage on tbRegistrationBill.PatientMessageID equals tbPatientMessage.PatientMessageID
join tbDepartment in myModels.SYS_Department on tbRegistrationBill.DepartmentID equals tbDepartment.DepartmentID
join