public async Task <IActionResult> CreateDocument(SimpleDocumentModel simpleModel)
        {
            var model = await _documentViewModelService.PrepareDocumentModel(null, null, simpleModel);

            //ACL
            await model.PrepareACLModel(null, false, _customerService);

            //Stores
            await model.PrepareStoresMappingModel(null, _storeService, false, "");

            return(View(model));
        }
Example #2
0
        public async Task <IActionResult> CreateDocument(SimpleDocumentModel simpleModel)
        {
            var model = await _documentViewModelService.PrepareDocumentModel(null, null, simpleModel);

            if (!string.IsNullOrEmpty(simpleModel.CustomerId))
            {
                model.CustomerEmail = (await _customerService.GetCustomerById(simpleModel.CustomerId))?.Email;
            }

            //ACL
            await model.PrepareACLModel(null, false, _customerService);

            //Stores
            await model.PrepareStoresMappingModel(null, _storeService, false, "");

            return(View(model));
        }
Example #3
0
        public async Task <IActionResult> CreateDocument(SimpleDocumentModel simpleModel)
        {
            var model = await _documentViewModelService.PrepareDocumentModel(null, null, simpleModel);

            return(View(model));
        }