Ejemplo n.º 1
0
        //修改赛事状态
        public bool EditEventStatus(int eventId, EventStatusEm eventStatus, int memberId, out string msg)
        {
            bool flag = false;

            msg = string.Empty;
            try
            {
                t_event tevent = _dbContext.Get <t_event>(eventId);
                if (tevent != null)
                {
                    tevent.updatetime  = DateTime.Now;
                    tevent.eventStatus = eventStatus;
                    _dbContext.Update(tevent);
                    flag = true;
                }
                else
                {
                    msg = "未找到赛事信息";
                }
            }
            catch (Exception ex)
            {
                flag = false;
                msg  = "服务异常";
                LogUtils.LogError("EventService.EditEventStatus", ex);
            }
            return(flag);
        }
Ejemplo n.º 2
0
        public ContentResult editeventstatus(int id, EventStatusEm eventStatus)
        {
            string msg  = string.Empty;
            var    flag = _eventService.EditEventStatus(id, eventStatus, UserContext.WebUserContext.Id, out msg);

            return(Result <string>(flag, msg));
        }