Exemplo n.º 1
0
 public ContractorPrimitive CreateContractor(IModalDialogService modalDialogService, IServiceFactory serviceFactory)
 {
     var viewModel = new UpdateContractorViewModel(modalDialogService, serviceFactory);
       viewModel.Contractor = new ContractorPrimitive();
       viewModel.DialogMode = DialogMode.Create;
       ModalDialogHelper<UpdateContractor>.ShowDialog(viewModel);
       if (!viewModel.IsCanceled)
       {
     return viewModel.Contractor;
       }
       return null;
 }
Exemplo n.º 2
0
 public ContractorPrimitive EditContractor(IModalDialogService modalDialogService, IServiceFactory serviceFactory,
     ContractorPrimitive contractorToEdit)
 {
     var viewModel = new UpdateContractorViewModel(modalDialogService, serviceFactory);
       viewModel.Contractor = contractorToEdit;
       viewModel.DialogMode = DialogMode.Update;
       ModalDialogHelper<UpdateContractor>.ShowDialog(viewModel);
       return viewModel.Contractor;
 }