private void SetRowInfo(GridViewRowInfo row)
        {
            TriageDataInfo tdi = new TriageDataInfo();

            DbAccess db = new DbAccess(GlobalSettings.Database);

            using (DataLogContext dlc = new DataLogContext(db.getConStrSQL()))
            {
                Guid aeId = (Guid)row.Cells["ActivityExecutionId"].Value;
                tdi.DeviceId = ActivityExecutionAssetUsage.GetByActivityExecutionId(dlc, aeId).AssetId;
                ActivityExecution ae = ActivityExecution.GetById(dlc, aeId);
                SessionDevice     sd = SessionDevice.GetBySessionDeviceId(dlc, cboSessionIds.Text, tdi.DeviceId);

                tdi.ActivityType = ae.ActivityType;
                tdi.ActivityName = ae.ActivityName;
                tdi.UserName     = ae.UserName;

                if (sd != null)
                {
                    tdi.Firmware         = sd.FirmwareRevision;
                    tdi.FirmwareDatecode = sd.FirmwareDatecode;
                    tdi.Model            = sd.DeviceName;
                    tdi.IPAddress        = sd.IpAddress;
                    tdi.Product          = sd.ProductName;
                }

                var aepList = ActivityExecutionPerformance.GetByActivityExecutionId(dlc, aeId);
                tdi.AddPerformanceMarkers(aepList);
                SetPerformanceMarkers(tdi.PerformanceMarkers);

                lblDeviceId.Text         = tdi.DeviceId;
                lblIPAddress.Text        = tdi.IPAddress;
                lblModelInfo.Text        = tdi.Model;
                lblProduct.Text          = tdi.Product;
                lblFirmwareDatecode.Text = tdi.FirmwareDatecode;
                lblFirmwareRevision.Text = tdi.Firmware;
                lblUserId.Text           = tdi.UserName;
                lbActivityType.Text      = tdi.ActivityType;
                lblActivityName.Text     = tdi.ActivityName;
            }

            byte[] thumbnail = (byte[])row.Cells["Thumbnail"].Value;
            if (row.Cells["ControlIds"].Value != null)
            {
                string   regExp = @"[\n\r]+";
                string[] temp   = Regex.Split(row.Cells["ControlIds"].Value.ToString(), regExp);
                for (int ctr = 0; ctr < temp.Length; ctr++)
                {
                    errMessageAndroid.Text += temp[ctr];
                }
            }
            if (row.Cells["Reason"].Value != null)
            {
                rtbErrorMessage.Text = row.Cells["Reason"].Value.ToString();
            }
            tabControlInfo.SelectedIndex = 0;
            SetImage(pbThumbnail, thumbnail);
            pbControlPanel.Image = null;
        }
        private void GetSessionActivityDevices()
        {
            _triageDataInfoList = new TriageDataInfoList();

            foreach (TriageData td in _triageDataList)
            {
                TriageDataInfo tdi = new TriageDataInfo();

                DbAccess db = new DbAccess(GlobalSettings.Database);
                using (DataLogContext dlc = new DataLogContext(db.getConStrSQL()))
                {
                    var assetUsage = ActivityExecutionAssetUsage.GetByActivityExecutionId(dlc, td.ActivityExecutionId);
                    if (assetUsage != null)
                    {
                        tdi.DeviceId = assetUsage.AssetId;

                        ActivityExecution ae = ActivityExecution.GetById(dlc, td.ActivityExecutionId);
                        SessionDevice     sd = SessionDevice.GetBySessionDeviceId(dlc, cboSessionIds.Text, tdi.DeviceId);

                        tdi.ActivityType = ae.ActivityType;
                        tdi.ActivityName = ae.ActivityName;
                        tdi.UserName     = ae.UserName;

                        if (sd != null)
                        {
                            tdi.Firmware         = sd.FirmwareRevision;
                            tdi.FirmwareDatecode = sd.FirmwareDatecode;
                            tdi.Model            = sd.DeviceName;
                            tdi.IPAddress        = sd.IpAddress;
                            tdi.Product          = sd.ProductName;
                        }

                        var aepList = ActivityExecutionPerformance.GetByActivityExecutionId(dlc, td.ActivityExecutionId);
                        tdi.AddPerformanceMarkers(aepList);
                    }
                    else
                    {
                        rtbErrorMessage.Text = $@"Missing Activity Asset Usage for activity {td.ActivityExecutionId}";
                        MessageBox.Show($@"Missing Activity Asset Usage for activity {td.ActivityExecutionId}");
                        return;
                    }
                }
                tdi.ActivityExecutionId = td.ActivityExecutionId;
                _triageDataInfoList.Add(tdi);
            }
        }