예제 #1
0
 public ClientPrimitive CreateClient(IModalDialogService modalDialogService, IServiceFactory serviceFactory)
 {
     var viewModel = new UpdateClientViewModel(modalDialogService, serviceFactory);
       viewModel.Client = new ClientPrimitive();
       viewModel.DialogMode = DialogMode.Create;
       ModalDialogHelper<UpdateClient>.ShowDialog(viewModel);
       if (!viewModel.IsCanceled)
       {
     return viewModel.Client;
       }
       return null;
 }
예제 #2
0
 public ClientPrimitive EditClient(IModalDialogService modalDialogService, IServiceFactory serviceFactory, ClientPrimitive client)
 {
     var viewModel = new UpdateClientViewModel(modalDialogService, serviceFactory);
       viewModel.Client = client;
       viewModel.DialogMode = DialogMode.Update;
       ModalDialogHelper<UpdateClient>.ShowDialog(viewModel);
       return viewModel.Client;
 }