command forms :-)

This commit is contained in:
Paul Schneider 2017-01-24 10:43:42 +01:00
commit d232d4a52e
17 changed files with 214 additions and 48 deletions

View file

@ -6,6 +6,7 @@ using Microsoft.AspNet.Authentication.OAuth;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Data.Entity;
using Yavsc.Models.Relationship;
using Yavsc.Models.Forms;
namespace Yavsc.Models
{
@ -255,5 +256,7 @@ namespace Yavsc.Models
public DbSet<CommandForm> CommandForm { get; set; }
public DbSet<Form> Form { get; set; }
}
}

View file

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Market;
using Yavsc.Models.Workflow;
namespace Yavsc.Models
{
@ -55,5 +56,8 @@ namespace Yavsc.Models
public int Rate { get; set; }
[DisplayAttribute(Name="SettingsClass")]
public string SettingsClassName { get; set; }
[InverseProperty("Context")]
public virtual List<CommandForm> Forms { get; set; }
}
}

View file

@ -3,8 +3,13 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Workflow
{
public class CommandForm : Forms.Form
public class CommandForm
{
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public string ViewName { get; set; }
public string Title { get; set; }
[Required]