123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- 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.WDFJ_I
- {
- /// <summary>
- /// 初始化界面
- /// </summary>
- public partial class callingBed_init : PageBase
- {
- /// <summary>
- /// 测试用例:
- /// deviceMAC=4C:01:01:01:02:26
- /// 4C:01:01:01:02:27
- ////////////4C:01:01:01:02:26
- ////////////4C:01:01:01:01:BC
- ////////////4C:01:01:01:01:C2
- ////////////4C:01:01:01:01:BE
- ////////////4C:01:01:01:01:C6
- ////////////4C:01:01:01:01:CA
- ////////////4C:01:01:01:01:CF
- ////////////4C:01:01:01:01:DD
- ////////////4C:01:01:01:01:C5
- ////////////4C:01:01:01:01:DC
- ////////////4C:01:01:01:01:D0
- ////////////4C:01:01:01:01:C9
- ////////////4C:01:01:01:01:C7
- ////////////4C:01:01:01:01:CC
- ////////////4C:01:01:01:01:D1
- ///
- ///
- ///
- /// </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 (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.deviceRoomNum = wd_deviceInfo.DEVICE_BED_NUM;
- //wd_deviceInfo.deviceBedName = wd_deviceInfo.DEVICE_BED_NAME;
- //wd_deviceInfo.deviceBedNum = wd_deviceInfo.DEVICE_BED_NUM;
- //'==================================================
- //'判断SIP服务器是否存在账号信息
- SIPAccountService sipService = new SIPAccountService(userDEVICE_ETH_MAC, this.MapPath(HttpContext.Current.Request.ApplicationPath.ToString()));
- sipService.RegisterByuserDEVICE_ETH_MAC();
- ////////////////////////////////
- /////////////////////////////////
- ////////////////////////////////
-
-
- wd_deviceInfo.deviceScreamSleep = wd_PartInfoDataAccess.ext.messageDataList[0].deviceScreamSleep;
- wd_deviceInfo.deviceCallTimeOut = wd_PartInfoDataAccess.ext.messageDataList[0].deviceCallTimeOut;
- Response.Write(JsonHelper.SerializeWithSuffix(wd_deviceInfo));
-
- //'==================================================
-
- WD_SysLogInfo wd_SysLogInfo = new WD_SysLogInfo();
- wd_SysLogInfo.LOG_TYPE = "3";
- wd_SysLogInfo.LOG_SOURCE = "设备MAC地址【" + userDEVICE_ETH_MAC + "】";
- wd_SysLogInfo.LOG_CONTENT = "请求【设备配置】数据!";
- this.DataBaseLog(wd_SysLogInfo);
- }
- }
- }
|