reorg
This commit is contained in:
parent
d000f77098
commit
40e8e08690
3487 changed files with 39 additions and 21 deletions
|
|
@ -1,24 +0,0 @@
|
|||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.Helpers {
|
||||
public static class ListItemHelpers {
|
||||
|
||||
public static List<SelectListItem> ActivityItems(
|
||||
this ApplicationDbContext _dbContext, List<UserActivity> activity)
|
||||
{
|
||||
var activities = activity.ToArray();
|
||||
|
||||
List<SelectListItem> items = _dbContext.Activities.Select(
|
||||
x=> new SelectListItem() {
|
||||
Value = x.Code, Text = x.Name, Selected = activities.Any(a=>a.DoesCode == x.Code)
|
||||
} ).ToList();
|
||||
|
||||
return items;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue