/// <summary> /// 显示规则描述编辑对话框 /// </summary> /// <param name="row">指定行</param> private void ShowCheckPointContentEditForm(DataTableViewRow row) { if (row == null || row.Index < 0 || this.dataGridView1.IsDeletedRow(row)) { return; } LargeTextEditForm frmRuleDescEdit = new LargeTextEditForm(); frmRuleDescEdit.Text = "编辑核查内容"; DataGridViewCell cell = row.Cells[this.colCheckPointContent.Index]; if (cell.Value != null) { frmRuleDescEdit.LargeText = cell.Value.ToString(); } if (frmRuleDescEdit.ShowDialog() != DialogResult.OK) { return; } string szRuleDesc = frmRuleDescEdit.LargeText.Trim(); if (szRuleDesc.Equals(cell.Value)) { return; } cell.Value = szRuleDesc; if (this.dataGridView1.IsNormalRowUndeleted(row)) { this.dataGridView1.SetRowState(row, RowState.Update); } }
private void ShowToSqlEditForm(DataTableViewRow row) { if (row == null || row.Index < 0 || this.dataGridView1.IsDeletedRow(row)) { return; } if (this.dataGridView1.EditingControl != null) { this.dataGridView1.EndEdit(); } LargeTextEditForm frmConfigDescEdit = new LargeTextEditForm(); frmConfigDescEdit.Text = "编辑联众代码查询sql"; DataGridViewCell cell = row.Cells[this.col_TO_SQL.Index]; if (cell.Value != null) { frmConfigDescEdit.LargeText = cell.Value.ToString(); } if (frmConfigDescEdit.ShowDialog() != DialogResult.OK) { return; } string szConfigDesc = frmConfigDescEdit.LargeText.Trim(); if (szConfigDesc.Equals(cell.Value)) { return; } cell.Value = szConfigDesc; if (this.dataGridView1.IsNormalRowUndeleted(row)) { this.dataGridView1.SetRowState(row, RowState.Update); } }
/// <summary> /// 显示查询语句设置对话框 /// </summary> /// <param name="row">指定行</param> private void ShowQuerySettingForm(DataTableViewRow row) { if (row == null || row.Index < 0 || this.dataGridView1.IsDeletedRow(row)) { return; } LargeTextEditForm frmQuerySqlEdit = new LargeTextEditForm(); frmQuerySqlEdit.Text = "编辑查询语句"; frmQuerySqlEdit.Description = "注意:SELECT子句必须包含事件发生时间和最晚截止时间" + "(如出院或当前时间)两个字段!"; DataGridViewCell cell = row.Cells[this.colSqlText.Index]; if (cell.Value != null) { frmQuerySqlEdit.LargeText = cell.Value.ToString(); } if (frmQuerySqlEdit.ShowDialog() != DialogResult.OK) { return; } string szSqlText = frmQuerySqlEdit.LargeText.Trim(); if (szSqlText.EndsWith(";")) { szSqlText = szSqlText.Remove(szSqlText.Length - 1); } if (szSqlText.Equals(cell.Value)) { return; } cell.Value = szSqlText; if (this.dataGridView1.IsNormalRowUndeleted(row)) { this.dataGridView1.SetRowState(row, RowState.Update); } }