在MVC4中添加复选框

时间:2014-05-24 03:12:27

标签: asp.net-mvc-4 checkboxfor

我搜索过,无法在我的视图中找到显示复选框的方法。我有2个实体:Assignment和Chore,这是一对多的关系(一个任务,许多家务)

public class Chore
{
    public System.Guid ChoreId { get; set; }
    public string ChoreName { get; set; }
    public string Description { get; set; }
    public int PointValue { get; set; }
}

public class Assignment
{
    public int AssignmentId { get; set; }
    public System.Guid RecipientId { get; set; }
    public Nullable<bool> Completed { get; set; }
    public System.DateTime AssignedDate { get; set; }
    public Nullable<System.DateTime> CompletedDate { get; set; }

    public virtual IEnumerable<Chore> Chores { get; set; }
}

如何在每次创建作业时显示所有可能的杂项列表?

0 个答案:

没有答案