Ejemplo n.º 1
0
        public async Task <IActionResult> Rename(RenameProjectCommand command)
        {
            if (await Mediator.Send(command) != null)
            {
                return(Json(new { id = command.Id, name = command.Name }));
            }

            return(BadRequest());
        }
Ejemplo n.º 2
0
        private void OnProjectRenameClick(object sender, RoutedEventArgs e)
        {
            string projName;

            if (InputBox.Show("Input project caption", project.Caption, out projName) == true &&
                projName != project.Caption)
            {
                RenameProjectCommand renameProjectCommand = RenameProjectCommandFactory.Factory().Create(project.GetModelController()) as RenameProjectCommand;
                renameProjectCommand.Set(project, projName);
                renameProjectCommand.Execute();
            }
        }