private void addParticpantButton_Click(object sender, RoutedEventArgs e)
        {
            // Instantiate the dialog box
            AddParticipant dlg = new AddParticipant
            {
                // Configure the dialog box
                Owner = this
            };

            // Open the dialog box modally
            var result = dlg.ShowDialog();

            if (result ?? false)
            {
                var name = dlg.ParticipantName;

                var control = new UIParticipantListItem(name);

                control.RemoveClicked += Control_RemoveClicked;

                this.participantStack.Children.Add(control);

                this.settings.Participants.Add(new RaiseHandParticipant()
                {
                    Name = name
                });
            }

            dlg.Close();
        }
        public async Task Handle(AddParticipant command)
        {
            var retrospective = await _store.GetById <Retrospective>(command.RetrospectiveId);

            retrospective.InviteAParticipant(command.ParticipantId);
            await _store.Save(retrospective, retrospective.Version);
        }
Example #3
0
        private void tspParcipantAdd_Click(object sender, EventArgs e)
        {
            AddParticipant addparticipant = AddParticipant.InstanceObject();

            addparticipant.MyParticipantInfoDataBindEvents += new AddParticipant.ParticipantInfoDataBindEvents(ParticipantInfoDataBind);
            addparticipant.Focus();   //让窗体获得焦点
            addparticipant.Show();    //显示窗体
        }
        public async Task <IActionResult> Put(Guid retrospectiveId, string participantId)
        {
            var retro = await _aggRepo.GetById <Retrospective>(retrospectiveId);

            var cmd = new AddParticipant(retrospectiveId, participantId);
            await _cmdSender.Send(cmd);

            return(RedirectToAction("Get", new { retrospectiveId = retrospectiveId }));
        }
Example #5
0
        public async Task <IActionResult> AddParticipant(AddParticipant newParticipant)
        {
            bool isAdded = await _eventService.AddParticipant(newParticipant.EventId, newParticipant.UserId);

            if (isAdded)
            {
                return(Ok(new { Status = "OK", Message = "Poprawnie dołączono do eventu" }));
            }
            return(Ok(new { Status = "Exists", Message = "Już jesteś zapisany na to wydażenie" }));
        }