en preparant le badge "activité à configurer!"

This commit is contained in:
Paul Schneider 2017-03-03 17:36:29 +01:00
commit cc59db24b0
16 changed files with 78 additions and 20 deletions

View file

@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Workflow.Profiles
{
using System.Linq;
using Models.Workflow;
using YavscLib;
public class FormationSettings : ISpecializationSettings
@ -14,5 +15,10 @@ namespace Yavsc.Models.Workflow.Profiles
{
get; set;
}
public bool ExistsInDb(object dbContext)
{
return ((ApplicationDbContext)dbContext).FormationSettings.Any(p=>p.UserId==UserId);
}
}
}

View file

@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace Yavsc.Models.Workflow
{
@ -19,5 +20,8 @@ namespace Yavsc.Models.Workflow
[Range(0,100)]
public int Weight { get; set; }
[NotMapped,JsonIgnore]
public object Settings { get; internal set; }
}
}