コード例 #1
0
        public async Task <int> UpdateStatus(string id, EventDayStatus status)
        {
            var info = await _accompanyPersonRepository.GetAsync(false, x => x.Id == id);

            if (info == null)
            {
                return(-1);
            }

            info.Status = status;
            return(await Context.SaveChangesAsync());
        }
コード例 #2
0
        public async Task <int> UpdateStatus(string eventDayId, string registerId, EventDayStatus status)
        {
            var info = await _eventDayRegisterRepository.GetAsync(false, x => x.RegisterId == registerId && x.EventDayId == eventDayId);

            if (info == null)
            {
                return(-1);
            }

            info.Status = status;
            return(await Context.SaveChangesAsync());
        }
コード例 #3
0
        public async Task <ActionResultResponse> UpdateStatusAccompanyPerson(string eventId, string id, EventDayStatus status)
        {
            var infoEvent = await _eventRepository.GetInfo(eventId);

            if (infoEvent == null)
            {
                return(new ActionResultResponse(-1,
                                                _websiteEventResourceService.GetString("Event does not exists. Please try again.")));
            }

            await _accompanyPersonRepository.UpdateStatus(id, status);

            return(new ActionResultResponse(1, _websiteEventResourceService.GetString("Update status successful.")));
        }
コード例 #4
0
        public async Task <IActionResult> UpdateAccompanyPersons(string id, string accompanyPersonId, EventDayStatus status)
        {
            var result = await _registerService.UpdateStatusAccompanyPerson(id, accompanyPersonId, status);

            if (result.Code <= 0)
            {
                return(BadRequest(result));
            }

            return(Ok(result));
        }
コード例 #5
0
        public async Task <IActionResult> UpdateEventDayRegisterStatus(string id, string eventDayId, string registerId, EventDayStatus status)
        {
            var result = await _registerService.UpdateStatusEventDayRegister(id, eventDayId, registerId, status);

            if (result.Code <= 0)
            {
                return(BadRequest(result));
            }

            return(Ok(result));
        }