示例#1
0
 public async Task DeleteAsync(Interview interview)
 {
     ThrowIfDisposed();
     if (interview == null)
     {
         throw new ArgumentNullException(nameof(interview));
     }
     await InterviewStore.DeleteAsync(interview, CancellationToken);
 }
示例#2
0
 public async Task <Interview> UpdateAsync(Interview interview)
 {
     ThrowIfDisposed();
     if (interview == null)
     {
         throw new ArgumentNullException(nameof(interview));
     }
     return(await InterviewStore.UpdateAsync(interview, CancellationToken));
 }
示例#3
0
        public async Task CancelAsync(Interview interview)
        {
            ThrowIfDisposed();
            if (interview == null)
            {
                throw new ArgumentNullException(nameof(interview));
            }

            interview.Status = InterviewStatus.Cancel;
            interview.Remark = "已取消预约";
            await InterviewStore.UpdateAsync(interview, CancellationToken);
        }
示例#4
0
        public async Task ChangeAsync(Interview interview)
        {
            ThrowIfDisposed();
            if (interview == null)
            {
                throw new ArgumentNullException(nameof(interview));
            }

            if (interview.Status != InterviewStatus.Arrived)
            {
                interview.VisitedTime = DateTime.MinValue;
            }

            await InterviewStore.UpdateAsync(interview, CancellationToken);
        }