| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Newtonsoft.Json.Linq; |
| | | using Shared.SimpleControl.Phone.Music; |
| | | |
| | | namespace Shared.SimpleControl.Phone |
| | |
| | | timerTemp.whichDay.Add (5); |
| | | } |
| | | } |
| | | if (string.IsNullOrEmpty (timerTemp.id)) { |
| | | timerTemp.id = Guid.NewGuid ().ToString (); |
| | | } |
| | | //if (string.IsNullOrEmpty (timerTemp.id)) { |
| | | // timerTemp.id = Guid.NewGuid ().ToString (); |
| | | //} |
| | | |
| | | DeviceDate deviceDate = new DeviceDate (); |
| | | deviceDate.gatewayId = SmartHome.Send.GatewayId; |
| | |
| | | if (revertObj == null) { |
| | | new Alert ("", "Unable to save data, please check the network.", "Close").Show (); |
| | | } else if (revertObj.Code == StateCode.SUCCESS) { |
| | | string id = ""; |
| | | if (!isEdit) { |
| | | var jObject = JObject.Parse (revertObj.Data.ToString ()); |
| | | id = jObject ["id"].ToString (); |
| | | timerTemp.id = id; |
| | | } |
| | | this.RemoveFromParent (); |
| | | action (timerTemp); |
| | | |
| | | |
| | | |
| | | } else { |
| | | //提示错误 |
| | | SmartHome.Method method = new SmartHome.Method (); |