示例#1
0
        /// <summary>
        /// 删除会议室
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task MeetingRoomDeleteByIdAsync(MeetingRoomEditDto input)
        {
            var entity = await _meetingroomRepository.GetAsync(input.Id.Value);

            input.MapTo(entity);
            entity.IsDeleted     = true;
            entity.DeletionTime  = DateTime.Now;
            entity.DeleterUserId = AbpSession.UserId;
            await _meetingroomRepository.UpdateAsync(entity);
        }
示例#2
0
        /// <summary>
        /// 编辑MeetingRoom
        /// </summary>
        protected virtual async Task <MeetingRoomEditDto> UpdateMeetingRoomAsync(MeetingRoomEditDto input)
        {
            //TODO:更新前的逻辑判断,是否允许更新
            var entity = await _meetingroomRepository.GetAsync(input.Id.Value);

            input.MapTo(entity);

            // ObjectMapper.Map(input, entity);
            var result = await _meetingroomRepository.UpdateAsync(entity);

            return(result.MapTo <MeetingRoomEditDto>());
        }