///zfc /// <summary> /// 根据外键训练课程id完成训练活动,把is_complete标志位置为0,current_turn_number置为0 /// </summary> /// <param name="trainingcourseid"></param> /// <param name="complete"></param> /// <returns></returns> public int UpdateCompleteFinish(int trainingcourseid, int complete) { UploadManagementDAO uploadManagementDao = new UploadManagementDAO(); List <long> listId = new List <long>(); //通过memberId获取主键id listId = activityDAO.ListIdByfkTrainingCourseId(trainingcourseid); foreach (var id in listId) { //数据上传 uploadManagementDao.Insert(new UploadManagement(id, "bdl_activity", 1)); } return(activityDAO.UpdateCompleteFinish(trainingcourseid, complete)); }