/// <summary> /// 通道添加标签 /// </summary> /// <param name="labels"></param> public void SetLabelsToEquipment(List <string> labels) { int index = gridView1.FocusedRowHandle; int row = gridView1.GetDataRowHandleByGroupRowHandle(index); VideoPlay dr = (VideoPlay)gridView1.GetRow(row); int id = dr.EquipmentID; if (id == 0) { return; } List <int> ids = MyLabel.GetSelectIds(labels); if (!LabelData.AddLabelToEquipment(id, ids)) { MessageBox.Show("添加标签到通道失败"); Program.log.Error($"通道ID:{id},添加标签:{string.Join(",",labels)}--失败"); return; } Program.log.Error($"通道ID:{id},添加标签:{string.Join(",", labels)}"); PostVideos(); }