public void MoveToNext(Yw_SubjectProcess process) { SubjectProcessService.Insert(process); IEnumerable <Yw_SubjectIndex> subjectIdnexes = SubjectIndexService.GetSubjectIndexBySubject(process.Ysp_SubjectId); foreach (var item in subjectIdnexes) { item.EnableAudit(); item.Ysi_Status = process.Ysp_Status; SubjectIndexService.Update(item); } }
public IList <Yw_Subject> GetSubjects(DtoQuestionSearch search) { if (search.Id != 0) { return(SubjectService.GetSubjectsById(search)); } if (!string.IsNullOrWhiteSpace(search.Keyword)) { IList <int> subjectIds = SubjectIndexService.GetSubjectIdsByKeyword(search); return(SubjectService.GetSubjectsByIds(subjectIds)); } return(SubjectService.GetByPage(search)); }
public void InsertKeywords(IEnumerable <Yw_SubjectIndex> keywordsToAdd) { SubjectIndexService.Insert(keywordsToAdd); }
public IEnumerable <Yw_SubjectIndex> GetKeywordsBySubject(int id) { return(SubjectIndexService.GetSubjectIndexBySubject(id)); }
public void DeleteKeywords(IEnumerable <int> keywordIdsToDelete) { SubjectIndexService.Delete(keywordIdsToDelete); }