From 271faaf6664166dc368639b9f2e577f63f901be5 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期三, 23 十二月 2020 22:23:57 +0800 Subject: [PATCH] 20201223-99 --- HDL_ON/Entity/Function/Function.cs | 115 ++++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 88 insertions(+), 27 deletions(-) diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index 68d53ae..26c6ff3 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -322,37 +322,98 @@ /// </summary> public void SaveFunctionFile() { - + var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this)); + FileUtlis.Files.WriteFileByBytes(savePath, ssd); } - + /// <summary> + /// 淇濆瓨鎴块棿缁戝畾淇℃伅 + /// </summary> + public void UpdataRoomIds() + { + new System.Threading.Thread(() => + { + var pack = ApiUtlis.Ins.HttpRequest.UpdataDevcieBindRoomInfo(this); + //鐩存帴淇濆瓨鏈湴锛� + SaveFunctionFile(); + if (pack.Code == StateCode.SUCCESS) + { + } + else + { + IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); + } + }) + { IsBackground = true }.Start(); + } + /// <summary> + /// 鏇存柊鍔熻兘淇℃伅 + /// </summary> + public void UpdataFuncitonInfo() + { + new System.Threading.Thread(() => + { + var pm = new HttpServerRequest(); + var pack = pm.UpdataDevcieInfo(this); + SaveFunctionFile(); + if (pack.Code == StateCode.SUCCESS) + { + } + else + { + IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); + } + }) + { IsBackground = true }.Start(); + } + /// <summary> + /// 鏇存柊鍔熻兘鍚嶇О + /// </summary> + public void UpdataFunctionName() + { + new System.Threading.Thread(() => + { + var pm = new HttpServerRequest(); + var pack = pm.UpdataDevcieInfo(this); + SaveFunctionFile(); + if (pack.Code == StateCode.SUCCESS) + { + } + else + { + IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); + } + }) + { IsBackground = true }.Start(); + } /// <summary> /// 淇濆瓨鍔熻兘鏁版嵁 /// </summary> - public void SaveFunctionData(bool upSevser) - { - if (upSevser) - { - new System.Threading.Thread(() => - { - var pm = new HttpServerRequest(); - var pack = pm.UpdataDevcieInfo(this); - if (pack.Code == StateCode.SUCCESS) - { - var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this)); - FileUtlis.Files.WriteFileByBytes(savePath, ssd); - } - else - { - IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); - } - }); - } - else - { - var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this)); - FileUtlis.Files.WriteFileByBytes(savePath, ssd); - } - } + //public void SaveFunctionData(bool upSevser) + //{ + // if (upSevser) + // { + // new System.Threading.Thread(() => + // { + // var pm = new HttpServerRequest(); + // var pack = pm.UpdataDevcieInfo(this); + // if (pack.Code == StateCode.SUCCESS) + // { + // var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this)); + // FileUtlis.Files.WriteFileByBytes(savePath, ssd); + // } + // else + // { + // IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); + // } + // }) + // { IsBackground = true }.Start(); + // } + // else + // { + // var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this)); + // FileUtlis.Files.WriteFileByBytes(savePath, ssd); + // } + //} /// <summary> -- Gitblit v1.8.0