/// <summary>
        /// 删除会议室
        /// </summary>
        /// <param name="roomInformationDeleteViewModel"></param>
        /// <returns></returns>
        public List <int> Room_Delete(RoomInformationDeleteViewModel roomInformationDeleteViewModel)
        {
            List <int> DeleteRowsNum = _IRoomInformationRepository
                                       .DeleteByRoomidList(roomInformationDeleteViewModel.DeleteIdList);

            return(DeleteRowsNum);
        }
Beispiel #2
0
        public ActionResult <RoomInformationDeleteResModel> Manage_Room_Delete(RoomInformationDeleteViewModel roomInformationDeleteViewModel)
        {
            RoomInformationDeleteResModel roomInformationDeleteResModel = new RoomInformationDeleteResModel();
            List <int> DeleteResult = _RoomInformationService.Room_Delete(roomInformationDeleteViewModel);

            if (DeleteResult[1] == roomInformationDeleteViewModel.DeleteIdList.Count)
            {
                roomInformationDeleteResModel.DeleteCount                = DeleteResult[1];
                roomInformationDeleteResModel.IsSuccess                  = true;
                roomInformationDeleteResModel.baseViewModel.Message      = "删除成功";
                roomInformationDeleteResModel.baseViewModel.ResponseCode = 200;
                _ILogger.Information("删除会议室成功");
                return(Ok(roomInformationDeleteResModel));
            }
            else
            {
                roomInformationDeleteResModel.DeleteCount                = DeleteResult[1];
                roomInformationDeleteResModel.DeleteFalseCount           = DeleteResult[0];
                roomInformationDeleteResModel.IsSuccess                  = false;
                roomInformationDeleteResModel.baseViewModel.Message      = "删除会议室成功" + DeleteResult[1] + "条数据;" + DeleteResult[0] + "条数据因预定未能删除";
                roomInformationDeleteResModel.baseViewModel.ResponseCode = 400;
                _ILogger.Information("删除会议室成功" + DeleteResult[1] + "条数据;" + DeleteResult[0] + "条数据因预定未能删除");
                return(Ok(roomInformationDeleteResModel));
            }
        }