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.

551 lines
24KB

  1. using CnasSynchronusClient;
  2. using CnasSynchrousModel;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.ComponentModel;
  6. using System.Data;
  7. using System.Drawing;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Windows.Forms;
  11. namespace CNAS_DBSync
  12. {
  13. public delegate void SourceDataFilterHandler(SourceDataFilter sourceDataFilter); //声明一个委托,用于向父窗口传输值
  14. public partial class frmSourceFilter : Form
  15. {
  16. public SourceDataFilterHandler sourceDataFilterHandler; //在子窗口中定义一个SourceDataFilterHandler类型委托
  17. public SyncInstrumentItemInfo syncInstrumentItem = new SyncInstrumentItemInfo();
  18. public DataTable dtCurrentTableStruct = new DataTable(); //当前表的列和数据类型
  19. private ComboBox cbxTableColumns; //定义一个ComboBox,用于选择列
  20. private ComboBox cbxAlgorithm; //定义一个ComboBox, 用于根据不同的列绑定不同的条件
  21. private ComboBox cbxConditionValue; //定义一个ComboBox,用于显示输入条件值的方式
  22. private TextBox txtConditionValue; //定义一个TextBox,用于输入自定义的条件值
  23. private List<string> lstIntOrDouble = new List<string>() { "等于", "不等于", "大于", "小于", "不大于", "不小于" };
  24. private List<string> lstText = new List<string>() { "等于", "不等于", "包含", "不包含" };
  25. private List<string> lstConditionValueType = new List<string>() { "{自定义...}","RegEx:{全数字}", "RegEx:{英文+数字}","RegEx:{中文+数字}" };
  26. public string strTableInfoMode { get; set; }
  27. public List<FilterCondition> lstFilterConditions { get; set; } //临时过滤条件
  28. public frmSourceFilter(SyncInstrumentItemInfo syncInstrumentItem,string strTableInfoMode)
  29. {
  30. InitializeComponent();
  31. this.syncInstrumentItem = syncInstrumentItem;
  32. this.strTableInfoMode = strTableInfoMode;
  33. if (syncInstrumentItem.SourceFilter == null || syncInstrumentItem.SourceFilter.lstFilterConditions == null)
  34. this.lstFilterConditions = new List<FilterCondition>();
  35. else
  36. this.lstFilterConditions =GlobalCommonOperation.Clone(syncInstrumentItem.SourceFilter.lstFilterConditions);
  37. dgvConditions.AutoGenerateColumns = false;
  38. }
  39. private void frmSourceFilter_Load(object sender, EventArgs e)
  40. {
  41. if (syncInstrumentItem == null) return;
  42. if (syncInstrumentItem.LstSyncPramas == null) return;
  43. if (syncInstrumentItem.LstSyncPramas.Count <= 0) return;
  44. //加载表名数据
  45. this.txtCurrentTableName.Text = syncInstrumentItem.LstSyncPramas[0].SourceTable;
  46. //加载表结构(需要重新加载,因为父窗口可能没有数据或数据已经过时)
  47. if (strTableInfoMode == "0")
  48. {
  49. InstrumentData instrumentData = InstrumentDataFact.CreateInstrumentDataSource(syncInstrumentItem.SyncInstrumentDSInfo, new object[] { "", "", "" });
  50. Dictionary<string, DataTable> dictInstruTables = instrumentData.GetInstrumentData();
  51. if (dictInstruTables.ContainsKey(this.txtCurrentTableName.Text))
  52. dtCurrentTableStruct = dictInstruTables[this.txtCurrentTableName.Text];
  53. }
  54. else
  55. {
  56. InstrumentData instrumentData = InstrumentDataFact.CreateInstrumentDataSource(syncInstrumentItem.SyncInstrumentDSInfo, new object[] { this.txtCurrentTableName.Text, "", "" });
  57. dtCurrentTableStruct = instrumentData.GetInstrumentDataStruct();
  58. }
  59. //根据表结构手动构建ComboBox,用于用户选择增加列
  60. InitalColumnComboBox(dtCurrentTableStruct);
  61. InitalAlgorithmComboBox();
  62. InitalConditionValueComboBox();
  63. IntitalConditionValueTextBox();
  64. //加载过滤条件类型(与/或)
  65. if (syncInstrumentItem.SourceFilter == null)
  66. syncInstrumentItem.SourceFilter=new SourceDataFilter();
  67. if (syncInstrumentItem.SourceFilter.FilterConditionLinkType == null)
  68. syncInstrumentItem.SourceFilter.FilterConditionLinkType = "";
  69. this.cbxConditionLink.Text = ConvertLinkTypeToShow(syncInstrumentItem.SourceFilter.FilterConditionLinkType);
  70. //加载过滤条件
  71. if (lstFilterConditions == null)
  72. lstFilterConditions=new List<FilterCondition>();
  73. dgvConditions.DataSource = new BindingList<FilterCondition>();
  74. dgvConditions.DataSource = new BindingList<FilterCondition>(lstFilterConditions);
  75. }
  76. private void InitalColumnComboBox(DataTable dtCurrentTableStruct)
  77. {
  78. cbxTableColumns = new ComboBox();
  79. cbxTableColumns.SelectedIndexChanged += new EventHandler(cbxTableColumns_SelectedIndexChanged);
  80. cbxTableColumns.SelectionChangeCommitted += new EventHandler(cbxTableColumns_SelectionChangedCommitted);
  81. DataTable dtShow = new DataTable();
  82. dtShow.Columns.Add("InstruFieldName");
  83. dtShow.Columns.Add("InstruDataType");
  84. foreach (DataColumn dc in dtCurrentTableStruct.Columns)
  85. {
  86. dtShow.Rows.Add(new object[] { dc.ColumnName, dc.DataType });
  87. }
  88. cbxTableColumns.DataSource = dtShow;
  89. cbxTableColumns.DisplayMember = "InstruFieldName";
  90. cbxTableColumns.ValueMember = "InstruDataType";
  91. cbxTableColumns.Visible = false;
  92. }
  93. private void InitalAlgorithmComboBox()
  94. {
  95. cbxAlgorithm = new ComboBox();
  96. cbxAlgorithm.SelectedIndexChanged += new EventHandler(cbxAlgorithm_SelectedIndexChanged);
  97. cbxAlgorithm.SelectionChangeCommitted += new EventHandler(cbxAlgorithm_SelectionChangedCommitted);
  98. cbxAlgorithm.Visible = false;
  99. }
  100. private void InitalConditionValueComboBox()
  101. {
  102. cbxConditionValue = new ComboBox();
  103. cbxConditionValue.SelectedIndexChanged += new EventHandler(cbxConditionValue_SelectedIndexChanged);
  104. cbxConditionValue.SelectionChangeCommitted += new EventHandler(cbxConditionValue_SelectionChangedCommitted);
  105. cbxConditionValue.Visible = false;
  106. cbxConditionValue.DataSource = lstConditionValueType;
  107. }
  108. private void IntitalConditionValueTextBox()
  109. {
  110. txtConditionValue = new TextBox();
  111. txtConditionValue.Leave += new EventHandler(txtConditionValue_Leave);
  112. }
  113. private void cbxConditionValue_SelectionChangedCommitted(object sender, EventArgs e)
  114. {
  115. cbxConditionValue.Visible = false;
  116. }
  117. private void cbxConditionValue_SelectedIndexChanged(object sender, EventArgs e)
  118. {
  119. //当前选中单元格的值将随之发生更改
  120. if (dgvConditions.CurrentCell == null) return;
  121. string strConditionValue = "";
  122. switch (cbxConditionValue.Text)
  123. {
  124. case "RegEx:{全数字}":
  125. strConditionValue = @"RegEx:^[1-9]\d*$";
  126. dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["ConditionValue"].Value = strConditionValue;
  127. dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["Algorithm"].Value = "等于";
  128. break;
  129. case "RegEx:{英文+数字}":
  130. strConditionValue = @"RegEx:[a-zA-Z][0-9]";
  131. dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["ConditionValue"].Value = strConditionValue;
  132. dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["Algorithm"].Value = "等于";
  133. break;
  134. case "RegEx:{中文+数字}":
  135. strConditionValue = @"RegEx:[\u4e00-\u9fa5][0-9]";
  136. dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["ConditionValue"].Value = strConditionValue;
  137. dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["Algorithm"].Value = "等于";
  138. break;
  139. case "{自定义...}":
  140. default:
  141. //显示textbox控件,输入后,离开时提交数据。否则不提交任何数据
  142. ShowTextBox(dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["ConditionValue"].Value==null?"": dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["ConditionValue"].Value.ToString());
  143. //dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["ConditionValue"].Value = strConditionValue;
  144. break;
  145. }
  146. }
  147. private void cbxAlgorithm_SelectionChangedCommitted(object sender, EventArgs e)
  148. {
  149. cbxAlgorithm.Visible = false;
  150. }
  151. private void cbxAlgorithm_SelectedIndexChanged(object sender, EventArgs e)
  152. {
  153. //当前选中单元格的值将随之发生更改
  154. if (dgvConditions.CurrentCell == null) return;
  155. dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["Algorithm"].Value = cbxAlgorithm.Text;
  156. }
  157. private void cbxTableColumns_SelectionChangedCommitted(object sender, EventArgs e)
  158. {
  159. this.cbxTableColumns.Visible = false;
  160. }
  161. private void cbxTableColumns_SelectedIndexChanged(object sender, EventArgs e)
  162. {
  163. //当前选中单元格的值将随之发生更改
  164. if (dgvConditions.CurrentCell == null) return;
  165. dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["ColumnName"].Value = cbxTableColumns.Text;
  166. dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["ColumnDataType"].Value = cbxTableColumns.SelectedValue;
  167. }
  168. private string ConvertLinkTypeToShow(string filterConditionLinkType)
  169. {
  170. string strReturnValue = "";
  171. switch (filterConditionLinkType.ToLower())
  172. {
  173. case "or":
  174. strReturnValue = "或";
  175. break;
  176. case "and":
  177. default:
  178. strReturnValue = "与";
  179. break;
  180. }
  181. return strReturnValue;
  182. }
  183. /// <summary>
  184. /// 新增一个条件
  185. /// </summary>
  186. /// <param name="sender"></param>
  187. /// <param name="e"></param>
  188. private void btnAdd_Click(object sender, EventArgs e)
  189. {
  190. //最多支持5个条件,否则无限制的条件将极大影响性能
  191. if (lstFilterConditions.Count == 15)
  192. {
  193. MessageBox.Show("最多增加15项条件。");
  194. return;
  195. }
  196. //添加一条空数据
  197. FilterCondition condition = new FilterCondition();
  198. condition.TableName = this.txtCurrentTableName.Text;
  199. lstFilterConditions.Add(condition);
  200. //重新绑定
  201. dgvConditions.DataSource = new BindingList<FilterCondition>();
  202. dgvConditions.DataSource = new BindingList<FilterCondition>(lstFilterConditions);
  203. //选择最后一条
  204. dgvConditions.CurrentCell = dgvConditions.Rows[dgvConditions.Rows.Count - 1].Cells[1];
  205. }
  206. private void btnDelete_Click(object sender, EventArgs e)
  207. {
  208. if (dgvConditions.CurrentCell == null) return;
  209. if (dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["ColumnName"].Value == null) return;
  210. if (dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["ConditionValue"].Value == null) return;
  211. if (dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["Algorithm"].Value == null) return;
  212. string strColumnName = dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["ColumnName"].Value.ToString();
  213. string strConditionValue = dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["ConditionValue"].Value.ToString();
  214. string strAlgorithm = dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["Algorithm"].Value.ToString();
  215. var query = lstFilterConditions.Where(s => s.ColumnName == strColumnName && s.Algorithm == strAlgorithm && s.ConditionValue == strConditionValue);
  216. if (query.Count() > 0)
  217. {
  218. foreach (var item in query.ToList<FilterCondition>())
  219. {
  220. lstFilterConditions.Remove(item);
  221. }
  222. dgvConditions.DataSource = new BindingList<FilterCondition>(lstFilterConditions);
  223. }
  224. }
  225. private void dgvConditions_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
  226. {
  227. cbxTableColumns.Visible = false;
  228. cbxAlgorithm.Visible = false;
  229. }
  230. private void dgvConditions_CellEndEdit(object sender, DataGridViewCellEventArgs e)
  231. {
  232. cbxTableColumns.Visible = false;
  233. cbxAlgorithm.Visible = false;
  234. }
  235. private void dgvConditions_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
  236. {
  237. if (dgvConditions.CurrentCell == null) return;
  238. if (dgvConditions.CurrentCell.ColumnIndex == 0) //此时表示准备编辑列名
  239. {
  240. ShowConditionColumnSelect();
  241. }
  242. if (dgvConditions.CurrentCell.ColumnIndex == 1) //此时表示准备编辑条件
  243. {
  244. ShowConditionAlgorithm();
  245. }
  246. if (dgvConditions.CurrentCell.ColumnIndex == 2) //此时表示准备编辑条件值
  247. {
  248. ShowConditionValue();
  249. }
  250. }
  251. /// <summary>
  252. /// 显示条件列
  253. /// </summary>
  254. private void ShowConditionColumnSelect()
  255. {
  256. Rectangle TmpRect = dgvConditions.GetCellDisplayRectangle(dgvConditions.CurrentCell.ColumnIndex, dgvConditions.CurrentCell.RowIndex, true);
  257. cbxTableColumns.Size = TmpRect.Size;
  258. cbxTableColumns.Top = TmpRect.Top;
  259. cbxTableColumns.Left = TmpRect.Left;
  260. cbxTableColumns.DropDownStyle = ComboBoxStyle.DropDownList;
  261. cbxTableColumns.FormattingEnabled = true;
  262. cbxTableColumns.Visible = true;
  263. if (!this.dgvConditions.Controls.Contains(cbxTableColumns))
  264. this.dgvConditions.Controls.Add(cbxTableColumns);
  265. }
  266. /// <summary>
  267. /// 显示选择运算条件
  268. /// </summary>
  269. private void ShowConditionAlgorithm()
  270. {
  271. //1.加载数据
  272. string strColumnName = "";
  273. if (dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["ColumnName"].Value != null)
  274. strColumnName = dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["ColumnName"].Value.ToString();
  275. if (strColumnName != "")
  276. {
  277. string strColumnType = dtCurrentTableStruct.Columns[strColumnName].DataType.ToString();
  278. switch (strColumnType)
  279. {
  280. case "System.DateTime":
  281. case "System.Double":
  282. case "System.Int64":
  283. case "System.Int32":
  284. case "System.Decimal":
  285. cbxAlgorithm.DataSource = lstIntOrDouble;
  286. break;
  287. case "System.Byte[]":
  288. case "System.String":
  289. default:
  290. cbxAlgorithm.DataSource = lstText;
  291. break;
  292. }
  293. }
  294. //2.在合适的位置显示控件
  295. Rectangle TmpRect = dgvConditions.GetCellDisplayRectangle(dgvConditions.CurrentCell.ColumnIndex, dgvConditions.CurrentCell.RowIndex, true);
  296. cbxAlgorithm.Size = TmpRect.Size;
  297. cbxAlgorithm.Top = TmpRect.Top;
  298. cbxAlgorithm.Left = TmpRect.Left;
  299. cbxAlgorithm.DropDownStyle = ComboBoxStyle.DropDownList;
  300. cbxAlgorithm.FormattingEnabled = true;
  301. cbxAlgorithm.Visible = true;
  302. if (!this.dgvConditions.Controls.Contains(cbxAlgorithm))
  303. this.dgvConditions.Controls.Add(cbxAlgorithm);
  304. }
  305. private void ShowConditionValue()
  306. {
  307. Rectangle TmpRect = dgvConditions.GetCellDisplayRectangle(dgvConditions.CurrentCell.ColumnIndex, dgvConditions.CurrentCell.RowIndex, true);
  308. cbxConditionValue.Size = TmpRect.Size;
  309. cbxConditionValue.Top = TmpRect.Top;
  310. cbxConditionValue.Left = TmpRect.Left;
  311. cbxConditionValue.DropDownStyle = ComboBoxStyle.DropDownList;
  312. cbxConditionValue.FormattingEnabled = true;
  313. cbxConditionValue.Visible = true;
  314. if (!this.dgvConditions.Controls.Contains(cbxConditionValue))
  315. this.dgvConditions.Controls.Add(cbxConditionValue);
  316. }
  317. private void ShowTextBox(string strConditionValue)
  318. {
  319. Rectangle TmpRect = dgvConditions.GetCellDisplayRectangle(dgvConditions.CurrentCell.ColumnIndex, dgvConditions.CurrentCell.RowIndex, true);
  320. txtConditionValue.Size = TmpRect.Size;
  321. txtConditionValue.Top = TmpRect.Top;
  322. txtConditionValue.Left = TmpRect.Left;
  323. txtConditionValue.Visible = true;
  324. txtConditionValue.Text = strConditionValue;
  325. if (!this.dgvConditions.Controls.Contains(txtConditionValue))
  326. this.dgvConditions.Controls.Add(txtConditionValue);
  327. }
  328. private void txtConditionValue_Leave(object sender, EventArgs e)
  329. {
  330. txtConditionValue.Visible = false;
  331. dgvConditions.Rows[dgvConditions.CurrentCell.RowIndex].Cells["ConditionValue"].Value = txtConditionValue.Text.Trim();
  332. }
  333. private void btnOK_Click(object sender, EventArgs e)
  334. {
  335. //初始化一个过滤器
  336. SourceDataFilter dataFilter = new SourceDataFilter {
  337. FilterConditionLinkType = this.cbxConditionLink.Text=="与"?"and":"or",
  338. lstFilterConditions=new List<FilterCondition>()
  339. };
  340. //添加过滤条件
  341. foreach (DataGridViewRow dgr in dgvConditions.Rows)
  342. {
  343. if (dgr.Cells["ColumnName"].Value == null) continue;
  344. if (dgr.Cells["Algorithm"].Value == null) continue;
  345. if (dgr.Cells["ColumnDataType"].Value == null) continue;
  346. if (dgr.Cells["ConditionValue"].Value == null) //此时需要判断列的数据类型
  347. {
  348. ////如果当前选择的条件列是字符串类型,则认为此处是空值,否则,必须手动输入值才能正常存储
  349. //if (dgr.Cells["ColumnDataType"].Value.ToString().ToLower() != "system.string") continue;
  350. dgr.Cells["ConditionValue"].Value = "";
  351. }
  352. string strColumnName = dgr.Cells["ColumnName"].Value.ToString();
  353. string strConditionValue = dgr.Cells["ConditionValue"].Value.ToString();
  354. string strAlgorithm = dgr.Cells["Algorithm"].Value.ToString();
  355. string strColumnDataType = dgr.Cells["ColumnDataType"].Value.ToString();
  356. FilterCondition condition = new FilterCondition
  357. {
  358. TableName = this.txtCurrentTableName.Text,
  359. ColumnName = strColumnName,
  360. ColumnDataType=strColumnDataType,
  361. Algorithm = ConvertShowAlgorithmToValue(strAlgorithm),
  362. ConditionValue = strConditionValue
  363. };
  364. if (!dataFilter.lstFilterConditions.Contains(condition))
  365. dataFilter.lstFilterConditions.Add(condition);
  366. }
  367. //使用委托返回过滤器
  368. sourceDataFilterHandler(dataFilter);
  369. this.Close();
  370. }
  371. private string ConvertShowAlgorithmToValue(string strAlgorithm)
  372. {
  373. string strValue = "";
  374. switch (strAlgorithm)
  375. {
  376. case "等于":
  377. strValue = "=";
  378. break;
  379. case "不等于":
  380. strValue = "<>";
  381. break;
  382. case "包含":
  383. strValue = "like";
  384. break;
  385. case "不包含":
  386. strValue = "not like";
  387. break;
  388. case "大于":
  389. strValue = ">";
  390. break;
  391. case "小于":
  392. strValue = "<";
  393. break;
  394. case "不大于":
  395. strValue = "<=";
  396. break;
  397. case "不小于":
  398. strValue = ">=";
  399. break;
  400. default:
  401. strValue = strAlgorithm;
  402. break;
  403. }
  404. return strValue;
  405. }
  406. private string ConvertAlgorithmValueToShow(string Algorithm)
  407. {
  408. string strValue = "";
  409. switch (Algorithm)
  410. {
  411. case "=":
  412. strValue = "等于";
  413. break;
  414. case "<>":
  415. strValue = "不等于";
  416. break;
  417. case "like":
  418. strValue = "包含";
  419. break;
  420. case "not like":
  421. strValue = "不包含";
  422. break;
  423. case ">":
  424. strValue = "大于";
  425. break;
  426. case "<":
  427. strValue = "小于";
  428. break;
  429. case "<=":
  430. strValue = "不大于";
  431. break;
  432. case ">=":
  433. strValue = "不小于";
  434. break;
  435. }
  436. return strValue;
  437. }
  438. private void dgvConditions_CellClick(object sender, DataGridViewCellEventArgs e)
  439. {
  440. if (cbxTableColumns != null) cbxTableColumns.Visible = false;
  441. if (cbxAlgorithm != null) cbxAlgorithm.Visible = false;
  442. if (cbxConditionValue != null) cbxConditionValue.Visible = false;
  443. if (txtConditionValue != null) txtConditionValue.Visible = false;
  444. }
  445. private void dgvConditions_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
  446. {
  447. if (e.ColumnIndex == 1&&e.Value!=null)
  448. {
  449. string strShowValue = ConvertAlgorithmValueToShow(e.Value.ToString());
  450. e.Value = strShowValue != ""?strShowValue: e.Value;
  451. }
  452. }
  453. #region 判断DGV是否点击空白
  454. public int GetRowIndexAt(int mouseLocation_Y,DataGridView dgv)
  455. {
  456. if (dgv.FirstDisplayedScrollingRowIndex < 0)
  457. {
  458. return -1;
  459. }
  460. if (dgv.ColumnHeadersVisible == true && mouseLocation_Y <= dgv.ColumnHeadersHeight)
  461. {
  462. return -1;
  463. }
  464. int index = dgv.FirstDisplayedScrollingRowIndex;
  465. int displayedCount = dgv.DisplayedRowCount(true);
  466. for (int k = 1; k <= displayedCount;)
  467. {
  468. if (dgv.Rows[index].Visible == true)
  469. {
  470. Rectangle rect = dgv.GetRowDisplayRectangle(index, true); // 取该区域的显示部分区域
  471. if (rect.Top <= mouseLocation_Y && mouseLocation_Y < rect.Bottom)
  472. {
  473. return index;
  474. }
  475. k++;
  476. }
  477. index++;
  478. }
  479. return -1;
  480. }
  481. #endregion
  482. private void dgvConditions_MouseClick(object sender, MouseEventArgs e)
  483. {
  484. if (GetRowIndexAt(e.Y, dgvConditions) == -1)
  485. {
  486. dgvConditions.EndEdit();
  487. if(cbxTableColumns!=null) cbxTableColumns.Visible = false;
  488. if (cbxAlgorithm != null) cbxAlgorithm.Visible = false;
  489. if (cbxConditionValue != null) cbxConditionValue.Visible = false;
  490. if (txtConditionValue != null) txtConditionValue.Visible = false;
  491. }
  492. }
  493. }
  494. }