public GetAccountId ( string account ) : System.Guid | ||
account | string | The account. |
리턴 | System.Guid |
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }