This commit is contained in:
Paul Schneider 2026-07-04 19:49:48 +01:00
commit 34b4203cd1
10 changed files with 152 additions and 6 deletions

View file

@ -50,7 +50,7 @@ namespace Yavsc.Controllers
private void SetViewBag(CommandForm commandForm = null)
{
ViewBag.ActivityCode = new SelectList(_context.Activities, "Code", "Name", commandForm?.ActivityCode);
ViewBag.ActionName = _context.CommandForm.Select(c => new SelectListItem { Value = c.Id.ToString(), Text = c.Title, Selected = commandForm.Id == c.Id });
ViewBag.ActionName = new SelectList(_context.CommandForm, nameof(CommandForm.Id), nameof(CommandForm.Title), commandForm?.Id);
}
// POST: CommandForms/Create
[HttpPost]