|
|
|
|
@ -56,7 +56,7 @@ public class AlgorithmConfigVM : BaseViewModel |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public List<string> _jsonKeysBak; |
|
|
|
|
private List<string> _jsonKeysBak; |
|
|
|
|
public List<string> JsonKeysBak |
|
|
|
|
{ |
|
|
|
|
get => _jsonKeysBak; |
|
|
|
|
@ -85,14 +85,14 @@ public class AlgorithmConfigVM : BaseViewModel |
|
|
|
|
AgileJsonConfigEntities = new ObservableCollection<AgileJsonConfigEntity>(); |
|
|
|
|
string sql = @"SELECT Mode, Shape, Spec, JsonKey, Value FROM AGILE_ALGORITHM_CONFIG"; |
|
|
|
|
DataTable dataTable = DataBaseHelper.ExecuteQuery(sql); |
|
|
|
|
var baseData = new AgileJsonConfigEntity(_jsonKeysBak); |
|
|
|
|
var baseData = new AgileJsonConfigEntity(this); |
|
|
|
|
if (dataTable != null && dataTable.Rows.Count >= 0) |
|
|
|
|
{ |
|
|
|
|
foreach (DataRow row in dataTable.Rows) |
|
|
|
|
{ |
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
AgileJsonConfigEntities.Add(new AgileJsonConfigEntity(_jsonKeysBak) |
|
|
|
|
AgileJsonConfigEntities.Add(new AgileJsonConfigEntity(this) |
|
|
|
|
{ |
|
|
|
|
ModeValue = row["Mode"].ToSafeString(), |
|
|
|
|
SpecValue = row["Spec"].ToSafeString(), |
|
|
|
|
@ -235,7 +235,7 @@ public class AlgorithmConfigVM : BaseViewModel |
|
|
|
|
public ICommand AddCommand => new RelayCommand((param) => |
|
|
|
|
{ |
|
|
|
|
string data = GetAlgorithmConfig("P8 P8"); |
|
|
|
|
AgileJsonConfigEntities.Add(new AgileJsonConfigEntity(_jsonKeysBak)); |
|
|
|
|
AgileJsonConfigEntities.Add(new AgileJsonConfigEntity(this)); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
[Log] |
|
|
|
|
@ -264,6 +264,7 @@ public class AlgorithmConfigVM : BaseViewModel |
|
|
|
|
{ |
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
_jsonKeysBak = GetNestedKeys(JObject.Parse(AlgorithmConfigJson)); |
|
|
|
|
if (!CheckAndSaveAgileJson()) |
|
|
|
|
{ |
|
|
|
|
return; |
|
|
|
|
|