12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using HNWD.Pregrant.Common;
- using HNWD.Pregrant.WebService;
- using HNWD.Pregrant.Model;
- namespace HNWD.DoctorHost.WebService.WDYS_I
- {
- public partial class callingMainDoctor_init : PageBase
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- string userDEVICE_ETH_MAC = this.GetValueByKey("deviceMAC");
- if (string.IsNullOrEmpty(userDEVICE_ETH_MAC))
- {
- this.ResponseDefaultError("传入参数无效或错误:{[1]-----[deviceMAC]-----设备MAC地址}");
- return;
- }
- ////////////////////////////////////////
- ////////////////////////////////////////
- if (!this.InitializeDataAccess())
- {
- this.ResponseDefaultError(PromptingMessage.Error_Data_Initialized);
- return;
- }
- WD_DeviceInfo wd_Device = this.wd_DeviceInfoDataAccess.ext.messageDataList.Find(f => f.DEVICE_ETH_MAC == userDEVICE_ETH_MAC);
- if (wd_Device == null)
- {
- this.ResponseDefaultError(PromptingMessage.Error_MAC);
- return;
- }
-
- wd_Device.Rows = 1;
- wd_Device.deviceSipHostingID = wd_Device.deviceHostingID;
- if (this.wd_PartInfoDataAccess.ext.messageDataList.Count > 0)
- {
- wd_Device.hospital = this.wd_PartInfoDataAccess.ext.messageDataList[0].hospital;
- wd_Device.department = this.wd_PartInfoDataAccess.ext.messageDataList[0].departments;
- }
- Support_WD_DeviceInfo su_device = new Support_WD_DeviceInfo();
- su_device.id = wd_Device.ID;
- su_device.deviceName = wd_Device.deviceName;
- su_device.deviceStatus = wd_Device.deviceStatus;
- su_device.deviceSipIp = wd_Device.deviceSipIp;
- su_device.deviceSipId = wd_Device.deviceSipId;
- su_device.deviceSipPassWord = wd_Device.deviceSipPassWord;
- su_device.deviceSipStatus = wd_Device.deviceSipStatus;
- su_device.deviceHostingID = wd_Device.deviceSipHostingID;
- su_device.deviceCallTimeOut = wd_Device.deviceCallTimeOut;
- su_device.hospital = wd_Device.hospital;
- su_device.department = wd_Device.department;
- su_device.bSuccess = wd_Device.bSuccess;
- su_device.Message = wd_Device.Message;
- su_device.Rows = wd_Device.Rows;
- Response.Write(JsonHelper.SerializeWithSuffix(su_device));
- WD_SysLogInfo wd_SysLogInfo = new WD_SysLogInfo();
- wd_SysLogInfo.LOG_TYPE = "2";
- wd_SysLogInfo.LOG_SOURCE = "设备MAC地址【" + userDEVICE_ETH_MAC + "】";
- wd_SysLogInfo.LOG_CONTENT = "请求【设备配置】数据!";
- this.DataBaseLog(wd_SysLogInfo);
- ///////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
- }
- }
- }
|