コード例 #1
0
        public ActionResult RemoveRelationship(RemoveRelationshipModel model)
        {
            var devModel = this._iShakeAroundService.GetDeviceById(model.id);
            DeviceApply_Data_Device_Identifiers identifiers = new DeviceApply_Data_Device_Identifiers();

            identifiers.device_id = long.Parse(devModel.device_id);
            identifiers.major     = long.Parse(devModel.major);
            identifiers.uuid      = devModel.uuid;
            identifiers.minor     = long.Parse(devModel.minor);
            bool result = this._iShakeAroundService.SetRelationship(identifiers, new long[] { model.pageid }, Senparc.Weixin.MP.ShakeAroundBindType.解除关联关系);

            return(Json(new
            {
                success = result
            }));
        }
コード例 #2
0
        public ActionResult RemoveRelationship(RemoveRelationshipModel model)
        {
            DeviceModel deviceById = _saService.GetDeviceById(model.id);
            DeviceApply_Data_Device_Identifiers deviceApplyDataDeviceIdentifier = new DeviceApply_Data_Device_Identifiers()
            {
                device_id = long.Parse(deviceById.device_id),
                major     = long.Parse(deviceById.major),
                uuid      = deviceById.uuid,
                minor     = long.Parse(deviceById.minor)
            };
            IShakeAroundService shakeAroundService = _saService;

            long[] numArray = new long[] { model.pageid };
            bool   flag     = shakeAroundService.SetRelationship(deviceApplyDataDeviceIdentifier, numArray, ShakeAroundBindType.解除关联关系);

            return(Json(new { success = flag }));
        }