Activity becomes
This commit is contained in:
@ -6,10 +6,12 @@ using Microsoft.AspNet.Mvc.Rendering;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
using Models;
|
||||
using Models.Workflow;
|
||||
|
||||
[Authorize("AdministratorOnly")]
|
||||
public class ActivityController : Controller
|
||||
{
|
||||
|
@ -4,7 +4,6 @@ using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Forms;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
@ -45,11 +44,13 @@ namespace Yavsc.Controllers
|
||||
// GET: CommandForms/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
ViewBag.ActivityCode = new SelectList(_context.Activities, "Code", "Name");
|
||||
ViewBag.ViewName = YavscLib.YavscConstants.Forms.Select( c => new SelectListItem { Text = c } );
|
||||
SetViewBag();
|
||||
return View();
|
||||
}
|
||||
|
||||
private void SetViewBag(CommandForm commandForm=null) {
|
||||
ViewBag.ActivityCode = new SelectList(_context.Activities, "Code", "Name", commandForm?.ActivityCode);
|
||||
ViewBag.Action = YavscLib.YavscConstants.Forms.Select( c => new SelectListItem { Text = c, Selected = commandForm?.Action == c } );
|
||||
}
|
||||
// POST: CommandForms/Create
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
@ -61,8 +62,7 @@ namespace Yavsc.Controllers
|
||||
await _context.SaveChangesAsync();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
ViewData["ActivityCode"] = new SelectList(_context.Activities, "Code", "Context", commandForm.ActivityCode);
|
||||
ViewData["FormId"] = new SelectList(_context.Set<Form>(), "Id", "Form", commandForm.ViewName);
|
||||
SetViewBag(commandForm);
|
||||
return View(commandForm);
|
||||
}
|
||||
|
||||
@ -79,8 +79,7 @@ namespace Yavsc.Controllers
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
ViewData["ActivityCode"] = new SelectList(_context.Activities, "Code", "Context", commandForm.ActivityCode);
|
||||
ViewData["FormId"] = new SelectList(_context.Set<Form>(), "Id", "Form", commandForm.ViewName);
|
||||
SetViewBag(commandForm);
|
||||
return View(commandForm);
|
||||
}
|
||||
|
||||
@ -95,8 +94,7 @@ namespace Yavsc.Controllers
|
||||
await _context.SaveChangesAsync();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
ViewBag.ActivityCode = new SelectList(_context.Activities, "Code", "Context", commandForm.ActivityCode);
|
||||
ViewBag.ViewName = YavscLib.YavscConstants.Forms.Select( c => new SelectListItem { Text = c } );
|
||||
SetViewBag(commandForm);
|
||||
return View(commandForm);
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
using Yavsc.Models;
|
||||
using YavscLib;
|
||||
|
||||
|
||||
namespace Yavsc.Helpers
|
||||
{
|
||||
using Models.Workflow;
|
||||
using YavscLib;
|
||||
public static class WorkflowHelpers
|
||||
{
|
||||
public static ISpecializationSettings CreateSettings (this Activity activity) {
|
||||
|
1090
Yavsc/Migrations/20170126152454_trackActivity.Designer.cs
generated
Normal file
1090
Yavsc/Migrations/20170126152454_trackActivity.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
422
Yavsc/Migrations/20170126152454_trackActivity.cs
Normal file
422
Yavsc/Migrations/20170126152454_trackActivity.cs
Normal file
@ -0,0 +1,422 @@
|
||||
using System;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class trackActivity : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId", table: "CircleAuthorizationToBlogPost");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost");
|
||||
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Activity_ActivityCode", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateCreated",
|
||||
table: "Activity",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateModified",
|
||||
table: "Activity",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "UserCreated",
|
||||
table: "Activity",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "UserModified",
|
||||
table: "Activity",
|
||||
nullable: true);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
|
||||
table: "AspNetRoleClaims",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserClaims",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserLogins",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "BlogPostId",
|
||||
principalTable: "Blog",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AccountBalance_ApplicationUser_UserId",
|
||||
table: "AccountBalance",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BalanceImpact_AccountBalance_BalanceId",
|
||||
table: "BalanceImpact",
|
||||
column: "BalanceId",
|
||||
principalTable: "AccountBalance",
|
||||
principalColumn: "UserId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandLine_Estimate_EstimateId",
|
||||
table: "CommandLine",
|
||||
column: "EstimateId",
|
||||
principalTable: "Estimate",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Estimate_ApplicationUser_ClientId",
|
||||
table: "Estimate",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Estimate_PerformerProfile_OwnerId",
|
||||
table: "Estimate",
|
||||
column: "OwnerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_Activity_ActivityCode",
|
||||
table: "BookQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Instrumentation_Instrument_InstrumentId",
|
||||
table: "Instrumentation",
|
||||
column: "InstrumentId",
|
||||
principalTable: "Instrument",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleMember_Circle_CircleId",
|
||||
table: "CircleMember",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleMember_ApplicationUser_MemberId",
|
||||
table: "CircleMember",
|
||||
column: "MemberId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PostTag_Blog_PostId",
|
||||
table: "PostTag",
|
||||
column: "PostId",
|
||||
principalTable: "Blog",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandForm_Activity_ActivityCode",
|
||||
table: "CommandForm",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganizationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganizationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_Activity_DoesCode",
|
||||
table: "UserActivity",
|
||||
column: "DoesCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_PerformerProfile_UserId",
|
||||
table: "UserActivity",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId", table: "CircleAuthorizationToBlogPost");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost");
|
||||
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Activity_ActivityCode", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||
migrationBuilder.DropColumn(name: "DateCreated", table: "Activity");
|
||||
migrationBuilder.DropColumn(name: "DateModified", table: "Activity");
|
||||
migrationBuilder.DropColumn(name: "UserCreated", table: "Activity");
|
||||
migrationBuilder.DropColumn(name: "UserModified", table: "Activity");
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
|
||||
table: "AspNetRoleClaims",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserClaims",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserLogins",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "BlogPostId",
|
||||
principalTable: "Blog",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AccountBalance_ApplicationUser_UserId",
|
||||
table: "AccountBalance",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BalanceImpact_AccountBalance_BalanceId",
|
||||
table: "BalanceImpact",
|
||||
column: "BalanceId",
|
||||
principalTable: "AccountBalance",
|
||||
principalColumn: "UserId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandLine_Estimate_EstimateId",
|
||||
table: "CommandLine",
|
||||
column: "EstimateId",
|
||||
principalTable: "Estimate",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Estimate_ApplicationUser_ClientId",
|
||||
table: "Estimate",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Estimate_PerformerProfile_OwnerId",
|
||||
table: "Estimate",
|
||||
column: "OwnerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_Activity_ActivityCode",
|
||||
table: "BookQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Instrumentation_Instrument_InstrumentId",
|
||||
table: "Instrumentation",
|
||||
column: "InstrumentId",
|
||||
principalTable: "Instrument",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleMember_Circle_CircleId",
|
||||
table: "CircleMember",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleMember_ApplicationUser_MemberId",
|
||||
table: "CircleMember",
|
||||
column: "MemberId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PostTag_Blog_PostId",
|
||||
table: "PostTag",
|
||||
column: "PostId",
|
||||
principalTable: "Blog",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandForm_Activity_ActivityCode",
|
||||
table: "CommandForm",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganizationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganizationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_Activity_DoesCode",
|
||||
table: "UserActivity",
|
||||
column: "DoesCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_PerformerProfile_UserId",
|
||||
table: "UserActivity",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
1090
Yavsc/Migrations/20170126152651_renameActViewNameToAction.Designer.cs
generated
Normal file
1090
Yavsc/Migrations/20170126152651_renameActViewNameToAction.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
402
Yavsc/Migrations/20170126152651_renameActViewNameToAction.cs
Normal file
402
Yavsc/Migrations/20170126152651_renameActViewNameToAction.cs
Normal file
@ -0,0 +1,402 @@
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class renameActViewNameToAction : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId", table: "CircleAuthorizationToBlogPost");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost");
|
||||
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Activity_ActivityCode", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||
|
||||
migrationBuilder.RenameColumn(name:"ViewName",table:"CommandForm",newName:"Action");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
|
||||
table: "AspNetRoleClaims",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserClaims",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserLogins",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "BlogPostId",
|
||||
principalTable: "Blog",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AccountBalance_ApplicationUser_UserId",
|
||||
table: "AccountBalance",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BalanceImpact_AccountBalance_BalanceId",
|
||||
table: "BalanceImpact",
|
||||
column: "BalanceId",
|
||||
principalTable: "AccountBalance",
|
||||
principalColumn: "UserId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandLine_Estimate_EstimateId",
|
||||
table: "CommandLine",
|
||||
column: "EstimateId",
|
||||
principalTable: "Estimate",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Estimate_ApplicationUser_ClientId",
|
||||
table: "Estimate",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Estimate_PerformerProfile_OwnerId",
|
||||
table: "Estimate",
|
||||
column: "OwnerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_Activity_ActivityCode",
|
||||
table: "BookQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Instrumentation_Instrument_InstrumentId",
|
||||
table: "Instrumentation",
|
||||
column: "InstrumentId",
|
||||
principalTable: "Instrument",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleMember_Circle_CircleId",
|
||||
table: "CircleMember",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleMember_ApplicationUser_MemberId",
|
||||
table: "CircleMember",
|
||||
column: "MemberId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PostTag_Blog_PostId",
|
||||
table: "PostTag",
|
||||
column: "PostId",
|
||||
principalTable: "Blog",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandForm_Activity_ActivityCode",
|
||||
table: "CommandForm",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganizationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganizationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_Activity_DoesCode",
|
||||
table: "UserActivity",
|
||||
column: "DoesCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_PerformerProfile_UserId",
|
||||
table: "UserActivity",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId", table: "CircleAuthorizationToBlogPost");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost");
|
||||
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Activity_ActivityCode", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
|
||||
table: "AspNetRoleClaims",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserClaims",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserLogins",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "BlogPostId",
|
||||
principalTable: "Blog",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AccountBalance_ApplicationUser_UserId",
|
||||
table: "AccountBalance",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BalanceImpact_AccountBalance_BalanceId",
|
||||
table: "BalanceImpact",
|
||||
column: "BalanceId",
|
||||
principalTable: "AccountBalance",
|
||||
principalColumn: "UserId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandLine_Estimate_EstimateId",
|
||||
table: "CommandLine",
|
||||
column: "EstimateId",
|
||||
principalTable: "Estimate",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Estimate_ApplicationUser_ClientId",
|
||||
table: "Estimate",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Estimate_PerformerProfile_OwnerId",
|
||||
table: "Estimate",
|
||||
column: "OwnerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_Activity_ActivityCode",
|
||||
table: "BookQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Instrumentation_Instrument_InstrumentId",
|
||||
table: "Instrumentation",
|
||||
column: "InstrumentId",
|
||||
principalTable: "Instrument",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleMember_Circle_CircleId",
|
||||
table: "CircleMember",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleMember_ApplicationUser_MemberId",
|
||||
table: "CircleMember",
|
||||
column: "MemberId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PostTag_Blog_PostId",
|
||||
table: "PostTag",
|
||||
column: "PostId",
|
||||
principalTable: "Blog",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandForm_Activity_ActivityCode",
|
||||
table: "CommandForm",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganizationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganizationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_Activity_DoesCode",
|
||||
table: "UserActivity",
|
||||
column: "DoesCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_PerformerProfile_UserId",
|
||||
table: "UserActivity",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
@ -127,33 +127,6 @@ namespace Yavsc.Migrations
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("ModeratorGroupName");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ParentCode")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SettingsClassName");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
@ -722,6 +695,41 @@ namespace Yavsc.Migrations
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<DateTime>("DateCreated");
|
||||
|
||||
b.Property<DateTime>("DateModified");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("ModeratorGroupName");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ParentCode")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SettingsClassName");
|
||||
|
||||
b.Property<string>("UserCreated");
|
||||
|
||||
b.Property<string>("UserModified");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.CommandForm", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
@ -865,13 +873,6 @@ namespace Yavsc.Migrations
|
||||
.HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ParentCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Bank.BankIdentity")
|
||||
@ -929,7 +930,7 @@ namespace Yavsc.Migrations
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
b.HasOne("Yavsc.Models.Workflow.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
@ -988,7 +989,7 @@ namespace Yavsc.Migrations
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
b.HasOne("Yavsc.Models.Workflow.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
@ -1032,9 +1033,16 @@ namespace Yavsc.Migrations
|
||||
.HasForeignKey("PostId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.Activity", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Workflow.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ParentCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.CommandForm", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
b.HasOne("Yavsc.Models.Workflow.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
});
|
||||
@ -1067,7 +1075,7 @@ namespace Yavsc.Migrations
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
b.HasOne("Yavsc.Models.Workflow.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoesCode");
|
||||
|
||||
|
@ -4,6 +4,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Models.Billing;
|
||||
using Yavsc.Models.Relationship;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.Models.Booking
|
||||
{
|
||||
|
@ -1,8 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Market {
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Billing;
|
||||
using Workflow;
|
||||
|
||||
public partial class Service : BaseProduct
|
||||
{
|
||||
|
@ -1,13 +1,14 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Models.Market;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
public class Activity
|
||||
public class Activity : IBaseTrackedEntity
|
||||
{
|
||||
|
||||
[StringLength(512),Required,Key]
|
||||
@ -22,10 +23,10 @@ namespace Yavsc.Models
|
||||
[StringLength(512)]
|
||||
public string ParentCode { get; set; }
|
||||
|
||||
[ForeignKey("ParentCode")]
|
||||
[ForeignKey("ParentCode"),JsonIgnore]
|
||||
public virtual Activity Parent { get; set; }
|
||||
|
||||
[InverseProperty("Parent")]
|
||||
[InverseProperty("Parent"),JsonIgnore]
|
||||
public virtual List<Activity> Children { get; set; }
|
||||
|
||||
public string Description {get; set;}
|
||||
@ -59,5 +60,25 @@ namespace Yavsc.Models
|
||||
|
||||
[InverseProperty("Context")]
|
||||
public virtual List<CommandForm> Forms { get; set; }
|
||||
|
||||
public DateTime DateCreated
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string UserCreated
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public DateTime DateModified
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string UserModified
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
@ -8,14 +9,14 @@ namespace Yavsc.Models.Workflow
|
||||
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
public string ViewName { get; set; }
|
||||
public string Action { get; set; }
|
||||
|
||||
public string Title { get; set; }
|
||||
|
||||
[Required]
|
||||
public string ActivityCode { get; set; }
|
||||
|
||||
[ForeignKey("ActivityCode")]
|
||||
[ForeignKey("ActivityCode"),JsonIgnore]
|
||||
public virtual Activity Context { get; set; }
|
||||
}
|
||||
}
|
@ -18,9 +18,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ViewName" class="col-md-2 control-label"></label>
|
||||
<label asp-for="Action" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<select asp-for="ViewName" asp-items="@ViewBag.ViewName" class ="form-control"></select>
|
||||
<select asp-for="Action" asp-items="@ViewBag.Action" class ="form-control"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -15,15 +15,15 @@
|
||||
<div class="form-group">
|
||||
<label asp-for="ActivityCode" class="control-label col-md-2">ActivityCode</label>
|
||||
<div class="col-md-10">
|
||||
<select asp-for="ActivityCode" class="form-control" />
|
||||
<select asp-for="ActivityCode" asp-items="@ViewBag.ActivityCode" class="form-control" >
|
||||
</select>
|
||||
<span asp-validation-for="ActivityCode" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="FormId" class="control-label col-md-2">FormId</label>
|
||||
<label asp-for="Action" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<select asp-for="FormId" class="form-control" />
|
||||
<span asp-validation-for="FormId" class="text-danger" />
|
||||
<select asp-for="Action" asp-items="@ViewBag.Action" class ="form-control"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -30,7 +30,7 @@
|
||||
@act.Description </p>
|
||||
<p>
|
||||
@foreach (var form in act.Forms) {
|
||||
<a class="btn btn-default" asp-controller="FrontOffice" asp-action="@form.ViewName" asp-route-id="@act.Code">
|
||||
<a class="btn btn-default" asp-controller="FrontOffice" asp-action="@form.Action" asp-route-id="@act.Code">
|
||||
@form.Title
|
||||
</a>
|
||||
}
|
||||
|
Reference in New Issue
Block a user