en preparant le badge "activité à configurer!"
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using YavscLib;
|
||||
|
||||
namespace Yavsc.Models.Haircut
|
||||
@ -135,5 +136,10 @@ namespace Yavsc.Models.Haircut
|
||||
[Display(Name="Remise au forfait coupe+technique"),DisplayFormat(DataFormatString="{0:C}")]
|
||||
|
||||
public decimal FlatFeeDiscount { get; set; }
|
||||
|
||||
public bool ExistsInDb(object dbContext)
|
||||
{
|
||||
return ((ApplicationDbContext)dbContext).BrusherProfile.Any(p=>p.UserId==UserId);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using YavscLib;
|
||||
|
||||
namespace Yavsc.Models.Musical.Profiles
|
||||
@ -17,5 +18,9 @@ namespace Yavsc.Models.Musical.Profiles
|
||||
get; set;
|
||||
}
|
||||
|
||||
public bool ExistsInDb(object dbContext)
|
||||
{
|
||||
return ((ApplicationDbContext)dbContext).DjSettings.Any(p=>p.UserId==UserId);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using YavscLib;
|
||||
|
||||
namespace Yavsc.Models.Musical.Profiles
|
||||
@ -12,5 +13,10 @@ namespace Yavsc.Models.Musical.Profiles
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public bool ExistsInDb(object dbContext)
|
||||
{
|
||||
return ((ApplicationDbContext)dbContext).GeneralSettings.Any(p=>p.UserId==UserId);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using Yavsc.Models.Workflow;
|
||||
using YavscLib;
|
||||
|
||||
@ -17,6 +18,10 @@ namespace Yavsc.Models.Musical.Profiles
|
||||
|
||||
[ForeignKeyAttribute("InstrumentId")]
|
||||
public virtual Instrument Tool { get; set; }
|
||||
|
||||
|
||||
public bool ExistsInDb(object dbContext)
|
||||
{
|
||||
return ((ApplicationDbContext)dbContext).Instrumentation.Any(p=>p.UserId==UserId);
|
||||
}
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user