소스 검색

修改plc编辑的bug

user_lt 1 년 전
부모
커밋
6504d00877
1개의 변경된 파일1개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 6
      BlankApp1/BlankApp1/ViewModels/BasicConfigViewModel/PLCConfigViewModel.cs

+ 1 - 6
BlankApp1/BlankApp1/ViewModels/BasicConfigViewModel/PLCConfigViewModel.cs

@@ -56,12 +56,7 @@ namespace PLCTool.ViewModels.BasicConfigViewModel
                     if (returnValue != null)
                     {
                         var plcCon = _mapper.Map<BasPlcItemConfigDto, bas_plc_item_config>(returnValue);
-                        var findPlc = allPLCConfigList.FirstOrDefault(x => (x.PlcAddress == returnValue.PlcAddress) || (x.PlcItem == returnValue.PlcAddress));
-                        if (findPlc != null)
-                        {
-                            MessageBox.Show("已有此PLC变量地址或名称,请更改名称!", "提示", MessageBoxButton.OKCancel, MessageBoxImage.Warning);
-                            return;
-                        }
+                     
                         //修改
                         plcCon.id = id;
                         bool isSucc = _iBasPlcItemConfigService.Edit(plcCon);