Updated the table class files to allow a nullable ad special ID and changed the enum in the new modify record form to a boolean. Added a form to manage ad special keywords, still needs to handle removing them properly.
This commit is contained in:
@@ -8,7 +8,7 @@ namespace AdvertsingProfitControl
|
||||
public partial class AdvertisingProfitControlModel : DbContext
|
||||
{
|
||||
public AdvertisingProfitControlModel()
|
||||
: base("name=AdvertisingProfitControlContext")
|
||||
: base("name=AdvertisingProfitControlDbContext")
|
||||
{
|
||||
}
|
||||
|
||||
@@ -86,6 +86,21 @@ namespace AdvertsingProfitControl
|
||||
.Property(e => e.Description)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<AdSpecial>()
|
||||
.HasMany(e => e.ActualSales)
|
||||
.WithOptional(e => e.AdSpecial)
|
||||
.HasForeignKey(e => e.FkAdSpecialId);
|
||||
|
||||
modelBuilder.Entity<AdSpecial>()
|
||||
.HasMany(e => e.Inventories)
|
||||
.WithOptional(e => e.AdSpecial)
|
||||
.HasForeignKey(e => e.FkAdSpecialId);
|
||||
|
||||
modelBuilder.Entity<AdSpecial>()
|
||||
.HasMany(e => e.Projections)
|
||||
.WithOptional(e => e.AdSpecial)
|
||||
.HasForeignKey(e => e.FkAdSpecialId);
|
||||
|
||||
modelBuilder.Entity<CostAnalysi>()
|
||||
.Property(e => e.SalesPerManHour)
|
||||
.HasPrecision(19, 2);
|
||||
@@ -118,6 +133,10 @@ namespace AdvertsingProfitControl
|
||||
.Property(e => e.EndingInventory)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Invoice>()
|
||||
.Property(e => e.InvoiceNumber)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Invoice>()
|
||||
.Property(e => e.InvoiceNetAmountAtCost)
|
||||
.HasPrecision(19, 2);
|
||||
|
||||
Reference in New Issue
Block a user