Example #1
0
        ITicketDialogViewModel CreateViewModel(ITicketListItemViewModel parameter, ITicketDetailsView view)
        {
            var closeCommand = closeCommandFactory.Create(view);

            var ticket      = ticketRepository.GetAll().FirstOrDefault(p => p.Id == parameter.Id);
            var saveCommand = saveTicketCommandFactory.Create(ticket, view);
            var viewModel   = ticketDialogViewModelFactory.Create(ticket, closeCommand, saveCommand,
                                                                  Strings.TicketDetails.EditHeaderText);

            return(viewModel);
        }
Example #2
0
 ITicketDialogViewModel CreateViewModel(Ticket model, ICloseCommand closeCommand,
                                        ISaveTicketCommand saveTicketCommand)
 {
     return(viewModelFactory.Create(model, closeCommand, saveTicketCommand, Strings.TicketDetails.AddHeaderText));
 }