CrabtreeOn,印度客户定制APP,迁移2.0平台版本
陈嘉乐
2021-03-03 761fc6621ed9d54b520dcf0f0ce6158e050e2214
Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using Shared.SimpleControl.Phone.Music;
namespace Shared.SimpleControl.Phone
@@ -666,9 +667,9 @@
                        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;
@@ -698,8 +699,17 @@
                            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 ();