Exemplo n.º 1
0
 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;
     }
 }