a templates controller
This commit is contained in:
153
Yavsc/ApiControllers/MailingTemplateApiController.cs
Normal file
153
Yavsc/ApiControllers/MailingTemplateApiController.cs
Normal file
@ -0,0 +1,153 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Server.Models.EMailing;
|
||||
using Microsoft.AspNet.Authorization;
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
[Produces("application/json")]
|
||||
[Route("api/mailing")]
|
||||
[Authorize("AdministratorOnly")]
|
||||
public class MailingTemplateApiController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
|
||||
public MailingTemplateApiController(ApplicationDbContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// GET: api/MailingTemplateApi
|
||||
[HttpGet]
|
||||
public IEnumerable<MailingTemplate> GetMailingTemplate()
|
||||
{
|
||||
return _context.MailingTemplate;
|
||||
}
|
||||
|
||||
// GET: api/MailingTemplateApi/5
|
||||
[HttpGet("{id}", Name = "GetMailingTemplate")]
|
||||
public async Task<IActionResult> GetMailingTemplate([FromRoute] long id)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
MailingTemplate mailingTemplate = await _context.MailingTemplate.SingleAsync(m => m.Id == id);
|
||||
|
||||
if (mailingTemplate == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return Ok(mailingTemplate);
|
||||
}
|
||||
|
||||
// PUT: api/MailingTemplateApi/5
|
||||
[HttpPut("{id}")]
|
||||
public async Task<IActionResult> PutMailingTemplate([FromRoute] long id, [FromBody] MailingTemplate mailingTemplate)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
if (id != mailingTemplate.Id)
|
||||
{
|
||||
return HttpBadRequest();
|
||||
}
|
||||
|
||||
_context.Entry(mailingTemplate).State = EntityState.Modified;
|
||||
|
||||
try
|
||||
{
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!MailingTemplateExists(id))
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
return new HttpStatusCodeResult(StatusCodes.Status204NoContent);
|
||||
}
|
||||
|
||||
// POST: api/MailingTemplateApi
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> PostMailingTemplate([FromBody] MailingTemplate mailingTemplate)
|
||||
{
|
||||
mailingTemplate.ManagerId = User.GetUserId();
|
||||
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
_context.MailingTemplate.Add(mailingTemplate);
|
||||
try
|
||||
{
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateException)
|
||||
{
|
||||
if (MailingTemplateExists(mailingTemplate.Id))
|
||||
{
|
||||
return new HttpStatusCodeResult(StatusCodes.Status409Conflict);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
return CreatedAtRoute("GetMailingTemplate", new { id = mailingTemplate.Id }, mailingTemplate);
|
||||
}
|
||||
|
||||
// DELETE: api/MailingTemplateApi/5
|
||||
[HttpDelete("{id}")]
|
||||
public async Task<IActionResult> DeleteMailingTemplate([FromRoute] long id)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
MailingTemplate mailingTemplate = await _context.MailingTemplate.SingleAsync(m => m.Id == id);
|
||||
if (mailingTemplate == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
_context.MailingTemplate.Remove(mailingTemplate);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Ok(mailingTemplate);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
_context.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private bool MailingTemplateExists(long id)
|
||||
{
|
||||
return _context.MailingTemplate.Count(e => e.Id == id) > 0;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
|
152
Yavsc/Controllers/MailingTemplateController.cs
Normal file
152
Yavsc/Controllers/MailingTemplateController.cs
Normal file
@ -0,0 +1,152 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Security.Claims;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Calendar;
|
||||
using Yavsc.Server.Models.EMailing;
|
||||
using Microsoft.AspNet.Authorization;
|
||||
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
[Authorize("AdministratorOnly")]
|
||||
public class MailingTemplateController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
|
||||
public MailingTemplateController(ApplicationDbContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// GET: MailingTemplate
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
var applicationDbContext = _context.MailingTemplate.Include(m => m.Manager);
|
||||
return View(await applicationDbContext.ToListAsync());
|
||||
}
|
||||
|
||||
// GET: MailingTemplate/Details/5
|
||||
public async Task<IActionResult> Details(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
MailingTemplate mailingTemplate = await _context.MailingTemplate.SingleAsync(m => m.Id == id);
|
||||
if (mailingTemplate == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return View(mailingTemplate);
|
||||
}
|
||||
|
||||
|
||||
List<SelectListItem> GetSelectFromEnum(Type enumType )
|
||||
{
|
||||
|
||||
var list = new List<SelectListItem>();
|
||||
foreach (var v in enumType.GetEnumValues())
|
||||
{
|
||||
list.Add(new SelectListItem { Value = v.ToString(), Text = enumType.GetEnumName(v) });
|
||||
}
|
||||
return list;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// GET: MailingTemplate/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
ViewBag.ManagerId = new SelectList(_context.ApplicationUser, "Id", "UserName");
|
||||
ViewBag.ToSend = GetSelectFromEnum(typeof(Periodicity));
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: MailingTemplate/Create
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(MailingTemplate mailingTemplate)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.MailingTemplate.Add(mailingTemplate);
|
||||
await _context.SaveChangesAsync(User.GetUserId());
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
ViewBag.ManagerId = new SelectList(_context.ApplicationUser, "Id", "UserName");
|
||||
ViewBag.ToSend = GetSelectFromEnum(typeof(Periodicity));
|
||||
return View(mailingTemplate);
|
||||
}
|
||||
|
||||
// GET: MailingTemplate/Edit/5
|
||||
public async Task<IActionResult> Edit(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
MailingTemplate mailingTemplate = await _context.MailingTemplate.SingleAsync(m => m.Id == id);
|
||||
if (mailingTemplate == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
ViewBag.ManagerId = new SelectList(_context.ApplicationUser, "Id", "UserName");
|
||||
ViewBag.ToSend = GetSelectFromEnum(typeof(Periodicity));
|
||||
return View(mailingTemplate);
|
||||
}
|
||||
|
||||
// POST: MailingTemplate/Edit/5
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(MailingTemplate mailingTemplate)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.Update(mailingTemplate);
|
||||
await _context.SaveChangesAsync(User.GetUserId());
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
ViewBag.ManagerId = new SelectList(_context.ApplicationUser, "Id", "UserName");
|
||||
ViewBag.ToSend = GetSelectFromEnum(typeof(Periodicity));
|
||||
return View(mailingTemplate);
|
||||
}
|
||||
|
||||
// GET: MailingTemplate/Delete/5
|
||||
[ActionName("Delete")]
|
||||
public async Task<IActionResult> Delete(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
MailingTemplate mailingTemplate = await _context.MailingTemplate.SingleAsync(m => m.Id == id);
|
||||
if (mailingTemplate == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return View(mailingTemplate);
|
||||
}
|
||||
|
||||
// POST: MailingTemplate/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(long id)
|
||||
{
|
||||
MailingTemplate mailingTemplate = await _context.MailingTemplate.SingleAsync(m => m.Id == id);
|
||||
_context.MailingTemplate.Remove(mailingTemplate);
|
||||
await _context.SaveChangesAsync(User.GetUserId());
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
}
|
||||
}
|
1808
Yavsc/Migrations/20180420213912_mailingTemplates.Designer.cs
generated
Normal file
1808
Yavsc/Migrations/20180420213912_mailingTemplates.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
764
Yavsc/Migrations/20180420213912_mailingTemplates.cs
Normal file
764
Yavsc/Migrations/20180420213912_mailingTemplates.cs
Normal file
@ -0,0 +1,764 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class mailingTemplates : 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_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_BlogPost_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_BlogTag_BlogPost_PostId", table: "BlogTag");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlogTag_Tag_TagId", table: "BlogTag");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Comment_ApplicationUser_AuthorId", table: "Comment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Comment_BlogPost_PostId", table: "Comment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Schedule_ApplicationUser_OwnerId", table: "Schedule");
|
||||
migrationBuilder.DropForeignKey(name: "FK_ChatConnection_ApplicationUser_ApplicationUserId", table: "ChatConnection");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BrusherProfile_PerformerProfile_UserId", table: "BrusherProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", table: "HairPrestationCollectionItem");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", table: "HairPrestationCollectionItem");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairTaint_Color_ColorId", table: "HairTaint");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairTaintInstance_HairPrestation_PrestationId", table: "HairTaintInstance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairTaintInstance_HairTaint_TaintId", table: "HairTaintInstance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_DimissClicked_Notification_NotificationId", table: "DimissClicked");
|
||||
migrationBuilder.DropForeignKey(name: "FK_DimissClicked_ApplicationUser_UserId", table: "DimissClicked");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PayPalPayment_ApplicationUser_ExecutorId", table: "PayPalPayment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
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_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "MailingTemplate",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
Body = table.Column<string>(nullable: true),
|
||||
DateCreated = table.Column<DateTime>(nullable: false),
|
||||
DateModified = table.Column<DateTime>(nullable: false),
|
||||
ManagerId = table.Column<string>(nullable: true),
|
||||
ReplyToAddress = table.Column<string>(nullable: true),
|
||||
ShortName = table.Column<string>(nullable: true),
|
||||
ToSend = table.Column<int>(nullable: false),
|
||||
UserCreated = table.Column<string>(nullable: true),
|
||||
UserModified = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MailingTemplate", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_MailingTemplate_ApplicationUser_ManagerId",
|
||||
column: x => x.ManagerId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
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_BlackListed_ApplicationUser_OwnerId",
|
||||
table: "BlackListed",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "BlogPostId",
|
||||
principalTable: "BlogPost",
|
||||
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_BlogTag_BlogPost_PostId",
|
||||
table: "BlogTag",
|
||||
column: "PostId",
|
||||
principalTable: "BlogPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlogTag_Tag_TagId",
|
||||
table: "BlogTag",
|
||||
column: "TagId",
|
||||
principalTable: "Tag",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Comment_ApplicationUser_AuthorId",
|
||||
table: "Comment",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Comment_BlogPost_PostId",
|
||||
table: "Comment",
|
||||
column: "PostId",
|
||||
principalTable: "BlogPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Schedule_ApplicationUser_OwnerId",
|
||||
table: "Schedule",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ChatConnection_ApplicationUser_ApplicationUserId",
|
||||
table: "ChatConnection",
|
||||
column: "ApplicationUserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BrusherProfile_PerformerProfile_UserId",
|
||||
table: "BrusherProfile",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_Activity_ActivityCode",
|
||||
table: "HairCutQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_ApplicationUser_ClientId",
|
||||
table: "HairCutQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
|
||||
table: "HairCutQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_HairPrestation_PrestationId",
|
||||
table: "HairCutQuery",
|
||||
column: "PrestationId",
|
||||
principalTable: "HairPrestation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId",
|
||||
table: "HairPrestationCollectionItem",
|
||||
column: "PrestationId",
|
||||
principalTable: "HairPrestation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId",
|
||||
table: "HairPrestationCollectionItem",
|
||||
column: "QueryId",
|
||||
principalTable: "HairMultiCutQuery",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairTaint_Color_ColorId",
|
||||
table: "HairTaint",
|
||||
column: "ColorId",
|
||||
principalTable: "Color",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairTaintInstance_HairPrestation_PrestationId",
|
||||
table: "HairTaintInstance",
|
||||
column: "PrestationId",
|
||||
principalTable: "HairPrestation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairTaintInstance_HairTaint_TaintId",
|
||||
table: "HairTaintInstance",
|
||||
column: "TaintId",
|
||||
principalTable: "HairTaint",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DimissClicked_Notification_NotificationId",
|
||||
table: "DimissClicked",
|
||||
column: "NotificationId",
|
||||
principalTable: "Notification",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DimissClicked_ApplicationUser_UserId",
|
||||
table: "DimissClicked",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
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_PayPalPayment_ApplicationUser_ExecutorId",
|
||||
table: "PayPalPayment",
|
||||
column: "ExecutorId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_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_RdvQuery_Activity_ActivityCode",
|
||||
table: "RdvQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RdvQuery_ApplicationUser_ClientId",
|
||||
table: "RdvQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RdvQuery_PerformerProfile_PerformerId",
|
||||
table: "RdvQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_BlogPost_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_BlogTag_BlogPost_PostId", table: "BlogTag");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlogTag_Tag_TagId", table: "BlogTag");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Comment_ApplicationUser_AuthorId", table: "Comment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Comment_BlogPost_PostId", table: "Comment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Schedule_ApplicationUser_OwnerId", table: "Schedule");
|
||||
migrationBuilder.DropForeignKey(name: "FK_ChatConnection_ApplicationUser_ApplicationUserId", table: "ChatConnection");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BrusherProfile_PerformerProfile_UserId", table: "BrusherProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", table: "HairPrestationCollectionItem");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", table: "HairPrestationCollectionItem");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairTaint_Color_ColorId", table: "HairTaint");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairTaintInstance_HairPrestation_PrestationId", table: "HairTaintInstance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairTaintInstance_HairTaint_TaintId", table: "HairTaintInstance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_DimissClicked_Notification_NotificationId", table: "DimissClicked");
|
||||
migrationBuilder.DropForeignKey(name: "FK_DimissClicked_ApplicationUser_UserId", table: "DimissClicked");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PayPalPayment_ApplicationUser_ExecutorId", table: "PayPalPayment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
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_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||
migrationBuilder.DropTable("MailingTemplate");
|
||||
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_BlackListed_ApplicationUser_OwnerId",
|
||||
table: "BlackListed",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "BlogPostId",
|
||||
principalTable: "BlogPost",
|
||||
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_BlogTag_BlogPost_PostId",
|
||||
table: "BlogTag",
|
||||
column: "PostId",
|
||||
principalTable: "BlogPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlogTag_Tag_TagId",
|
||||
table: "BlogTag",
|
||||
column: "TagId",
|
||||
principalTable: "Tag",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Comment_ApplicationUser_AuthorId",
|
||||
table: "Comment",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Comment_BlogPost_PostId",
|
||||
table: "Comment",
|
||||
column: "PostId",
|
||||
principalTable: "BlogPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Schedule_ApplicationUser_OwnerId",
|
||||
table: "Schedule",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ChatConnection_ApplicationUser_ApplicationUserId",
|
||||
table: "ChatConnection",
|
||||
column: "ApplicationUserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BrusherProfile_PerformerProfile_UserId",
|
||||
table: "BrusherProfile",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_Activity_ActivityCode",
|
||||
table: "HairCutQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_ApplicationUser_ClientId",
|
||||
table: "HairCutQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
|
||||
table: "HairCutQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_HairPrestation_PrestationId",
|
||||
table: "HairCutQuery",
|
||||
column: "PrestationId",
|
||||
principalTable: "HairPrestation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId",
|
||||
table: "HairPrestationCollectionItem",
|
||||
column: "PrestationId",
|
||||
principalTable: "HairPrestation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId",
|
||||
table: "HairPrestationCollectionItem",
|
||||
column: "QueryId",
|
||||
principalTable: "HairMultiCutQuery",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairTaint_Color_ColorId",
|
||||
table: "HairTaint",
|
||||
column: "ColorId",
|
||||
principalTable: "Color",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairTaintInstance_HairPrestation_PrestationId",
|
||||
table: "HairTaintInstance",
|
||||
column: "PrestationId",
|
||||
principalTable: "HairPrestation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairTaintInstance_HairTaint_TaintId",
|
||||
table: "HairTaintInstance",
|
||||
column: "TaintId",
|
||||
principalTable: "HairTaint",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DimissClicked_Notification_NotificationId",
|
||||
table: "DimissClicked",
|
||||
column: "NotificationId",
|
||||
principalTable: "Notification",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DimissClicked_ApplicationUser_UserId",
|
||||
table: "DimissClicked",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
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_PayPalPayment_ApplicationUser_ExecutorId",
|
||||
table: "PayPalPayment",
|
||||
column: "ExecutorId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_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_RdvQuery_Activity_ActivityCode",
|
||||
table: "RdvQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RdvQuery_ApplicationUser_ClientId",
|
||||
table: "RdvQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RdvQuery_PerformerProfile_PerformerId",
|
||||
table: "RdvQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
@ -163,7 +163,8 @@ namespace Yavsc.Migrations
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
b.Property<string>("DedicatedGoogleCalendar")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long>("DiskQuota")
|
||||
.HasAnnotation("Relational:DefaultValue", "524288000")
|
||||
@ -1314,6 +1315,34 @@ namespace Yavsc.Migrations
|
||||
b.HasKey("DoesCode", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Server.Models.EMailing.MailingTemplate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Body")
|
||||
.HasAnnotation("MaxLength", 65536);
|
||||
|
||||
b.Property<DateTime>("DateCreated");
|
||||
|
||||
b.Property<DateTime>("DateModified");
|
||||
|
||||
b.Property<string>("ManagerId");
|
||||
|
||||
b.Property<string>("ReplyToAddress");
|
||||
|
||||
b.Property<string>("ShortName")
|
||||
.HasAnnotation("MaxLength", 128);
|
||||
|
||||
b.Property<int>("ToSend");
|
||||
|
||||
b.Property<string>("UserCreated");
|
||||
|
||||
b.Property<string>("UserModified");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
@ -1766,6 +1795,13 @@ namespace Yavsc.Migrations
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Server.Models.EMailing.MailingTemplate", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ManagerId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ using System.Threading;
|
||||
using Yavsc.Models.Haircut;
|
||||
using Yavsc.Models.IT.Maintaining;
|
||||
using Yavsc.Models.IT.Fixing;
|
||||
using Yavsc.Server.Models.EMailing;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
@ -296,8 +297,10 @@ namespace Yavsc.Models
|
||||
public DbSet<Announce> Announce { get; set; }
|
||||
|
||||
public DbSet<ChatConnection> ChatConnection { get; set; }
|
||||
|
||||
public DbSet<ChatRoom> ChatRoom { get; set; }
|
||||
|
||||
public DbSet<MailingTemplate> MailingTemplate { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
59
Yavsc/Views/MailingTemplate/Create.cshtml
Normal file
59
Yavsc/Views/MailingTemplate/Create.cshtml
Normal file
@ -0,0 +1,59 @@
|
||||
@model Yavsc.Server.Models.EMailing.MailingTemplate
|
||||
|
||||
@{
|
||||
ViewData["Title"] = SR["Create"];
|
||||
}
|
||||
|
||||
<h2>@SR["Create"]</h2>
|
||||
|
||||
<form asp-action="Create">
|
||||
<div class="form-horizontal">
|
||||
<h4>MailingTemplate</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Body" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Body" class="form-control" />
|
||||
<span asp-validation-for="Body" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ManagerId" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<select asp-for="ManagerId" class ="form-control" asp-items="@ViewBag.ManagerId" ></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ReplyToAddress" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ReplyToAddress" class="form-control" />
|
||||
<span asp-validation-for="ReplyToAddress" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ShortName" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ShortName" class="form-control" />
|
||||
<span asp-validation-for="ShortName" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ToSend" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<select asp-for="ToSend" asp-items="@ViewBag.ToSend" class="form-control"></select>
|
||||
<span asp-validation-for="ToSend" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
70
Yavsc/Views/MailingTemplate/Delete.cshtml
Normal file
70
Yavsc/Views/MailingTemplate/Delete.cshtml
Normal file
@ -0,0 +1,70 @@
|
||||
@model Yavsc.Server.Models.EMailing.MailingTemplate
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>MailingTemplate</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Body)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Body)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DateCreated)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DateCreated)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DateModified)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DateModified)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ReplyToAddress)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ReplyToAddress)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ShortName)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ShortName)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ToSend)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ToSend)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.UserCreated)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.UserCreated)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.UserModified)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.UserModified)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<div class="form-actions no-color">
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
66
Yavsc/Views/MailingTemplate/Details.cshtml
Normal file
66
Yavsc/Views/MailingTemplate/Details.cshtml
Normal file
@ -0,0 +1,66 @@
|
||||
@model Yavsc.Server.Models.EMailing.MailingTemplate
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>MailingTemplate</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Body)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Body)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DateCreated)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DateCreated)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DateModified)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DateModified)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ReplyToAddress)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ReplyToAddress)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ShortName)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ShortName)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ToSend)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ToSend)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.UserCreated)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.UserCreated)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.UserModified)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.UserModified)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</p>
|
62
Yavsc/Views/MailingTemplate/Edit.cshtml
Normal file
62
Yavsc/Views/MailingTemplate/Edit.cshtml
Normal file
@ -0,0 +1,62 @@
|
||||
@model Yavsc.Server.Models.EMailing.MailingTemplate
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>@SR["Edit"]</h2>
|
||||
|
||||
<form asp-action="Edit">
|
||||
<div class="form-horizontal">
|
||||
<h4>MailingTemplate</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<label asp-for="Body" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Body" class="form-control" />
|
||||
<span asp-validation-for="Body" class="text-danger" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ManagerId" class="control-label col-md-2">@SR["Manager"]</label>
|
||||
<div class="col-md-10">
|
||||
<select asp-for="ManagerId" asp-items="@ViewBag.ManagerId" class="form-control" >
|
||||
</select>
|
||||
<span asp-validation-for="ManagerId" class="text-danger" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ReplyToAddress" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ReplyToAddress" class="form-control" />
|
||||
<span asp-validation-for="ReplyToAddress" class="text-danger" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ShortName" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ShortName" class="form-control" />
|
||||
<span asp-validation-for="ShortName" class="text-danger" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ToSend" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<select asp-for="ToSend" asp-items="@ViewBag.ToSend" class="form-control"></select>
|
||||
<span asp-validation-for="ToSend" class="text-danger" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
74
Yavsc/Views/MailingTemplate/Index.cshtml
Normal file
74
Yavsc/Views/MailingTemplate/Index.cshtml
Normal file
@ -0,0 +1,74 @@
|
||||
@model IEnumerable<Yavsc.Server.Models.EMailing.MailingTemplate>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ShortName)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ReplyToAddress)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Body)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ToSend)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.DateCreated)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.UserCreated)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.DateModified)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.UserModified)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ShortName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ReplyToAddress)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Body)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ToSend)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DateCreated)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.UserCreated)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DateModified)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.UserModified)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
@ -133,7 +133,7 @@
|
||||
data-colorscheme="dark">
|
||||
</div>
|
||||
</environment>
|
||||
<p class="small">Yavsc - Copyright © 2015 - 2017 Paul Schneider</p>
|
||||
<p class="small">Yavsc - Copyright © 2015 - 2018 Paul Schneider</p>
|
||||
</footer>
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
|
@ -1,175 +1,180 @@
|
||||
{
|
||||
"version": "1.0.1-*",
|
||||
"authors": [
|
||||
"Paul Schneider"
|
||||
"version": "1.0.1-*",
|
||||
"authors": [
|
||||
"Paul Schneider"
|
||||
],
|
||||
"packOptions": {
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pazof/yavsc"
|
||||
},
|
||||
"licenseUrl": "https://github.com/pazof/yavsc/blob/vnext/LICENSE",
|
||||
"requireLicenseAcceptance": true,
|
||||
"owners": [
|
||||
"Paul Schneider <paul@pschneider.fr>"
|
||||
],
|
||||
"packOptions": {
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pazof/yavsc"
|
||||
},
|
||||
"licenseUrl": "https://github.com/pazof/yavsc/blob/vnext/LICENSE",
|
||||
"requireLicenseAcceptance": true,
|
||||
"owners": [
|
||||
"Paul Schneider <paul@pschneider.fr>"
|
||||
],
|
||||
"summary": "Yet another very small company",
|
||||
"projectUrl": "http://yavsc.pschneider.fr",
|
||||
"tags": [
|
||||
"Blog",
|
||||
"PoS",
|
||||
"Chat"
|
||||
]
|
||||
"summary": "Yet another very small company",
|
||||
"projectUrl": "http://yavsc.pschneider.fr",
|
||||
"tags": [
|
||||
"Blog",
|
||||
"PoS",
|
||||
"Chat"
|
||||
]
|
||||
},
|
||||
"userSecretsId": "aspnet5-YavscWeb-a0dadd21-2ced-43d3-96f9-7e504345102f",
|
||||
"buildOptions": {
|
||||
"debugType": "full",
|
||||
"emitEntryPoint": true,
|
||||
"outputName": "Yavsc",
|
||||
"compile": {
|
||||
"include": "*.cs",
|
||||
"exclude": [
|
||||
"wwwroot",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"contrib"
|
||||
]
|
||||
},
|
||||
"userSecretsId": "aspnet5-YavscWeb-a0dadd21-2ced-43d3-96f9-7e504345102f",
|
||||
"buildOptions": {
|
||||
"debugType": "full",
|
||||
"embed": [
|
||||
"Resources/**/*.resx"
|
||||
]
|
||||
},
|
||||
"configurations": {
|
||||
"Debug": {
|
||||
"compilationOptions": {
|
||||
"emitEntryPoint": true,
|
||||
"outputName": "Yavsc",
|
||||
"compile": {
|
||||
"include": "*.cs",
|
||||
"exclude": [
|
||||
"wwwroot",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"contrib"
|
||||
]
|
||||
},
|
||||
"embed": [
|
||||
"Resources/**/*.resx"
|
||||
]
|
||||
"define": [
|
||||
"DEBUG",
|
||||
"TRACE"
|
||||
],
|
||||
"optimize": false,
|
||||
"debugType": "full",
|
||||
"platform": "anycpu"
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"Debug": {
|
||||
"compilationOptions": {
|
||||
"emitEntryPoint": true,
|
||||
"define": [
|
||||
"DEBUG",
|
||||
"TRACE"
|
||||
],
|
||||
"optimize": false,
|
||||
"debugType": "full",
|
||||
"platform": "anycpu"
|
||||
}
|
||||
},
|
||||
"Release": {
|
||||
"compilationOptions": {
|
||||
"define": [
|
||||
"RELEASE",
|
||||
"TRACE"
|
||||
],
|
||||
"optimize": true
|
||||
}
|
||||
}
|
||||
"Release": {
|
||||
"compilationOptions": {
|
||||
"define": [
|
||||
"RELEASE",
|
||||
"TRACE"
|
||||
],
|
||||
"optimize": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"webroot": "wwwroot",
|
||||
"tooling": {
|
||||
"defaultNamespace": "Yavsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"EntityFramework.Commands": "7.0.0-rc1-final",
|
||||
"EntityFramework.Core": "7.0.0-rc1-final",
|
||||
"EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
|
||||
"EntityFramework.Relational": "7.0.0-rc1-final",
|
||||
"EntityFramework7.Npgsql": "3.1.0-rc1-3",
|
||||
"EntityFramework7.Npgsql.Design": "3.1.0-rc1-5",
|
||||
"MailKit": "1.12.0",
|
||||
"MarkdownDeep-av.NET": "1.5.6",
|
||||
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Authentication.Facebook": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Authentication.Twitter": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Authorization": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Diagnostics.Entity": "7.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Http.Abstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-*",
|
||||
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-*",
|
||||
"Microsoft.AspNet.Localization": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Mvc": "6.0.0-rc1-*",
|
||||
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-*",
|
||||
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Server.WebListener": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.SignalR.Core": "2.2.1",
|
||||
"Microsoft.AspNet.SignalR.JS": "2.2.1",
|
||||
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-*",
|
||||
"Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-*",
|
||||
"Microsoft.AspNet.WebSockets.Server": "1.0.0-rc1-*",
|
||||
"Microsoft.Extensions.Configuration.Abstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.TraceSource": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Globalization.CultureInfoCache": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Localization": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Localization.Abstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
|
||||
"Microsoft.Framework.Configuration.Abstractions": "1.0.0-beta8",
|
||||
"Microsoft.Framework.Configuration.Binder": "1.0.0-beta8",
|
||||
"Microsoft.Framework.Configuration.Json": "1.0.0-beta8",
|
||||
"Microsoft.AspNet.Session": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Web.Optimization": "1.1.3",
|
||||
"Microsoft.Extensions.WebEncoders.Core": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Options": "0.0.1-alpha",
|
||||
"Microsoft.Extensions.WebEncoders": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.DataProtection": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.DataProtection.SystemWeb": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Authentication.OAuth": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Mvc.Formatters.Json": "6.0.0-rc1-final",
|
||||
"Microsoft.AspNet.OWin": "1.0.0-rc1-final",
|
||||
"System.Json": "4.0.20126.16343",
|
||||
"Yavsc.Abstract": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
},
|
||||
"webroot": "wwwroot",
|
||||
"tooling": {
|
||||
"defaultNamespace": "Yavsc"
|
||||
"OAuth.AspNet.Token": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
},
|
||||
"dependencies": {
|
||||
"EntityFramework.Commands": "7.0.0-rc1-final",
|
||||
"EntityFramework.Core": "7.0.0-rc1-final",
|
||||
"EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
|
||||
"EntityFramework.Relational": "7.0.0-rc1-final",
|
||||
"EntityFramework7.Npgsql": "3.1.0-rc1-3",
|
||||
"EntityFramework7.Npgsql.Design": "3.1.0-rc1-5",
|
||||
"MailKit": "1.12.0",
|
||||
"MarkdownDeep-av.NET": "1.5.6",
|
||||
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Authentication.Facebook": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Authentication.Twitter": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Authorization": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Diagnostics.Entity": "7.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Http.Abstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-*",
|
||||
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-*",
|
||||
"Microsoft.AspNet.Localization": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Mvc": "6.0.0-rc1-*",
|
||||
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-*",
|
||||
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Server.WebListener": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.SignalR.Core": "2.2.1",
|
||||
"Microsoft.AspNet.SignalR.JS": "2.2.1",
|
||||
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-*",
|
||||
"Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-*",
|
||||
"Microsoft.AspNet.WebSockets.Server": "1.0.0-rc1-*",
|
||||
"Microsoft.Extensions.Configuration.Abstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.TraceSource": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Globalization.CultureInfoCache": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Localization": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Localization.Abstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
|
||||
"Microsoft.Framework.Configuration.Abstractions": "1.0.0-beta8",
|
||||
"Microsoft.Framework.Configuration.Binder": "1.0.0-beta8",
|
||||
"Microsoft.Framework.Configuration.Json": "1.0.0-beta8",
|
||||
"Microsoft.AspNet.Session": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Web.Optimization": "1.1.3",
|
||||
"Microsoft.Extensions.WebEncoders.Core": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Options": "0.0.1-alpha",
|
||||
"Microsoft.Extensions.WebEncoders": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.DataProtection": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.DataProtection.SystemWeb": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Authentication.OAuth": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Mvc.Formatters.Json": "6.0.0-rc1-final",
|
||||
"Microsoft.AspNet.OWin": "1.0.0-rc1-final",
|
||||
"System.Json": "4.0.20126.16343",
|
||||
"Yavsc.Abstract": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
},
|
||||
"OAuth.AspNet.Token": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
},
|
||||
"OAuth.AspNet.AuthServer": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
},
|
||||
"Microsoft.AspNet.Http.Extensions": "1.0.0-rc1-final",
|
||||
"Microsoft.DiaSymReader.Native": "1.5.0",
|
||||
"PayPalMerchant-net451": "2.7.109",
|
||||
"Gapi.net45": "1.0.0",
|
||||
"Microsoft.AspNet.Authentication.JwtBearer": "1.0.0-rc1-final"
|
||||
"OAuth.AspNet.AuthServer": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
},
|
||||
"commands": {
|
||||
"web": "Microsoft.AspNet.Server.Kestrel --server.urls http://*:5000",
|
||||
"coiffure": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:88",
|
||||
"lua": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:85",
|
||||
"luatest": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:5001",
|
||||
"kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:5000",
|
||||
"zicmoove": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:87",
|
||||
"yavsc": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:86",
|
||||
"yavscpre": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:84",
|
||||
"ef": "EntityFramework.Commands",
|
||||
"gen": "Microsoft.Extensions.CodeGeneration"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": {
|
||||
"frameworkAssemblies": {
|
||||
"System.Drawing": "4.0.0.0",
|
||||
"System.Net": "4.0.0.0",
|
||||
"System.Xml": "4.0.0.0",
|
||||
"System": "4.0.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"publishOptions": {
|
||||
"exclude": [
|
||||
"**.user",
|
||||
"**.vspscc",
|
||||
"contrib/**/*.*"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": "gulp min"
|
||||
},
|
||||
"embed": "Views/**/*.cshtml"
|
||||
"Microsoft.AspNet.Http.Extensions": "1.0.0-rc1-final",
|
||||
"Microsoft.DiaSymReader.Native": "1.5.0",
|
||||
"PayPalMerchant-net451": "2.7.109",
|
||||
"Gapi.net45": "1.0.0",
|
||||
"Microsoft.AspNet.Authentication.JwtBearer": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.CodeGeneration": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.CodeGenerators.Mvc": {
|
||||
"type": "build",
|
||||
"version": "1.0.0-rc1-final"
|
||||
}
|
||||
},
|
||||
"commands": {
|
||||
"web": "Microsoft.AspNet.Server.Kestrel --server.urls http://*:5000",
|
||||
"coiffure": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:88",
|
||||
"lua": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:85",
|
||||
"luatest": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:5001",
|
||||
"kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:5000",
|
||||
"zicmoove": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:87",
|
||||
"yavsc": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:86",
|
||||
"yavscpre": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:84",
|
||||
"ef": "EntityFramework.Commands",
|
||||
"gen": "Microsoft.Extensions.CodeGeneration"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": {
|
||||
"frameworkAssemblies": {
|
||||
"System.Drawing": "4.0.0.0",
|
||||
"System.Net": "4.0.0.0",
|
||||
"System.Xml": "4.0.0.0",
|
||||
"System": "4.0.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"publishOptions": {
|
||||
"exclude": [
|
||||
"**.user",
|
||||
"**.vspscc",
|
||||
"contrib/**/*.*"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": "gulp min"
|
||||
},
|
||||
"embed": "Views/**/*.cshtml"
|
||||
}
|
||||
|
Reference in New Issue
Block a user