private void Recycle() { string Result = "T"; string id = Request["id"]; IList <ExamineTask> etEnts = ExamineTask.FindAllByProperty(ExamineTask.Prop_ProjectId, id); foreach (ExamineTask etEnt in etEnts) { IList <ExamineOpinion> eoEnts = ExamineOpinion.FindAllByProperty(ExamineOpinion.Prop_ExamineTaskId, etEnt.Id); if (eoEnts.Count > 0) { Result = "F"; break; } } if (Result == "T") { ExamineTask.DeleteAll("ProjectId='" + id + "'"); pEnt = Project.Find(id); pEnt.Status = "已创建"; pEnt.TaskQuan = 0; pEnt.DoUpdate(); } Response.Write("{success: true ,Result:'" + Result + "'}"); Response.End(); }