1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- 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;
- namespace HNWD.Pregrant.WebService.WDMK_I
- {
- /// <summary>
- /// 初始化界面
- /// </summary>
- public partial class callingDoor_init : PageBase
- {
- /// <summary>
- /// 测试用例列表:
- /// 3C:01:01:01:01:03
- /// 3C:01:01:01:01:4E
- /// 3C:01:01:01:01:3F
- /// 3C:01:01:01:01:43
- /// </summary>
-
- 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;
- }
- 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;
- }
- if (this.wd_PartInfoDataAccess.ext.messageDataList.Count > 0)
- {
- wd_Device.deviceCallTimeOut = this.wd_PartInfoDataAccess.ext.messageDataList[0].deviceCallTimeOut;
- }
- wd_Device.roomByname = wd_Device.DEVICE_NAME;
- ///////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
- SIPAccountService sipService = new SIPAccountService(userDEVICE_ETH_MAC, this.MapPath(HttpContext.Current.Request.ApplicationPath.ToString()));
- sipService.RegisterByuserDEVICE_ETH_MAC();
- ///////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
- Response.Write(JsonHelper.SerializeWithSuffix(wd_Device));
- 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);
- ///////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
- }
- }
- }
|