Esempio n. 1
0
        public async Task <IActionResult> CreateSop(long departmentId, SopViewModel model)
        {
            model.Document = await _documentRepository.Upsert(model.Document);

            model.DocumentVersion.DocumentId = model.Document.Id;

            await _documentVersionRepository.Upsert(model.DocumentVersion);

            return(RedirectToAction("Department", new { departmentId }));
        }
Esempio n. 2
0
        public async Task <IActionResult> CreateSop(long departmentId)
        {
            var result = new SopViewModel
            {
                Department = await _departmentRepository.GetById(departmentId),
                Document   = new Document
                {
                    DepartmentId = departmentId
                },
                DocumentVersion = new DocumentVersion {
                }
            };

            return(View(result));
        }