From 6eab8119ad328f730d88da2303435f40986504ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=82=E6=84=8F=20=E5=BD=AD?= <2417589739@qq.com> Date: Wed, 23 Mar 2022 22:17:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=AE=AF=E9=85=8D=E7=BD=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HBLConsole.Communication/ConnectHelper.cs | 64 ++++---- HBLConsole.MORKD/GVL_MORKD.cs | 1 + HBLConsole.MainConsole/Main.cs | 14 +- .../CommunicationPar/CommunicationPar.cs | 3 +- .../CommunicationPar/CommunicationSet.cs | 12 -- .../KeepParameter/KeepDataBase.cs | 13 -- HBLConsole.Model/SetPar.cs | 16 -- HBLConsole.Service/ExpandMethod.cs | 36 ++++- HBLConsole.Service/Json.cs | 2 + HBLConsole.Service/LocaPath.cs | 7 + .../View/DeviceManagermentSetView.xaml.cs | 36 +---- .../DeviceManagermentSetViewModel.cs | 47 ++++-- HBLConsole/View/DeviceManageView.xaml | 10 +- HBLConsole/ViewModel/DeviceManageViewModel.cs | 143 +++--------------- HBLConsole/ViewModel/ViewModelBase.cs | 20 +-- 15 files changed, 151 insertions(+), 273 deletions(-) delete mode 100644 HBLConsole.Model/SetPar.cs diff --git a/HBLConsole.Communication/ConnectHelper.cs b/HBLConsole.Communication/ConnectHelper.cs index fc61c35..c547c74 100644 --- a/HBLConsole.Communication/ConnectHelper.cs +++ b/HBLConsole.Communication/ConnectHelper.cs @@ -20,41 +20,41 @@ namespace HBLConsole.Communication Json.Read(); foreach (var item in Json.Data.communicationSets) { - if (item.ClientDeviceType == GVL.GeneralConfig.DeviceType.ToString()) + //if (item.ClientDeviceType == GVL.GeneralConfig.DeviceType.ToString()) + //{ + if (item.IsActive) { - if (item.IsActive) + switch (item.deviceType) { - switch (item.deviceType) - { - case EDeviceType.Siemens: - break; - case EDeviceType.ModbusRtu: - if (item.Device is ModbusRtu rtu) - { - //咖啡机主控程序 - //private CoffeeMachine coffeeMachine; - ////冰淇淋主控程序 - //private IceCreamMachine iceCreamMachine; - } - break; - case EDeviceType.ModbusTcp: - if (item.Device is ModbusTcp modbus) - { - ModbusTcpHelper.GetInstance.ModbusTcpConnect(modbus.IP, modbus.PortNum); - } - break; - case EDeviceType.SerialPort: - break; - case EDeviceType.Lebai: - if (item.Device is ModbusTcp tcp) - { - LebaiHelper.GetInstance.Connect(tcp.IP); - } - break; - default: - break; - } + case EDeviceType.Siemens: + break; + case EDeviceType.ModbusRtu: + if (item.Device is ModbusRtu rtu) + { + //咖啡机主控程序 + //private CoffeeMachine coffeeMachine; + ////冰淇淋主控程序 + //private IceCreamMachine iceCreamMachine; + } + break; + case EDeviceType.ModbusTcp: + if (item.Device is ModbusTcp modbus) + { + ModbusTcpHelper.GetInstance.ModbusTcpConnect(modbus.IP, modbus.PortNum); + } + break; + case EDeviceType.SerialPort: + break; + case EDeviceType.Lebai: + if (item.Device is ModbusTcp tcp) + { + LebaiHelper.GetInstance.Connect(tcp.IP); + } + break; + default: + break; } + //} } } ActionOperate.GetInstance.Send($"{GVL.GeneralConfig.DeviceType.ToString()}/ConnectOk"); diff --git a/HBLConsole.MORKD/GVL_MORKD.cs b/HBLConsole.MORKD/GVL_MORKD.cs index 723d6de..3a74533 100644 --- a/HBLConsole.MORKD/GVL_MORKD.cs +++ b/HBLConsole.MORKD/GVL_MORKD.cs @@ -115,6 +115,7 @@ namespace HBLConsole.MORKD public void PutNoodleTakeMealCompleteReset() { ModbusTcpHelper.GetInstance.Write(1148, WriteType.Coils, false); + OutNoodleing = false; } /// diff --git a/HBLConsole.MainConsole/Main.cs b/HBLConsole.MainConsole/Main.cs index 91c3c22..acdfc89 100644 --- a/HBLConsole.MainConsole/Main.cs +++ b/HBLConsole.MainConsole/Main.cs @@ -19,10 +19,7 @@ namespace HBLConsole.MainConsole private volatile static Main _Instance; public static Main GetInstance => _Instance ?? (_Instance = new Main()); - private Main() - { - //ActionOperate.GetInstance.Register(new Func(() => { return GeneralConfig.DeviceType.ToString(); }), "GetDeviceType"); - } + private Main() { } List Topics = new List(); @@ -32,15 +29,7 @@ namespace HBLConsole.MainConsole GeneralConfig.DeviceType = DeviceClientType.MORKS; if (Enum.TryParse(deviceType, out DeviceClientType dct)) GeneralConfig.DeviceType = dct; LocaPath.GetInstance.FilePath = $"AccessFile\\{GeneralConfig.DeviceType.ToString()}\\"; - - ThreadOperate.GetInstance.Start(new Action(() => { Sqlite.GetInstance.GetData(); }), "GetAlarm"); - //Json.Read(); - //if (Enum.TryParse(Json.Data.ClientDeviceType, out DeviceClientType dct)) - //{ - // GeneralConfig.DeviceType = dct; - //} - //else { GeneralConfig.DeviceType = DeviceClientType.MORKS; } Json.Read(); Json.Read(); Json.Read(); @@ -53,7 +42,6 @@ namespace HBLConsole.MainConsole { Json.Save(); Json.Save(); - //Json.Save(); Json.Save(); Json.Save(); Sqlite.GetInstance.Save(); diff --git a/HBLConsole.Model/CommunicationPar/CommunicationPar.cs b/HBLConsole.Model/CommunicationPar/CommunicationPar.cs index b2663d8..851103d 100644 --- a/HBLConsole.Model/CommunicationPar/CommunicationPar.cs +++ b/HBLConsole.Model/CommunicationPar/CommunicationPar.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -11,6 +12,6 @@ namespace HBLConsole.Model /// public class CommunicationPar { - public List communicationSets = new List(); + public ObservableCollection communicationSets { get; set; } = new ObservableCollection(); } } diff --git a/HBLConsole.Model/CommunicationPar/CommunicationSet.cs b/HBLConsole.Model/CommunicationPar/CommunicationSet.cs index c6e0e43..68705eb 100644 --- a/HBLConsole.Model/CommunicationPar/CommunicationSet.cs +++ b/HBLConsole.Model/CommunicationPar/CommunicationSet.cs @@ -12,12 +12,6 @@ namespace HBLConsole.Model { public class CommunicationSet : ObservableObject { - public CommunicationSet() - { - RemoveCommand = new RelayCommand((o) => { if (RemoveAction != null) RemoveAction(o); }); - } - - public Action RemoveAction { get; set; } /// /// 使用特性对接口反序列化 @@ -44,11 +38,5 @@ namespace HBLConsole.Model public EDeviceType deviceType { get { return _mdeviceType; } set { _mdeviceType = value; OnPropertyChanged(); } } private EDeviceType _mdeviceType; - /// - /// 客户端启动设备类型 - /// - public string ClientDeviceType { get; set; } - - public RelayCommand RemoveCommand { get; set; } } } diff --git a/HBLConsole.Model/KeepParameter/KeepDataBase.cs b/HBLConsole.Model/KeepParameter/KeepDataBase.cs index de85bff..469b9f5 100644 --- a/HBLConsole.Model/KeepParameter/KeepDataBase.cs +++ b/HBLConsole.Model/KeepParameter/KeepDataBase.cs @@ -13,18 +13,6 @@ namespace HBLConsole.Model { public class KeepDataBase { - /// - /// 模拟订单数据的配置 - /// - //public ConcurrentDictionary> simOrderConfig { get; set; } = new ConcurrentDictionary>(); - - /// - /// 需要保存的订单数据 - /// - //public ConcurrentDictionary> orderLists { get; set; } = new ConcurrentDictionary>(); - //public static ObservableCollection orderStatusLists { get; set; } = new ObservableCollection(); - //public ObservableCollection simOrderConfig { get; set; } = new ObservableCollection(); - /// /// 模拟订单数据的配置 /// @@ -35,6 +23,5 @@ namespace HBLConsole.Model /// public ObservableCollection orderLists { get; set; } = new ObservableCollection(); - } } diff --git a/HBLConsole.Model/SetPar.cs b/HBLConsole.Model/SetPar.cs deleted file mode 100644 index 4b83627..0000000 --- a/HBLConsole.Model/SetPar.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HBLConsole.Model -{ - /// - /// 设置参数 - /// - public class SetPar - { - public string ClientDeviceType { get; set; } - } -} diff --git a/HBLConsole.Service/ExpandMethod.cs b/HBLConsole.Service/ExpandMethod.cs index 7a43832..0dbc4fb 100644 --- a/HBLConsole.Service/ExpandMethod.cs +++ b/HBLConsole.Service/ExpandMethod.cs @@ -1,5 +1,7 @@ -using System; +using Newtonsoft.Json; +using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -19,5 +21,37 @@ namespace HBLConsole.Service if (obj == null || value == null) return -1; return Array.FindIndex(obj, p => p == value && p.Length > 0); } + + /// + /// 保存数据 + /// + public static void Save(this T ot) + { + string outjson = JsonConvert.SerializeObject(ot); + var str = ot.GetType().GenericTypeArguments; + if (str != null && str.Length > 0) + { + File.WriteAllText(LocaPath.GetInstance.Getpath(str[0].Name), outjson); + } + + } + + /// + /// 获取保存的数据 + /// + public static void Read(this object ot) + { + var str = ot.GetType().GenericTypeArguments; + if (str != null && str.Length > 0) + { + string pa = LocaPath.GetInstance.Getpath(str[0].Name); + if (File.Exists(pa)) + { + string JsonString = File.ReadAllText(pa); + var result = JsonConvert.DeserializeObject(JsonString); + if (result != null) { Json.Data = result; } + } + } + } } } diff --git a/HBLConsole.Service/Json.cs b/HBLConsole.Service/Json.cs index 2ff8cc0..ddf8794 100644 --- a/HBLConsole.Service/Json.cs +++ b/HBLConsole.Service/Json.cs @@ -43,6 +43,8 @@ namespace HBLConsole.Service File.WriteAllText(path, outjson); } + + /// /// 获取保存的数据 /// diff --git a/HBLConsole.Service/LocaPath.cs b/HBLConsole.Service/LocaPath.cs index d371fce..2848e01 100644 --- a/HBLConsole.Service/LocaPath.cs +++ b/HBLConsole.Service/LocaPath.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -15,5 +16,11 @@ namespace HBLConsole.Service public string FilePath { get; set; } = string.Empty; + public string Getpath(string name) + { + Directory.CreateDirectory(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"{FilePath}\\JSON")); + return $"{AppDomain.CurrentDomain.BaseDirectory}{FilePath}JSON\\{name}.json"; + } + } } diff --git a/HBLConsole/DialogWindow/View/DeviceManagermentSetView.xaml.cs b/HBLConsole/DialogWindow/View/DeviceManagermentSetView.xaml.cs index 765fc9b..c738dbe 100644 --- a/HBLConsole/DialogWindow/View/DeviceManagermentSetView.xaml.cs +++ b/HBLConsole/DialogWindow/View/DeviceManagermentSetView.xaml.cs @@ -30,14 +30,14 @@ namespace HBLConsole.DialogWindow.View this.MoveBorder.MouseLeftButtonDown += (o, e) => { this.DragMove(); }; this.ButMin.Click += (o, e) => { this.WindowState = WindowState.Minimized; }; this.ButMax.Click += (o, e) => { this.WindowState = this.WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized; }; - this.ButClose.Click += (o, e) => { this.DialogResult = false; }; + this.ButClose.Click += (o, e) => { this.Close(); }; this.MaxWidth = SystemParameters.WorkArea.Width; this.MaxHeight = SystemParameters.WorkArea.Height; ActionOperate.GetInstance.Register(new Action((s) => { - this.Tag = s; - this.DialogResult = false; + //this.Tag = s; + //this.DialogResult = false; ActionOperate.GetInstance.CancelRegister("Cancel"); this.Close(); @@ -45,40 +45,16 @@ namespace HBLConsole.DialogWindow.View ActionOperate.GetInstance.Register(new Action((s) => { - this.Tag = s; - this.DialogResult = true; + //this.Tag = s; + //this.DialogResult = true; ActionOperate.GetInstance.CancelRegister("Confirm"); this.Close(); }), "Confirm"); - - //DelegationNotifi.GetInstance.Cancel = new Action((s) => - //{ - // this.Tag = s; - // this.DialogResult = false; - // DelegationNotifi.GetInstance.Cancel = null; - // this.Close(); - //}); - - //DelegationNotifi.GetInstance.Confirm = new Action((s) => - //{ - // this.Tag = s; - // this.DialogResult = true; - // DelegationNotifi.GetInstance.Cancel = null; - // this.Close(); - //}); - } - //private void ThisDialogResult(DeviceManagermentResult s, bool result) - //{ - // this.Tag = s; - // this.DialogResult = result; - // //DelegationNotifi.GetInstance.Cancel = null; - // ActionManagerment.GetInstance.LogOut("Cancel"); - // this.Close(); - //} + } } diff --git a/HBLConsole/DialogWindow/ViewModel/DeviceManagermentSetViewModel.cs b/HBLConsole/DialogWindow/ViewModel/DeviceManagermentSetViewModel.cs index 464c551..b498835 100644 --- a/HBLConsole/DialogWindow/ViewModel/DeviceManagermentSetViewModel.cs +++ b/HBLConsole/DialogWindow/ViewModel/DeviceManagermentSetViewModel.cs @@ -11,6 +11,9 @@ using Microsoft.Toolkit.Mvvm.Messaging; using System.Diagnostics; using HBLConsole.Model; using HBLConsole.Service; +using System.Reflection; +using HBLConsole.Interface; +using HBLConsole.ViewModel; namespace HBLConsole.DialogWindow.ViewModel { @@ -25,21 +28,47 @@ namespace HBLConsole.DialogWindow.ViewModel }); ConfirmCommand = new RelayCommand(() => { - var res = ActionOperate.GetInstance.SendResult("AddDeviceVerify", devcieManagerResult); - if (res != null) + var obj = DeviceManageViewModel.communicationSets.FirstOrDefault(P => P.DeviceName.ToUpper() == devcieManagerResult.DeviceName.ToUpper()); + if (obj == null) { - if (res is bool blen) + CommunicationSet communicationObj = new CommunicationSet(); + EDeviceType eDeviceType = (EDeviceType)Enum.Parse(typeof(EDeviceType), devcieManagerResult.DeviceType); + foreach (var item in Enum.GetNames(typeof(EDeviceTypeSort))) { - if (blen) + var res = DeviceTypeSort.GetInstance.DevceTypes[item].FirstOrDefault(p => p == devcieManagerResult.DeviceType); + if (res != null) { - ActionOperate.GetInstance.Send("Confirm", devcieManagerResult); - } - else - { - LogInfo = $"警告:设备【{devcieManagerResult.DeviceName}】已存在,请重试"; + string device = string.Empty; + switch ((EDeviceTypeSort)Enum.Parse(typeof(EDeviceTypeSort), item)) + { + case EDeviceTypeSort.Siemens: + device = EDeviceType.Siemens.ToString(); + break; + case EDeviceTypeSort.TCP: + device = EDeviceType.ModbusTcp.ToString(); + break; + case EDeviceTypeSort.Serial: + device = EDeviceType.ModbusRtu.ToString(); + break; + default: + break; + } + + string NameSpace = "HBLConsole.Model";//Load 加载的是dll的名称,GetType获取的是全命名空间下的类 + var type = Assembly.Load(NameSpace)?.GetType($"{NameSpace}.{device}"); + if (type != null) communicationObj.Device = Activator.CreateInstance(type) as IDeviceType; + communicationObj.DeviceName = $"{devcieManagerResult.DeviceName}【{eDeviceType}】"; + communicationObj.deviceType = eDeviceType; + DeviceManageViewModel.communicationSets.Add(communicationObj); + break; } } } + else + { + LogInfo = $"警告:设备【{devcieManagerResult.DeviceName}】已存在,请重试"; + } + ActionOperate.GetInstance.Send("Confirm", devcieManagerResult); }); } diff --git a/HBLConsole/View/DeviceManageView.xaml b/HBLConsole/View/DeviceManageView.xaml index c1b1927..6a8940d 100644 --- a/HBLConsole/View/DeviceManageView.xaml +++ b/HBLConsole/View/DeviceManageView.xaml @@ -112,7 +112,7 @@ - + { NewConnect(); }); - SaveDeviceData(); + RemoveCommand = new RelayCommand((o) => { RemoveDevice(o); }); - - ActionOperate.GetInstance.Register(new Func((p) => + SaveConnectSetCommand = new RelayCommand(() => { - if (p is DeviceManagermentResult dm) - { - return Json.Data.communicationSets.FirstOrDefault(s => s.DeviceName.ToUpper() == dm.DeviceName.ToUpper()) == null; - } - return false; - }), "AddDeviceVerify"); - ClientDeviceType = GVL.GeneralConfig.DeviceType.ToString(); - } - - static DeviceManageViewModel() - { - VisibleDeviceData(); - } - - private void SaveDeviceData() - { - ActionOperate.GetInstance.Register(new Action(() => - { - var rr = Json.Data.communicationSets.Where(p => p.ClientDeviceType != GVL.GeneralConfig.DeviceType.ToString()).ToList(); - if (rr != null) - { - Json.Data.communicationSets.Clear(); - rr.ForEach((o) => - { - Json.Data.communicationSets.Add(o); - }); - } - - foreach (var item in communicationSets) - { - item.RemoveAction = null; - Json.Data.communicationSets.Add(item); - } + TextHelper.GetInstance.WriteTextInfo(ClientDeviceType); + LocaPath.GetInstance.FilePath = $"AccessFile\\{ClientDeviceType}\\"; + Json.Data.communicationSets.Clear(); + foreach (var item in communicationSets) { Json.Data.communicationSets.Add(item); } Json.Save(); + LocaPath.GetInstance.FilePath = $"AccessFile\\{GVL.GeneralConfig.DeviceType.ToString()}\\"; + }); - }), "DataSave"); - - } - - private static void VisibleDeviceData() - { - if (communicationSets.Count <= 0) - { - Json.Read(); - foreach (var item in Json.Data.communicationSets) - { - if (item.ClientDeviceType == GVL.GeneralConfig.DeviceType.ToString()) - { - item.RemoveAction = RemoveDevice; - communicationSets.Add(item); - } - } - } - + ClientDeviceType = GVL.GeneralConfig.DeviceType.ToString(); } - public string ClientDeviceType { get { return _mClientDeviceType; } set { _mClientDeviceType = value; + LocaPath.GetInstance.FilePath = $"AccessFile\\{value}\\"; + communicationSets.Clear(); + Json.Read(); + foreach (var item in Json.Data.communicationSets) { communicationSets.Add(item); } + LocaPath.GetInstance.FilePath = $"AccessFile\\{GVL.GeneralConfig.DeviceType.ToString()}\\"; OnPropertyChanged(); - TextHelper.GetInstance.WriteTextInfo(value); - //Json.Data.ClientDeviceType = value; } } private string _mClientDeviceType = string.Empty; - public static ObservableCollection communicationSets { get; set; } = new ObservableCollection(); public ObservableCollection ClientDevices { get; set; } = new ObservableCollection(); @@ -113,80 +68,22 @@ namespace HBLConsole.ViewModel public RelayCommand SaveConnectSetCommand { get; set; } + public RelayCommand RemoveCommand { get; set; } + /// /// 创建新连接 /// private void NewConnect() { DeviceManagermentSetView deviceManagermentSetView = new DeviceManagermentSetView(); - var result = deviceManagermentSetView.ShowDialog(); - var ResultTag = deviceManagermentSetView.Tag as DeviceManagermentResult; - if (ResultTag != null && result != null) - { - if ((bool)result) - { - var obj = communicationSets.FirstOrDefault(p => p.DeviceName == ResultTag.DeviceName); - if (obj == null) - { - CommunicationSet communicationObj = new CommunicationSet(); - EDeviceType eDeviceType = (EDeviceType)Enum.Parse(typeof(EDeviceType), ResultTag.DeviceType); - foreach (var item in Enum.GetNames(typeof(EDeviceTypeSort))) - { - var res = DeviceTypeSort.GetInstance.DevceTypes[item].FirstOrDefault(p => p == ResultTag.DeviceType); - if (res != null) - { - string device = string.Empty; - switch ((EDeviceTypeSort)Enum.Parse(typeof(EDeviceTypeSort), item)) - { - case EDeviceTypeSort.Siemens: - device = EDeviceType.Siemens.ToString(); - break; - case EDeviceTypeSort.TCP: - device = EDeviceType.ModbusTcp.ToString(); - break; - case EDeviceTypeSort.Serial: - device = EDeviceType.ModbusRtu.ToString(); - break; - default: - break; - } - - string NameSpace = "HBLConsole.Model";//Load 加载的是dll的名称,GetType获取的是全命名空间下的类 - var type = Assembly.Load(NameSpace)?.GetType($"{NameSpace}.{device}"); - if (type != null) - { - communicationObj.Device = Activator.CreateInstance(type) as IDeviceType; - } - communicationObj.DeviceName = $"{ResultTag.DeviceName}【{eDeviceType}】"; - communicationObj.deviceType = eDeviceType; - communicationObj.RemoveAction = RemoveDevice; - communicationObj.ClientDeviceType = GVL.GeneralConfig.DeviceType.ToString(); - communicationSets.Add(communicationObj); - return; - } - } - - - //} - - } - } - } - deviceManagermentSetView = null; + deviceManagermentSetView.Show(); } - private static void RemoveDevice(object o) + private void RemoveDevice(object o) { + if (o == null) return; int index = Array.FindIndex(communicationSets.ToArray(), p => p.DeviceName == o.ToString()); - if (index >= 0 && index < communicationSets.Count) - { - communicationSets.RemoveAt(index); - } - //var result = communicationSets.FirstOrDefault(p => p.DeviceName == o.ToString()); - //if (result != null) - //{ - // communicationSets.Remove(result); - //} + if (index >= 0 && index < communicationSets.Count) communicationSets.RemoveAt(index); } diff --git a/HBLConsole/ViewModel/ViewModelBase.cs b/HBLConsole/ViewModel/ViewModelBase.cs index 8aa0cab..d2b9eb7 100644 --- a/HBLConsole/ViewModel/ViewModelBase.cs +++ b/HBLConsole/ViewModel/ViewModelBase.cs @@ -65,26 +65,10 @@ namespace HBLConsole.ViewModel /// /// 订单状态列表 /// - //public static ObservableCollection orderStatusLists { get; set; } = new ObservableCollection(); - public static ObservableCollection orderStatusLists { - get - { - //if (!Json.Data.orderLists.ContainsKey(GVL.GeneralConfig.DeviceType.ToString())) - //{ - // Json.Data.orderLists.TryAdd(GVL.GeneralConfig.DeviceType.ToString(), new ObservableCollection()); - //} - return Json.Data.orderLists; - } - set - { - //if (!Json.Data.orderLists.ContainsKey(GVL.GeneralConfig.DeviceType.ToString())) - //{ - // Json.Data.orderLists.TryAdd(GVL.GeneralConfig.DeviceType.ToString(), new ObservableCollection()); - //} - Json.Data.orderLists = value; - } + get { return Json.Data.orderLists; } + set { Json.Data.orderLists = value; } } ///