Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ protected override async Task OnInitializedAsync()
if (DistributedVM.AllExchangesHasTheSameId())
{
var id = (DistributedVM.MainExchange.DataExchangeTwinObject as IAxoDataEntity)._EntityId.Cyclic;
this.SelectedEntity = DistributedVM.MainExchange.GetRecords(id, 1, 0, eSearchMode.Exact, "", false).First();

var recs = DistributedVM.MainExchange.GetRecords(id, 1, 0, eSearchMode.Exact, "", false);

if (recs != null && recs.Any())
{
this.SelectedEntity = recs.First();
}
}

ConfigSuffix = string.IsNullOrEmpty(ConfigSuffix) ? string.Empty : ConfigSuffix;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ private async Task<bool> WriteTags(List<ITwinPrimitive> primitives)
/// <returns>Returns true if the write operation is successful; otherwise, false.</returns>
public async Task<bool> WritePersistentGroupFromRepository(string group)
{
if (!tagsInGroups.ContainsKey(group)) return false; // group not exist

var recordFromRepo = _Repository.Read(group);

List<ITwinPrimitive> tagsToWrite = new List<ITwinPrimitive>();
Expand Down Expand Up @@ -153,10 +155,11 @@ public async Task<bool> UpdatePersistentGroupFromPlcToRepository(string persiste

private bool UpdateReadedTagsToRepository(string persistentGroupName)
{
if (!tagsInGroups.ContainsKey(persistentGroupName)) return false; // group not exist

var primitivesTagsInGroup = tagsInGroups[persistentGroupName];

if (primitivesTagsInGroup == null)
return false;
if (primitivesTagsInGroup == null) return false;

List<TagObject> NewTagValues = new List<TagObject>();

Expand Down
Loading