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 { /// /// 被托管主机列表信息获取 /// public partial class callingMainNurse_trust : PageBase { protected void Page_Load(object sender, EventArgs e) { string paHostId = this.GetValueByKey("paHostId"); string HostId = this.GetValueByKey("HostId"); string Action = this.GetValueByKey("Action"); if(string.IsNullOrEmpty(paHostId) || string.IsNullOrEmpty(HostId) || string.IsNullOrEmpty(Action)) { this.ResponseDefaultError(); return; } WD_DeviceInfoDataAccess wd_deviceInfo = WD_DeviceInfoDataAccess.GetInstance(); ///开始托管 if(Action == "0") { wd_deviceInfo.UpdateDEVICE_SIP_HOSTING_ID_Begin(HostId , paHostId); if(!wd_deviceInfo.bSuccess) { this.ResponseDefaultError(); return; } } else if(Action == "1") //取消托管 { wd_deviceInfo.UpdateDEVICE_SIP_HOSTING_ID_Stop(HostId , paHostId); if(!wd_deviceInfo.bSuccess) { this.ResponseDefaultError(); return; } } this.ResponseDefaultOk(); } } }