Exemplo n.º 1
0
        public ActionResult CustomerEventList(int eventId, string groupName)
        {
            //Get all customer events for this group and event
            CameleoCustomerEventListViewModel customerEventListViewModel = _customerEventService.GetCustomerEventListViewModel(eventId, groupName);
            CameleoEventViewModel             eventViewModel             = _eventService.GetEventViewModel(eventId);

            //Get remaining event users that did not answer
            var noAnswerEventUsers = _eventUserService.GetNoAnswerEventUsers(eventId, groupName);

            foreach (var tmpEventUser in noAnswerEventUsers.Reverse())
            {
                CameleoCustomerEventViewModel tmpCustomerEvent = new CameleoCustomerEventViewModel();

                tmpCustomerEvent.Id                   = -1;
                tmpCustomerEvent.EventUserId          = tmpEventUser.Id;
                tmpCustomerEvent.CustomerId           = -1;
                tmpCustomerEvent.CustomerUserName     = "";
                tmpCustomerEvent.Paid                 = false;
                tmpCustomerEvent.Accepted             = false;
                tmpCustomerEvent.AcceptedStatus       = (int)AcceptedStatus.ToBeCompleted;
                tmpCustomerEvent.AcceptedStatusString = _localizationService.GetResource(AcceptedStatusStrings.LocalizedStringValues[tmpCustomerEvent.AcceptedStatus]);
                tmpCustomerEvent.AcceptedImageUse     = false;
                tmpCustomerEvent.CameleoEvent         = eventViewModel;
                tmpCustomerEvent.CameleoEventUser     = new CameleoEventUserViewModel(tmpEventUser, 0, 0);
                customerEventListViewModel.CameleoCustomerEventList.Insert(0, tmpCustomerEvent);
            }

            //Return view
            return(PartialView("~/Plugins/Cameleo.CameleoEvents/Views/CameleoEvents/GroupDetails/CustomerEventList.cshtml", customerEventListViewModel));
        }
Exemplo n.º 2
0
        public ActionResult AddCustomerEventPopup(int eventId, string groupName)
        {
            var model = new AddCustomerEventViewModel();

            //Event
            model.CameleoEvent = _eventService.GetEventViewModel(eventId);

            //Get user events for this group
            model.CameleoEventUserList = _eventUserService.GetEventUserListViewModel(eventId, groupName);

            //Get customer events for this group
            model.CameleoCustomerEventList = _customerEventService.GetCustomerEventListViewModel(eventId, groupName);

            //Group name
            model.GroupName = groupName;

            return(View("~/Plugins/Cameleo.CameleoEvents/Views/Admin/CustomerEvent/AddCustomerEventPopup.cshtml", model));
        }
Exemplo n.º 3
0
        public ActionResult EventUserList(int eventId)
        {
            //Event model
            CameleoEventViewModel model = _eventService.GetEventViewModel(eventId);

            //Groups for editor
            ViewData["groups"] = model.Groups.ToList();

            //Return view
            return(View("~/Plugins/Cameleo.CameleoEvents/Views/Admin/EventUser/EventUserList.cshtml", model));
        }