mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Implement edit page for document companies.
This commit is contained in:
@@ -80,8 +80,11 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
if(id == null) return NotFound();
|
||||
|
||||
DocumentCompany documentCompany = await _context.DocumentCompanies.FindAsync(id);
|
||||
|
||||
if(documentCompany == null) return NotFound();
|
||||
|
||||
ViewData["CompanyId"] = new SelectList(_context.Companies.OrderBy(c => c.Name).Select(c => new {c.Id, c.Name}), "Id", "Name", documentCompany.CompanyId);
|
||||
|
||||
return View(documentCompany);
|
||||
}
|
||||
|
||||
@@ -111,6 +114,8 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
ViewData["CompanyId"] = new SelectList(_context.Companies.OrderBy(c => c.Name).Select(c => new {c.Id, c.Name}), "Id", "Name", documentCompany.CompanyId);
|
||||
|
||||
return View(documentCompany);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user