private void _btnOkOnClick(object sender, EventArgs e) { _importedIds = new List<BplIdentity>(); foreach (var line in txtDevices.Lines) { var idStrs = line.Split(new Char[] { ',' }); foreach (var idStr in idStrs) { var id = idStr.Trim(); if (id == "") { continue; } _importedIds.Add(BplIdentity.Get(id)); } } if (_importedIds.Count == 0) { return; } _importAsDevices = btnDevices.Checked; var req = new GetDevicesByPlatformId(); req.PlatformId = _platformId; SendRequest(req); }
internal void Handle(GetDevicesByPlatformId request) { using (var dbConn = DatabaseManager.DbConn()) { var devices = dbConn.ExecuteBpl(new DeviceGetByPlatformId { PlatformId = request.PlatformId }); Reply(devices); } }
private void _onLoad(object sender, EventArgs e) { cmbOpco.DataSource = _opcosComboList; cmbOpco.DisplayMember = "Name"; SetSort(listBoxes, 0); if (_platformId.IsEmpty) { var req = new GetAllDevices(); SendRequest(req); } else { var req = new GetDevicesByPlatformId(); req.PlatformId = _platformId; SendRequest(req); } }