private void InsertSelectedUserSaved() { if (this.gridView1.RowCount > 0 && this.gridView1.FocusedRowHandle >= 0) { MDQuery_ComputeColumnDefine _selectedItem = this.gridView1.GetRow(this.gridView1.FocusedRowHandle) as MDQuery_ComputeColumnDefine; this.displayName = _selectedItem.DisplayName; this.description = _selectedItem.ColumnDescription; this.expression = _selectedItem.DisplayMethod; this.resultDataType = _selectedItem.ResultDataType; this.queryString = _selectedItem.ColumnMethod; this.DialogResult = DialogResult.OK; this.Close(); } else { XtraMessageBox.Show("请选择保存的记录", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } }
private void DelSelectedUserSaved() { if (this.gridView1.RowCount > 0 && this.gridView1.FocusedRowHandle >= 0) { MDQuery_ComputeColumnDefine _selectedItem = this.gridView1.GetRow(this.gridView1.FocusedRowHandle) as MDQuery_ComputeColumnDefine; using (MetaDataQueryServiceClient _msc = new MetaDataQueryServiceClient()) { if (_msc.DelComputeFieldDefine(_selectedItem.ColumnName)) { this.gridView1.DeleteRow(this.gridView1.FocusedRowHandle); } else { XtraMessageBox.Show("删除收藏的计算项字段失败!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } else { XtraMessageBox.Show("请选择保存的记录", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } }