/// <summary> /// 删除该流程 /// </summary> public void Remove() { ISqlMapper mapper = MapperHelper.GetMapper(); WorkflowDao wfdao = new WorkflowDao(mapper); ActivityDao activitydao = new ActivityDao(mapper); LinkDao linkDao = new LinkDao(mapper); ActivityAuthDao authdao = new ActivityAuthDao(mapper); ApprovalDao approvalDao = new ApprovalDao(mapper); TaskDao taskdao = new TaskDao(mapper); string id = this.value.ID; var activities = activitydao.Query(new ActivityQueryForm { WorkflowID = id }); taskdao.Delete(new TaskQueryForm { WorkflowID = id }); wfdao.Delete(new WorkflowQueryForm { ID = id }); activitydao.Delete(new ActivityQueryForm { WorkflowID = id }); linkDao.Delete(new LinkQueryForm { WorkflowID = id }); approvalDao.Delete(new ApprovalQueryForm { WorkflowID = id }); authdao.Delete(new ActivityAuthQueryForm { WorkflowID = id }); }
/// <summary> /// 删除该流程 /// </summary> public void Remove() { ISqlMapper mapper = MapperHelper.GetMapper(); WorkflowDao wfdao = new WorkflowDao(mapper); ActivityDao activitydao = new ActivityDao(mapper); LinkDao linkDao = new LinkDao(mapper); ActivityAuthDao authdao = new ActivityAuthDao(mapper); ApprovalDao approvalDao = new ApprovalDao(mapper); TaskDao taskdao = new TaskDao(mapper); string id = this.value.ID; var activities = activitydao.Query(new ActivityQueryForm { WorkflowID = id }); taskdao.Delete(new TaskQueryForm { WorkflowID = id }); wfdao.Delete(new WorkflowQueryForm { ID = id }); activitydao.Delete(new ActivityQueryForm { WorkflowID = id }); linkDao.Delete(new LinkQueryForm { WorkflowID = id }); approvalDao.Delete(new ApprovalQueryForm { WorkflowID = id }); authdao.Delete(new ActivityAuthQueryForm { WorkflowID = id }); }
public ActionResult DeleteConfirmed(int id) { dao.Delete(dao.Get(id)); return(RedirectToAction("Index")); }