using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using HNWD.Pregrant.WebService; using HNWD.Pregrant.Model; using System.Text; using HNWD.Pregrant.DataAccess; using HNWD.Pregrant.Common; using HNWD.Pregrant.BusinessLogic; namespace HNWD.Pregrant.WebService.MgrCSharp { public partial class GetWD_BedDataArray : PageBase { protected void Page_Load(object sender, EventArgs e) { if(!this.InitializeNativeDataAccess()) { this.ResponseDefaultError(PromptingMessage.Error_Data_Initialized); return; } List lst_wd_DeviceInfo = this.wd_DeviceInfoDataAccess.ext.messageDataList.FindAll(f=>f.DEVICE_TYPE == "4").OrderBy(f=>f.DEVICE_ROOM_NUM).ToList(); if(lst_wd_DeviceInfo == null || lst_wd_DeviceInfo.Count == 0) { this.ResponseDefaultError(PromptingMessage.Error_DeviceInfo); return; } WD_DeviceInfoExt wd_DeviceInfoExt = new WD_DeviceInfoExt(); foreach( WD_DeviceInfo wd_device in lst_wd_DeviceInfo) { WD_PatientInfo wd_PatientInfo = this.wd_PatientInfoDataAccess.ext.messageDataList.Find(f=>f.ID == wd_device.DEVICE_HUMAN_ID); if(wd_PatientInfo == null) { } else { wd_device.PATIENT_NAME = wd_PatientInfo.PATIENT_NAME; wd_device.PATIENT_SEX = wd_PatientInfo.PATIENT_SEX; wd_device.PATIENT_AGE = wd_PatientInfo.PATIENT_AGE; wd_device.PATIENT_AGE_UNIT = wd_PatientInfo.PATIENT_AGE_UNIT; wd_device.PATIENT_INDATE = wd_PatientInfo.PATIENT_INDATE; } wd_DeviceInfoExt.BedInfoArray.Add(wd_device); wd_DeviceInfoExt.messageDataList.Add(wd_device); } this.Response.Write(JsonHelper.SerializeWithSuffix(wd_DeviceInfoExt)); } } }