Ejemplo n.º 1
0
 public MaterialAndContractorsPackage EditMaterial(IModalDialogService modalDialogService, IServiceFactory serviceFactory,
     MaterialAndContractorsPackage selectedMaterial)
 {
     var viewModel = new UpdateMaterialViewModel(modalDialogService, serviceFactory);
       viewModel.MaterialAndContractors = selectedMaterial;
       viewModel.DialogMode = DialogMode.Update;
       ModalDialogHelper<UpdateMaterial>.ShowDialog(viewModel);
       return viewModel.MaterialAndContractors;
 }
Ejemplo n.º 2
0
 public MaterialAndContractorsPackage CreateMaterial(IModalDialogService modalDialogService, IServiceFactory serviceFactory)
 {
     var viewModel = new UpdateMaterialViewModel(modalDialogService, serviceFactory);
       viewModel.MaterialAndContractors = new MaterialAndContractorsPackage();
       viewModel.MaterialAndContractors.Material = new MaterialPrimitive();
       viewModel.DialogMode = DialogMode.Create;
       ModalDialogHelper<UpdateMaterial>.ShowDialog(viewModel);
       if (!viewModel.IsCanceled)
       {
     return viewModel.MaterialAndContractors;
       }
       return null;
 }