Esempio n. 1
0
        public Status update(UpdateMeetingPlace meetingPlace)
        {
            MeetingPlaceDAO             meetingPlaceDao = Factory.getInstance <MeetingPlaceDAO>();
            Dictionary <string, object> setlist         = new Dictionary <string, object>();

            setlist.Add("meetingPlaceName", meetingPlace.meetingPlaceName);
            setlist.Add("meetingPlaceCapacity", meetingPlace.meetingPlaceCapacity);

            if (meetingPlaceDao.update(setlist, meetingPlace.meetingPlaceID) < 0)
            {
                return(Status.NAME_EXIST);
            }

            return(Status.SUCCESS);
        }
Esempio n. 2
0
        public Status UpdateUserAvailable(int meetingPlaceID, int available)
        {
            //检查参数
            if (meetingPlaceID < 0 ||
                (available != 0 && available != 1))
            {
                return(Status.ARGUMENT_ERROR);
            }

            //数据库操作
            Dictionary <string, object> setlist = new Dictionary <string, object>();

            MeetingPlaceDAO meetingPlaceDao = Factory.getInstance <MeetingPlaceDAO>();

            setlist.Add("meetingPlaceState", available);

            if (meetingPlaceDao.update(setlist, meetingPlaceID) < 0)
            {
                return(Status.FAILURE);
            }
            return(Status.SUCCESS);
        }