private void RecModiProc() { int iCount = ParCfg_DgView.SelectedRows.Count; if (iCount <= 0 || iCount >= 2) { MessageBox.Show("请选择一条需要修改的记录!", "提示!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (ItemCon_0.Text != "" && ItemCon_2.Text.Trim().Length > 0) { bool bIsModi = true; if (ParCfg_DgViewPtr.redundancyCheck(sFieldCap[0], ParCfg_DgView.CurrentCell.RowIndex) == true) //列重复检查,不检查焦点行 { MessageBox.Show("配置重复", "警告"); bIsModi = false; } if (bIsModi == true) { ParCfg_DgViewPtr.RecModiProc(); } } else { MessageBox.Show("信息内容不能为空,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void RecModiProc() { bool bIsModi = true; int iCount = ParCfg_DgView.SelectedRows.Count; if (iCount <= 0 || iCount >= 2) { MessageBox.Show("请选择一条需要修改的记录!", "提示!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (dataFormatCheck() == true) { List <string> lFieldCap = new List <string>(); lFieldCap.Clear(); lFieldCap.Add(sFieldCap[1]); lFieldCap.Add(sFieldCap[2]); lFieldCap.Add(sFieldCap[4]); //"Plc连接点", "数据区域", "数据地址" //"数据类型"暂不考虑 if (ParCfg_DgViewPtr.redundancyCheck(lFieldCap, ParCfg_DgView.CurrentCell.RowIndex) == true) //重复性检查 { bIsModi = false; MessageBox.Show("标签配置有冲突,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } if (bIsModi == true) { ParCfg_DgViewPtr.RecModiProc(); } } else { MessageBox.Show("标签参数配置有误,请检查!", "警告", MessageBoxButtons.OK); } }
private void DgView_RecModiProc() { int iCount = DgViewRec.SelectedRows.Count; if (iCount <= 0 || iCount >= 2) { MessageBox.Show("请选择一条需要修改的记录!", "提示!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (ItemCon_0.Text.Trim().Length > 0) { DgViewRecPtr.RecModiProc(); } else { MessageBox.Show("产品型号名不能为空, 请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void RecModiProc() { bool bIsModi = true; int iCount = ParCfg_DgView.SelectedRows.Count; if (iCount <= 0 || iCount >= 2) { MessageBox.Show("请选择一条需要修改的记录!", "提示!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (ParCfg_DgViewPtr.redundancyCheck(sFieldCap[0], ParCfg_DgView.CurrentCell.RowIndex) == true || ParCfg_DgViewPtr.redundancyCheck(sFieldCap[1], ParCfg_DgView.CurrentCell.RowIndex) == true) //重复性检查 { MessageBox.Show("指示灯编号或垫片值已存在,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); bIsModi = false; } if (bIsModi == true) { ParCfg_DgViewPtr.RecModiProc(); } }