12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using HNWD.Pregrant.Model;
- using HNWD.Pregrant.Common;
- using System.Text;
- using HNWD.Pregrant.DataAccess;
- using HNWD.Pregrant.WebService;
- namespace HNWD.Pregrant.WebService.WDHS_I
- {
- /// <summary>
- /// 初始化界面
- /// </summary>
- public partial class callingMainNurse_init : PageBase
- {
- /// <summary>
- /// 测试用例
- /// deviceMAC=3C:01:01:01:01:57
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected void Page_Load(object sender, EventArgs e)
- {
- string userDEVICE_ETH_MAC = this.GetValueByKey("deviceMAC");
- if(string.IsNullOrEmpty(userDEVICE_ETH_MAC))
- {
- this.ResponseDefaultError();
- return;
- }
- if (!this.InitializeDataAccess())
- {
- this.ResponseDefaultError(PromptingMessage.Error_Data_Initialized);
- return;
- }
- if (this.wd_PartInfoDataAccess.ext.messageDataList.Count < 0)
- {
- this.ResponseDefaultError(PromptingMessage.Error_PartInfo);
- return;
- }
-
-
-
- WD_DeviceInfo wd_DeviceInfo = wd_DeviceInfoDataAccess.ext.messageDataList.Find(f => f.DEVICE_ETH_MAC == userDEVICE_ETH_MAC);
- if(wd_DeviceInfo == null)
- {
- this.ResponseDefaultError(PromptingMessage.Error_DeviceInfo);
- return;
- }
-
- wd_DeviceInfo.id = wd_DeviceInfo.ID;
- wd_DeviceInfo.deviceName = wd_DeviceInfo.DEVICE_NAME;
- wd_DeviceInfo.deviceStatus = wd_DeviceInfo.DEVICE_STATUS;
- wd_DeviceInfo.deviceSipIp = wd_DeviceInfo.DEVICE_SIP_IP;
- wd_DeviceInfo.deviceSipId = wd_DeviceInfo.DEVICE_SIP_ID;
- wd_DeviceInfo.deviceSipPassWord = wd_DeviceInfo.DEVICE_SIP_PASSWORD;
- //wd_DeviceInfo.deviceHostingID = wd_DeviceInfo.DEVICE_SIP_HOSTING_ID;
- wd_DeviceInfo.deviceCallTimeOut = wd_PartInfoDataAccess.ext.messageDataList[0].PART_SIP_OVERTIME;
- wd_DeviceInfo.deviceNurse_Level0 = wd_PartInfoDataAccess.ext.messageDataList[0].PART_NURSE_LEVEL0;
- wd_DeviceInfo.deviceNurse_Level1 = wd_PartInfoDataAccess.ext.messageDataList[0].PART_NURSE_LEVEL1;
- wd_DeviceInfo.deviceNurse_Level2 = wd_PartInfoDataAccess.ext.messageDataList[0].PART_NURSE_LEVEL2;
- wd_DeviceInfo.deviceNurse_Level3 = wd_PartInfoDataAccess.ext.messageDataList[0].PART_NURSE_LEVEL3;
- wd_DeviceInfo.deviceNurse_Level4 = wd_PartInfoDataAccess.ext.messageDataList[0].PART_NURSE_LEVEL4;
- wd_DeviceInfo.hospital = wd_PartInfoDataAccess.ext.messageDataList[0].PART_HOSPITALNAME;
- wd_DeviceInfo.department = wd_PartInfoDataAccess.ext.messageDataList[0].PART_NAME;
- Response.Write(JsonHelper.SerializeWithSuffix(wd_DeviceInfo));
- ////////////////////////////////////////////////////////////////////
- SIPAccountService sipService = new SIPAccountService(userDEVICE_ETH_MAC, this.MapPath(HttpContext.Current.Request.ApplicationPath.ToString()));
- sipService.RegisterByuserDEVICE_ETH_MAC();
- ////////////////////////////////////////////////////////////////////
- WD_SysLogInfo wd_SysLogInfo = new WD_SysLogInfo();
- wd_SysLogInfo.LOG_TYPE = "3";
- wd_SysLogInfo.LOG_SOURCE ="主机";
- wd_SysLogInfo.LOG_CONTENT = "下载了【ID】为" + wd_DeviceInfo.ID + "的设备数据";
- this.DataBaseLog(wd_SysLogInfo);
- }
- }
- }
|