Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
 public void InsertKeywords(IEnumerable <Yw_SubjectIndex> keywordsToAdd)
 {
     SubjectIndexService.Insert(keywordsToAdd);
 }
Esempio n. 4
0
 public IEnumerable <Yw_SubjectIndex> GetKeywordsBySubject(int id)
 {
     return(SubjectIndexService.GetSubjectIndexBySubject(id));
 }
Esempio n. 5
0
 public void DeleteKeywords(IEnumerable <int> keywordIdsToDelete)
 {
     SubjectIndexService.Delete(keywordIdsToDelete);
 }