Exemplo n.º 1
0
        public ActionResult Add_organizor()
        {
            MeetingPlaceService           meetingPlaceService = new MeetingPlaceService();
            List <MeetingPlaceForMeeting> meetingPlaces       = null;

            meetingPlaceService.getAllForMeeting(out meetingPlaces);

            MeetingInfo meeting = new MeetingInfo();

            meeting.meetingToStartTime = DateTime.Now.AddDays(1);
            meeting.meetingStartedTime = DateTime.Now.AddDays(2);

            UserService            userService = new UserService();
            List <UserForDelegate> users       = new List <UserForDelegate>();

            userService.getAllForDelegate(out users);

            ShowMeetingModel model = new ShowMeetingModel
            {
                meeting       = meeting,
                meetingPlaces = meetingPlaces,
                users         = users
            };

            return(View(model));
        }
Exemplo n.º 2
0
        public JsonResult UpdateMeetingPlace(UpdateMeetingPlace meetingPlace)
        {
            if (ModelState.IsValid)
            {
                //调用会场服务
                Status status = new MeetingPlaceService().update(meetingPlace);
                return(Json(new RespondModel(status, ""), JsonRequestBehavior.AllowGet));
            }

            return(Json(new RespondModel(Status.ARGUMENT_ERROR, ModelStateHelper.errorMessages(ModelState)), JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 3
0
        public JsonResult CreateMeetingPlace(CreateMeetingPlace meetingPlace)
        {
            if (ModelState.IsValid)
            {
                //调用会场服务
                int    meetingPlaceID;
                Status status = new MeetingPlaceService().create(meetingPlace, out meetingPlaceID);
                return(Json(new RespondModel(status, meetingPlaceID), JsonRequestBehavior.AllowGet));
            }

            return(Json(new RespondModel(Status.ARGUMENT_ERROR, ModelStateHelper.errorMessages(ModelState)), JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 4
0
        public JsonResult UpdateMeetingPlaceAvailable(int meetingPlaceID, int state) //state对应数据库中的available字段
        {
            RespondModel respond = new RespondModel();

            Status status = new MeetingPlaceService().UpdateUserAvailable(meetingPlaceID, state);

            respond.Code    = (int)status;
            respond.Message = Message.msgs[respond.Code];
            respond.Result  = "";

            return(Json(respond, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 5
0
        public JsonResult GetMeetingPlacesForMeeting()
        {
            RespondModel respond = new RespondModel();
            //调用会场服务
            List <MeetingPlaceForMeeting> list = null;
            Status status = new MeetingPlaceService().getAllForMeeting(out list);

            respond.Code    = (int)status;
            respond.Message = Message.msgs[respond.Code];
            respond.Result  = list;

            return(Json(respond, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 6
0
        public JsonResult GetMeetingPlaceForUpdate(int meetingPlaceID)
        {
            RespondModel respond = new RespondModel();

            UpdateMeetingPlace meetingPlace;
            //调用设备服务
            Status status = new MeetingPlaceService().getOneForUpdate(out meetingPlace, meetingPlaceID);

            respond.Code    = (int)status;
            respond.Message = Message.msgs[respond.Code];
            respond.Result  = meetingPlace;

            return(Json(respond, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 7
0
        public JsonResult GetMeetingPlaces()
        {
            RespondModel respond = new RespondModel();

            List <MeetingPlace> meetingPlaces = null;
            //调用会场服务
            Status status = new MeetingPlaceService().getAll(out meetingPlaces);

            respond.Code    = (int)status;
            respond.Message = Message.msgs[respond.Code];
            respond.Result  = meetingPlaces;

            return(Json(respond, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 8
0
        public ActionResult Edit_organizor(int meetingID)
        {
            MeetingPlaceService           meetingPlaceService = new MeetingPlaceService();
            List <MeetingPlaceForMeeting> meetingPlaces       = null;

            meetingPlaceService.getAllForMeeting(out meetingPlaces);

            MeetingInfo    meeting        = null;
            MeetingService meetingService = new MeetingService();

            meetingService.getOne(meetingID, out meeting);

            EditMeetingModel model = new EditMeetingModel
            {
                meeting       = meeting,
                meetingPlaces = meetingPlaces
            };

            Session["meetingID"] = meetingID;

            return(View(model));
        }
Exemplo n.º 9
0
        public ActionResult Show_organizor(int meetingID)
        {
            Status status = Status.SUCCESS;

            MeetingService meetingService = new MeetingService();
            MeetingInfo    meeting        = null;

            status = meetingService.getOne(meetingID, out meeting);

            AgendaService     agendaService = new AgendaService();
            List <AgendaInfo> agendas       = null;

            status = agendaService.getAll(meetingID, out agendas);

            DelegateService     delegateService = new DelegateService();
            List <DelegateInfo> delegates       = null;

            status = delegateService.getAll(meetingID, out delegates);

            MeetingPlaceService           meetingPlaceService = new MeetingPlaceService();
            List <MeetingPlaceForMeeting> meetingPlaces       = null;

            status = meetingPlaceService.getAllForMeeting(out meetingPlaces);

            ShowMeetingItemModel model = new ShowMeetingItemModel
            {
                meeting       = meeting,
                agendas       = agendas,
                delegates     = delegates,
                meetingPlaces = meetingPlaces
            };

            Session["meetingID"] = meetingID;

            return(View(model));
        }