CNAS取数仪器端升级
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

547 line
25KB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using CnasSynchronusClient;
  10. using CnasSynchrousModel;
  11. namespace CNAS_DBSync
  12. {
  13. public partial class frmCNASValue : Form
  14. {
  15. public SyncInstrumentItemInfo syncInstrument;
  16. private ComboBox cbxConditionValue;
  17. private List<string> lstConditionValueType = new List<string>() { "等于", "连接", "若...则...", "截取", "除以", "乘以", "小数位数","数值相加(减)","截断开头(结尾)" };
  18. public frmCNASValue(SyncInstrumentItemInfo syncInstrument)
  19. {
  20. InitializeComponent();
  21. this.syncInstrument = syncInstrument;
  22. }
  23. private void frmCNASValue_Load(object sender, EventArgs e)
  24. {
  25. if (syncInstrument == null || syncInstrument.LstSyncPramas == null|| syncInstrument.LstSyncPramas.Count==0)
  26. {
  27. MessageBox.Show("请先指定至少一个映射字段。");
  28. return;
  29. }
  30. //初始化ComBobox
  31. InnitalComboBox();
  32. //加载数据
  33. LoadShowData();
  34. }
  35. private void InnitalComboBox()
  36. {
  37. cbxConditionValue = new ComboBox();
  38. cbxConditionValue.SelectedIndexChanged += new EventHandler(cbxConditionValue_SelectedIndexChanged);
  39. cbxConditionValue.SelectionChangeCommitted += new EventHandler(cbxConditionValue_SelectionChangedCommitted);
  40. cbxConditionValue.Visible = false;
  41. cbxConditionValue.DataSource = lstConditionValueType;
  42. }
  43. private void cbxConditionValue_SelectionChangedCommitted(object sender, EventArgs e)
  44. {
  45. cbxConditionValue.Visible = false;
  46. }
  47. private void cbxConditionValue_SelectedIndexChanged(object sender, EventArgs e)
  48. {
  49. //当前选中单元格的值将随之发生更改
  50. if (dgvCnas.CurrentCell == null) return;
  51. dgvCnas.Rows[dgvCnas.CurrentCell.RowIndex].Cells["condition"].Value = cbxConditionValue.Text;
  52. }
  53. private void LoadShowData()
  54. {
  55. //1.根据映射表中的表名,获取该表所有字段,全部显示
  56. string strTableName = syncInstrument.LstSyncPramas[0].TargetTable;
  57. DataTable dtTableStruct = CnasDataOperationFact.CnasDataOperation().GetCNASTablesStruct(strTableName, syncInstrument.SyncTargetDBInfo);
  58. if (dtTableStruct != null)
  59. {
  60. DataTable dtCnasShow = new DataTable();
  61. dtCnasShow.Columns.Add("CnasTableName");
  62. dtCnasShow.Columns.Add("CnasFieldName");
  63. dtCnasShow.Columns.Add("CnasDataType");
  64. foreach (DataColumn dc in dtTableStruct.Columns)
  65. {
  66. if (dc.ColumnName.ToUpper() == "ID") continue;
  67. dtCnasShow.Rows.Add(new object[] { strTableName,dc.ColumnName, dc.DataType });
  68. }
  69. dgvCnas.DataSource = dtCnasShow;
  70. }
  71. //2.根据已存储数据,匹配后填充到datagridview中
  72. if (syncInstrument.lstFixedValue == null)
  73. syncInstrument.lstFixedValue = new List<CnasConditionMapValue>();
  74. if (syncInstrument.lstFixedValue.Count == 0) return;
  75. foreach (DataGridViewRow dgvRow in dgvCnas.Rows)
  76. {
  77. string strCurrentTable = dgvRow.Cells["TableName"].Value.ToString();
  78. string strCurrentColumn = dgvRow.Cells["TableColumn"].Value.ToString();
  79. if (strCurrentTable == "" || strCurrentColumn == "") continue;
  80. var query=syncInstrument.lstFixedValue.Where(s => s.TableName == strCurrentTable && s.ColumnName == strCurrentColumn).ToList<CnasConditionMapValue>();
  81. if (query.Count == 1)
  82. {
  83. dgvRow.Cells["Value"].Value = query[0].Value;
  84. dgvRow.Cells["Condition"].Value = GiveShowByCondition(query[0]);
  85. }
  86. }
  87. }
  88. private void btnOK_Click(object sender, EventArgs e)
  89. {
  90. this.DialogResult = DialogResult.OK;
  91. this.Close();
  92. }
  93. private void dgvCnas_CellEndEdit(object sender, DataGridViewCellEventArgs e)
  94. {
  95. if (e.ColumnIndex == 1) //此时是“值”列
  96. {
  97. //如果没有指定条件,无法存储结果
  98. if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value == null) return;
  99. //当前列名
  100. string strCurrentTable = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString();
  101. string strCurrentColumn = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString();
  102. string strCurrentType = dgvCnas.Rows[e.RowIndex].Cells["DataType"].Value.ToString();
  103. string strCurrentCondition= dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString();
  104. if (dgvCnas.CurrentCell.Value == null)
  105. {
  106. syncInstrument.lstFixedValue.RemoveAll(s => s.TableName == strCurrentTable && s.ColumnName == strCurrentColumn);
  107. return;
  108. }
  109. string strInputValue = dgvCnas.CurrentCell.Value.ToString();
  110. //检查合法性
  111. if (strCurrentColumn == "ID")
  112. {
  113. MessageBox.Show("该列不能指定固定值。");
  114. return;
  115. }
  116. bool bIfSuccess = true;
  117. switch (strCurrentType)
  118. {
  119. case "System.Decimal":
  120. decimal defaultdecimal = 0;
  121. if (!decimal.TryParse(strInputValue, out defaultdecimal))
  122. bIfSuccess = false;
  123. break;
  124. case "System.Int":
  125. int defaultint = 0;
  126. if (!int.TryParse(strInputValue, out defaultint))
  127. bIfSuccess = false;
  128. break;
  129. case "System.String":
  130. default:
  131. break;
  132. }
  133. if (!bIfSuccess)
  134. {
  135. MessageBox.Show("输入格式不正确,请重新输入。");
  136. return;
  137. }
  138. if (GetBytesOfString(strInputValue) > 20)
  139. {
  140. MessageBox.Show("输入内容超出限制,请重新输入。");
  141. dgvCnas.CurrentCell.Value = "";
  142. return;
  143. }
  144. //将数据插入到数据源中
  145. var query = syncInstrument.lstFixedValue.Where(s => s.TableName == strCurrentTable && s.ColumnName == strCurrentColumn).ToList<CnasConditionMapValue>();
  146. if (query.Count >= 1)
  147. {
  148. GiveConditionByShow(query[0],strCurrentCondition);
  149. //query[0].Condition = strCurrentCondition == "Sub" ? MapCondition.Sub : (strCurrentCondition == "IFThen" ? MapCondition.IFThen: MapCondition.Equal);
  150. query[0].Value = strInputValue;
  151. }
  152. else
  153. {
  154. CnasConditionMapValue cnasFixed = new CnasConditionMapValue();
  155. cnasFixed.TableName = strCurrentTable;
  156. cnasFixed.ColumnName = strCurrentColumn;
  157. cnasFixed.Value = strInputValue;
  158. //cnasFixed.Condition= strCurrentCondition == "Sub" ? MapCondition.Sub : (strCurrentCondition == "IFThen" ? MapCondition.IFThen : MapCondition.Equal);
  159. GiveConditionByShow(cnasFixed, strCurrentCondition);
  160. syncInstrument.lstFixedValue.Add(cnasFixed);
  161. }
  162. }
  163. }
  164. public int GetBytesOfString(string Text)
  165. {
  166. int nByte = 0;
  167. byte[] bytes = Encoding.Unicode.GetBytes(Text);
  168. for (int i = 0; i < bytes.GetLength(0); i++)
  169. {
  170. // 偶数位置,如0、2、4等,为UCS2编码中两个字节的第一个字节
  171. if (i % 2 == 0)
  172. {
  173. nByte++; // 在UCS2第一个字节时n加1
  174. }
  175. else
  176. {
  177. // 当UCS2编码的第二个字节大于0时,该UCS2字符为汉字,一个汉字算两个字节
  178. if (bytes[i] > 0)
  179. {
  180. nByte++;
  181. }
  182. }
  183. }
  184. return nByte;
  185. }
  186. public void GiveConditionByShow(CnasConditionMapValue cnasFixed,string strCurrentCondition)
  187. {
  188. switch (strCurrentCondition)
  189. {
  190. case "连接":
  191. cnasFixed.Condition = MapCondition.Sub;
  192. break;
  193. case "若...则...":
  194. cnasFixed.Condition = MapCondition.IFThen;
  195. break;
  196. case "截取":
  197. cnasFixed.Condition = MapCondition.SubString;
  198. break;
  199. case "除以":
  200. cnasFixed.Condition = MapCondition.Divided;
  201. break;
  202. case "乘以":
  203. cnasFixed.Condition = MapCondition.Multiplied;
  204. break;
  205. case "小数位数":
  206. cnasFixed.Condition = MapCondition.DecimalDigits;
  207. break;
  208. case "等于":
  209. cnasFixed.Condition = MapCondition.Equal;
  210. break;
  211. case "数值相加(减)":
  212. cnasFixed.Condition = MapCondition.AddSubtract;
  213. break;
  214. case "截断开头(结尾)":
  215. cnasFixed.Condition = MapCondition.SubstringStartEnd;
  216. break;
  217. default:
  218. break;
  219. }
  220. }
  221. public string GiveShowByCondition(CnasConditionMapValue cnasFixed)
  222. {
  223. string strCurrentCondition = "";
  224. switch (cnasFixed.Condition)
  225. {
  226. case MapCondition.Equal:
  227. strCurrentCondition = "等于";
  228. break;
  229. case MapCondition.Sub:
  230. strCurrentCondition = "连接";
  231. break;
  232. case MapCondition.IFThen:
  233. strCurrentCondition = "若...则...";
  234. break;
  235. case MapCondition.Divided:
  236. strCurrentCondition = "除以";
  237. break;
  238. case MapCondition.Multiplied:
  239. strCurrentCondition = "乘以";
  240. break;
  241. case MapCondition.SubString:
  242. strCurrentCondition = "截取";
  243. break;
  244. case MapCondition.DecimalDigits:
  245. strCurrentCondition = "小数位数";
  246. break;
  247. case MapCondition.AddSubtract:
  248. strCurrentCondition = "数值相加(减)";
  249. break;
  250. case MapCondition.SubstringStartEnd:
  251. strCurrentCondition = "截断开头(结尾)";
  252. break;
  253. }
  254. return strCurrentCondition;
  255. }
  256. private void dgvCnas_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
  257. {
  258. Rectangle rectangle = new Rectangle(e.RowBounds.Location.X,
  259. e.RowBounds.Location.Y,
  260. dgvCnas.RowHeadersWidth - 4,
  261. e.RowBounds.Height);
  262. TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(),
  263. dgvCnas.RowHeadersDefaultCellStyle.Font,
  264. rectangle,
  265. dgvCnas.RowHeadersDefaultCellStyle.ForeColor,
  266. TextFormatFlags.VerticalCenter | TextFormatFlags.Right);
  267. }
  268. private void dgvCnas_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
  269. {
  270. if (e.ColumnIndex == 0) //如果此时是“条件”列
  271. {
  272. ShowConditionValue();
  273. }
  274. if (e.ColumnIndex == 1)//如果此时是“值”列
  275. {
  276. if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value == null) return;
  277. if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString() == "连接")
  278. {
  279. CnasConditionMapValue cnasFixed = new CnasConditionMapValue
  280. {
  281. TableName = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString(),
  282. ColumnName = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString(),
  283. Condition = MapCondition.Sub
  284. };
  285. if (dgvCnas.Rows[e.RowIndex].Cells["Value"].Value!=null)
  286. cnasFixed.Value= dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();
  287. frmConditionParam frmCondition = new frmConditionParam(syncInstrument, cnasFixed);
  288. if (frmCondition.ShowDialog() == DialogResult.OK)
  289. {
  290. if (frmCondition.conditionvalue.Value != null&& frmCondition.conditionvalue.Value.ToString()!="")
  291. {
  292. dgvCnas.Rows[e.RowIndex].Cells["Value"].Value = frmCondition.conditionvalue.Value;
  293. //将数据插入到数据源中
  294. var query = syncInstrument.lstFixedValue.Where(s => s.TableName == cnasFixed.TableName && s.ColumnName == cnasFixed.ColumnName).ToList<CnasConditionMapValue>();
  295. if (query.Count >= 1)
  296. {
  297. query[0].Condition = cnasFixed.Condition;
  298. query[0].Value = frmCondition.conditionvalue.Value;
  299. }
  300. else
  301. {
  302. cnasFixed.Value = frmCondition.conditionvalue.Value;
  303. syncInstrument.lstFixedValue.Add(cnasFixed);
  304. }
  305. }
  306. }
  307. }
  308. if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString() == "若...则...")
  309. {
  310. CnasConditionMapValue cnasFixed = new CnasConditionMapValue
  311. {
  312. TableName = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString(),
  313. ColumnName = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString(),
  314. Condition = MapCondition.IFThen
  315. };
  316. if (dgvCnas.Rows[e.RowIndex].Cells["Value"].Value != null)
  317. cnasFixed.Value = dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();
  318. frmIfThenParams frmIfThen = new frmIfThenParams(syncInstrument, cnasFixed);
  319. if (frmIfThen.ShowDialog() == DialogResult.OK)
  320. {
  321. if (frmIfThen.conditionvalue.Value != null && frmIfThen.conditionvalue.Value.ToString() != "")
  322. {
  323. dgvCnas.Rows[e.RowIndex].Cells["Value"].Value = frmIfThen.conditionvalue.Value;
  324. //将数据插入到数据源中
  325. var query = syncInstrument.lstFixedValue.Where(s => s.TableName == cnasFixed.TableName && s.ColumnName == cnasFixed.ColumnName).ToList<CnasConditionMapValue>();
  326. if (query.Count >= 1)
  327. {
  328. query[0].Condition = cnasFixed.Condition;
  329. query[0].Value = frmIfThen.conditionvalue.Value;
  330. }
  331. else
  332. {
  333. cnasFixed.Value = frmIfThen.conditionvalue.Value;
  334. syncInstrument.lstFixedValue.Add(cnasFixed);
  335. }
  336. }
  337. }
  338. }
  339. if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString() == "截取")
  340. {
  341. CnasConditionMapValue cnasFixed = new CnasConditionMapValue
  342. {
  343. TableName = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString(),
  344. ColumnName = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString(),
  345. Condition = MapCondition.SubString
  346. };
  347. if (dgvCnas.Rows[e.RowIndex].Cells["Value"].Value != null)
  348. cnasFixed.Value = dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();
  349. frmSplitParam frmSplitParam = new frmSplitParam(cnasFixed);
  350. if (frmSplitParam.ShowDialog() == DialogResult.OK)
  351. {
  352. if (frmSplitParam.conditionvalue.Value != null && frmSplitParam.conditionvalue.Value.ToString() != "")
  353. {
  354. dgvCnas.Rows[e.RowIndex].Cells["Value"].Value = frmSplitParam.conditionvalue.Value;
  355. //将数据插入到数据源中
  356. var query = syncInstrument.lstFixedValue.Where(s => s.TableName == cnasFixed.TableName && s.ColumnName == cnasFixed.ColumnName).ToList<CnasConditionMapValue>();
  357. if (query.Count >= 1)
  358. {
  359. query[0].Condition = cnasFixed.Condition;
  360. query[0].Value = frmSplitParam.conditionvalue.Value;
  361. }
  362. else
  363. {
  364. cnasFixed.Value = frmSplitParam.conditionvalue.Value;
  365. syncInstrument.lstFixedValue.Add(cnasFixed);
  366. }
  367. }
  368. }
  369. }
  370. if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString() == "截断开头(结尾)")
  371. {
  372. CnasConditionMapValue cnasFixed = new CnasConditionMapValue
  373. {
  374. TableName = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString(),
  375. ColumnName = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString(),
  376. Condition = MapCondition.SubstringStartEnd
  377. };
  378. if (dgvCnas.Rows[e.RowIndex].Cells["Value"].Value != null)
  379. cnasFixed.Value = dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();
  380. frmStartEndSubstring frmStartEnd = new frmStartEndSubstring(cnasFixed);
  381. if (frmStartEnd.ShowDialog() == DialogResult.OK)
  382. {
  383. if (frmStartEnd.conditionvalue.Value != null && frmStartEnd.conditionvalue.Value.ToString() != "")
  384. {
  385. dgvCnas.Rows[e.RowIndex].Cells["Value"].Value = frmStartEnd.conditionvalue.Value;
  386. //将数据插入到数据源中
  387. var query = syncInstrument.lstFixedValue.Where(s => s.TableName == cnasFixed.TableName && s.ColumnName == cnasFixed.ColumnName).ToList<CnasConditionMapValue>();
  388. if (query.Count >= 1)
  389. {
  390. query[0].Condition = cnasFixed.Condition;
  391. query[0].Value = frmStartEnd.conditionvalue.Value;
  392. }
  393. else
  394. {
  395. cnasFixed.Value = frmStartEnd.conditionvalue.Value;
  396. syncInstrument.lstFixedValue.Add(cnasFixed);
  397. }
  398. }
  399. }
  400. }
  401. if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString() == "数值相加(减)")
  402. {
  403. CnasConditionMapValue cnasFixed = new CnasConditionMapValue
  404. {
  405. TableName = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString(),
  406. ColumnName = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString(),
  407. Condition = MapCondition.AddSubtract
  408. };
  409. if (dgvCnas.Rows[e.RowIndex].Cells["Value"].Value != null)
  410. cnasFixed.Value = dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();
  411. frmAddSubtract frmAddSubtract = new frmAddSubtract(syncInstrument, cnasFixed);
  412. if (frmAddSubtract.ShowDialog() == DialogResult.OK)
  413. {
  414. if (frmAddSubtract.conditionvalue.Value != null && frmAddSubtract.conditionvalue.Value.ToString() != "")
  415. {
  416. dgvCnas.Rows[e.RowIndex].Cells["Value"].Value = frmAddSubtract.conditionvalue.Value;
  417. //将数据插入到数据源中
  418. var query = syncInstrument.lstFixedValue.Where(s => s.TableName == cnasFixed.TableName && s.ColumnName == cnasFixed.ColumnName).ToList<CnasConditionMapValue>();
  419. if (query.Count >= 1)
  420. {
  421. query[0].Condition = cnasFixed.Condition;
  422. query[0].Value = frmAddSubtract.conditionvalue.Value;
  423. }
  424. else
  425. {
  426. cnasFixed.Value = frmAddSubtract.conditionvalue.Value;
  427. syncInstrument.lstFixedValue.Add(cnasFixed);
  428. }
  429. }
  430. }
  431. }
  432. dgvCnas.EndEdit();
  433. }
  434. }
  435. private void btnDelete_Click(object sender, EventArgs e)
  436. {
  437. if (syncInstrument == null) return;
  438. if (syncInstrument.lstFixedValue == null) return;
  439. if (dgvCnas == null) return;
  440. if (dgvCnas.Rows.Count <= 0) return;
  441. foreach (DataGridViewRow dr in dgvCnas.Rows)
  442. {
  443. dr.Cells["condition"].Value = "";
  444. dr.Cells["Value"].Value = "";
  445. }
  446. syncInstrument.lstFixedValue.Clear();
  447. }
  448. private void dgvCnas_CellValueChanged(object sender, DataGridViewCellEventArgs e)
  449. {
  450. if (e.RowIndex <= 0) return;
  451. if (e.ColumnIndex == 0) //此时是“条件”列
  452. {
  453. if (dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value == null) return;
  454. if (dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value == null) return;
  455. if (dgvCnas.Rows[e.RowIndex].Cells["DataType"].Value == null) return;
  456. if (dgvCnas.Rows[e.RowIndex].Cells["Condition"].Value == null) return;
  457. //当前列名
  458. string strCurrentTable = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString();
  459. string strCurrentColumn = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString();
  460. string strCurrentType = dgvCnas.Rows[e.RowIndex].Cells["DataType"].Value.ToString();
  461. string strCurrentCondition = dgvCnas.Rows[e.RowIndex].Cells["Condition"].Value.ToString();
  462. string strCurrentValue = dgvCnas.Rows[e.RowIndex].Cells["Value"].Value == null ? "" : dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();
  463. //将数据插入到数据源中
  464. var query = syncInstrument.lstFixedValue.Where(s => s.TableName == strCurrentTable && s.ColumnName == strCurrentColumn).ToList<CnasConditionMapValue>();
  465. if (query.Count >= 1)
  466. {
  467. GiveConditionByShow(query[0], strCurrentCondition);
  468. }
  469. else
  470. {
  471. CnasConditionMapValue cnasFixed = new CnasConditionMapValue();
  472. cnasFixed.TableName = strCurrentTable;
  473. cnasFixed.ColumnName = strCurrentColumn;
  474. cnasFixed.Value = strCurrentValue;
  475. GiveConditionByShow(cnasFixed, strCurrentCondition);
  476. syncInstrument.lstFixedValue.Add(cnasFixed);
  477. }
  478. }
  479. }
  480. private void dgvCnas_CellClick(object sender, DataGridViewCellEventArgs e)
  481. {
  482. cbxConditionValue.Visible = false;
  483. }
  484. private void ShowConditionValue()
  485. {
  486. Rectangle TmpRect = dgvCnas.GetCellDisplayRectangle(dgvCnas.CurrentCell.ColumnIndex, dgvCnas.CurrentCell.RowIndex, true);
  487. cbxConditionValue.Size = TmpRect.Size;
  488. cbxConditionValue.Top = TmpRect.Top;
  489. cbxConditionValue.Left = TmpRect.Left;
  490. cbxConditionValue.DropDownStyle = ComboBoxStyle.DropDownList;
  491. cbxConditionValue.FormattingEnabled = true;
  492. cbxConditionValue.Visible = true;
  493. if (!this.dgvCnas.Controls.Contains(cbxConditionValue))
  494. this.dgvCnas.Controls.Add(cbxConditionValue);
  495. }
  496. }
  497. }