Exemplo n.º 1
0
 public void GiveItem()
 {
     if (UoW.IsNew && !Save())
     {
         return;
     }
     navigation.OpenViewModel <ExpenseObjectViewModel, IEntityUoWBuilder, Subdivision>(this, EntityUoWBuilder.ForCreate(), Entity);
 }
Exemplo n.º 2
0
 public void GiveWearByNorm()
 {
     if (!employeeViewModel.Save())
     {
         return;
     }
     navigation.OpenViewModel <ExpenseEmployeeViewModel, IEntityUoWBuilder, EmployeeCard>(employeeViewModel, EntityUoWBuilder.ForCreate(), Entity);
 }
        public void CreateDocumentDialog(DialogViewModelBase master, StokDocumentType documentType)
        {
            switch (documentType)
            {
            case StokDocumentType.TransferDoc:
                navigation.OpenViewModel <WarehouseTransferViewModel, IEntityUoWBuilder>(master, EntityUoWBuilder.ForCreate());
                break;

            case StokDocumentType.CollectiveExpense:
                navigation.OpenViewModel <CollectiveExpenseViewModel, IEntityUoWBuilder>(master, EntityUoWBuilder.ForCreate());
                break;

            case StokDocumentType.ExpenseEmployeeDoc:
                navigation.OpenViewModel <ExpenseEmployeeViewModel, IEntityUoWBuilder>(master, EntityUoWBuilder.ForCreate());
                break;

            case StokDocumentType.ExpenseObjectDoc:
                navigation.OpenViewModel <ExpenseObjectViewModel, IEntityUoWBuilder>(master, EntityUoWBuilder.ForCreate());
                break;

            case StokDocumentType.IncomeDoc:
                navigation.OpenTdiTab <Dialogs.Stock.IncomeDocDlg>(master);
                break;

            case StokDocumentType.WriteoffDoc:
                navigation.OpenViewModel <WriteOffViewModel, IEntityUoWBuilder>(master, EntityUoWBuilder.ForCreate());
                break;

            case StokDocumentType.Completion:
                navigation.OpenViewModel <CompletionViewModel, IEntityUoWBuilder>(master, EntityUoWBuilder.ForCreate());
                break;

            default:
                throw new NotSupportedException($"Тип документа {documentType} не поддерживается.");
            }
        }