Beispiel #1
0
        public void SendMessage(string identityNameFrom, string identityNameTo, string theme, string message)
        {
            Message messenger = new Message(GetAccount(identityNameFrom)
                                            , GetAccount(identityNameTo)
                                            , theme, message);

            _messageRepository.Add(messenger);
        }
Beispiel #2
0
        public bool RegToFacultative(Student student, Guid id)
        {
            _logRepository.Add(new Log(GetType().ToString(), "Reg", LogStatus.info, "RegToFacultative", student.FullName));

            if (student.RegistrFacultatives.Where(s => s.Id == id).Count() > 0)
            {
                return(false);
            }
            else
            {
                student.RegistrFacultatives.Add(_facultativeRepository.Get(id));
                _studentRepository.Save();
                return(true);
            }
        }
Beispiel #3
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);
        }
Beispiel #4
0
        public void CreateTeacher(User user, string firstName, string secondName, int age, DateTime birthDate)
        {
            _logRepository.Add(new Log(GetType().ToString(), "Add", LogStatus.info, "CreateTeacher", user.Email));

            _teacherRepository.Add(new Teacher(user, firstName, secondName, age, birthDate));
        }
Beispiel #5
0
        public void AddFacultative(Facultative facultative, Teacher teacher)
        {
            _facultativeRepository.Add(facultative);

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