Ejemplo n.º 1
0
 /// <summary>
 /// 清除任务
 /// </summary>
 private bool ClearTask()
 {
     if (this.CurrentTask != null)
     {
         using (MetaDataQueryServiceClient _msc = new MetaDataQueryServiceClient())
         {
             if (_msc.ClearQueryTask(this.CurrentTask.TaskID))
             {
                 XtraMessageBox.Show(string.Format("查询任务\"{0}\"记录已经被清除!", this.CurrentTask.TaskName), "系统提示",
                                     MessageBoxButtons.OK, MessageBoxIcon.Information);
                 this.gridView1.BeginUpdate();
                 this._taskList.Remove(this.CurrentTask);
                 this.gridView1.EndDataUpdate();
                 RaiseMenuChanged();
                 return(true);
             }
             else
             {
                 return(false);
             }
         }
     }
     else
     {
         return(false);
     }
 }