GetAccountId() публичный Метод

Returns the account identifier.
public GetAccountId ( string account ) : System.Guid
account string The account.
Результат System.Guid
Пример #1
0
        /// <summary>
        /// Deletes a subject.
        /// </summary>
        /// <param name="idToDelete">The identifier.</param>
        /// <returns>The result.</returns>
        public ResultDto DeleteSubject(IdDto idToDelete)
        {
            this.SetResponseHeaderCacheExpiration();

            AccountPassword credentials = this.GetCredentialsFromRequest();
            AccountServerService accountService = new AccountServerService();
            Guid accountId = accountService.GetAccountId(credentials.Account);

            SubjectServerService service = new SubjectServerService();
            return service.DeleteSubject(idToDelete.Id, accountId);
        }
Пример #2
0
        /// <summary>
        /// Updates a teacher.
        /// </summary>
        /// <param name="itemToSave">The item to save.</param>
        /// <returns>The result.</returns>
        public ResultDto UpdateTeacher(TeacherEditDto itemToSave)
        {
            this.SetResponseHeaderCacheExpiration();

            AccountPassword credentials = this.GetCredentialsFromRequest();
            AccountServerService accountService = new AccountServerService();
            Guid accountId = accountService.GetAccountId(credentials.Account);

            TeacherServerService service = new TeacherServerService();
            return service.UpdateTeacher(itemToSave, accountId);
        }
Пример #3
0
        /// <summary>
        /// Inserts a subject.
        /// </summary>
        /// <param name="itemToSave">The item to save.</param>
        /// <returns>The result.</returns>
        public ResultDto InsertSubject(SubjectEditDto itemToSave)
        {
            this.SetResponseHeaderCacheExpiration();

            AccountPassword credentials = this.GetCredentialsFromRequest();
            AccountServerService accountService = new AccountServerService();
            Guid accountId = accountService.GetAccountId(credentials.Account);

            SubjectServerService service = new SubjectServerService();
            return service.InsertSubject(itemToSave, accountId);
        }
Пример #4
0
        /// <summary>
        /// Returns the teacher lookup.
        /// </summary>
        /// <returns>The teacher lookup.</returns>
        public List<TeacherLookupDto> GetTeacherLookup()
        {
            this.SetResponseHeaderCacheExpiration();

            AccountPassword credentials = this.GetCredentialsFromRequest();
            AccountServerService accountService = new AccountServerService();
            Guid accountId = accountService.GetAccountId(credentials.Account);

            TeacherServerService service = new TeacherServerService();
            return service.GetTeacherLookup(accountId);
        }
Пример #5
0
        /// <summary>
        /// Returns the lessons of a week.
        /// </summary>
        /// <returns>The lessons.</returns>
        public List<LessonEditDto> GetLessonOfWeek()
        {
            this.SetResponseHeaderCacheExpiration();

            AccountPassword credentials = this.GetCredentialsFromRequest();
            AccountServerService accountService = new AccountServerService();
            Guid accountId = accountService.GetAccountId(credentials.Account);

            LessonServerService service = new LessonServerService();
            return service.GetLessonsOfWeek(accountId);
        }
Пример #6
0
        /// <summary>
        /// Returns the lesson of a day to display.
        /// </summary>
        /// <param name="id">The day identifier.</param>
        /// <returns>The lessons.</returns>
        public List<LessonDisplayDto> GetLessonOfDayToDisplay(string id)
        {
            this.SetResponseHeaderCacheExpiration();

            AccountPassword credentials = this.GetCredentialsFromRequest();
            AccountServerService accountService = new AccountServerService();
            Guid accountId = accountService.GetAccountId(credentials.Account);

            LessonServerService service = new LessonServerService();
            return service.GetLessonsOfDayToDisplay(new Guid(id), accountId);
        }