Пример #1
0
        public ReportBook CreateReportBook(string name, Facultative facultative)
        {
            if (facultative.Log != null)
            {
                return(facultative.Log);
            }

            _logRepository.Add(new Log(GetType().ToString(), "Add", LogStatus.info, "CreateReportBook", facultative.Name));

            ReportBook reportBook = new ReportBook(name, facultative);

            _reportBookRepository.Add(reportBook);

            facultative.Log = reportBook;

            ChangeStateEntity(facultative);

            return(reportBook);
        }
Пример #2
0
 public Facultative GetFacultative(Facultative facultative)
 {
     return(_facultativeRepository.Get(facultative.Id));
 }
Пример #3
0
        public void AddFacultative(Facultative facultative, Teacher teacher)
        {
            _facultativeRepository.Add(facultative);

            _logRepository.Add(new Log(GetType().ToString(), "Add", LogStatus.info, "AddFacultative", facultative.Name));
        }
Пример #4
0
 public void DeleteFacultative(Facultative facultative)
 {
     _logRepository.Add(new Log(GetType().ToString(), "Delete", LogStatus.info, "DeleteFacultative", facultative.Name));
     _facultativeRepository.Remove(facultative);
 }
Пример #5
0
 public ReportBook(string name, Facultative elective)
 {
     Name     = name;
     Elective = elective;
 }