Example #1
0
 /// <summary>
 /// 删除数据方法
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 private bool deleteData(int id)
 {
     try
     {
         BLL.WORKFLOWSET workflowsetbll = new BLL.WORKFLOWSET();
         int             recordCount    = workflowsetbll.GetRecordCount("workflowno = " + id.ToString());
         if (recordCount > 0)
         {
             MessageBox.Show("该工作节点信息已经被使用,不能被删除!", "提示信息");
             return(false);
         }
         else
         {
             BLL.WORKNODE worknodebll = new BLL.WORKNODE();
             worknodebll.Delete(id);
             return(true);
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show("删除失败!", exception.Message);
         return(false);
     }
 }