mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Re-do company descriptions.
This commit is contained in:
1891
Cicm.Database/Migrations/20190518145625_RemoveCompanyDescriptions.Designer.cs
generated
Normal file
1891
Cicm.Database/Migrations/20190518145625_RemoveCompanyDescriptions.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,35 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Cicm.Database.Migrations
|
||||
{
|
||||
public partial class RemoveCompanyDescriptions : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable("company_descriptions");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable("company_descriptions",
|
||||
table => new
|
||||
{
|
||||
id = table.Column<int>("int(11)")
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
company_id = table.Column<int>("int(11)"),
|
||||
text = table.Column<string>("text", nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_company_descriptions", x => x.id);
|
||||
table.ForeignKey("fk_company_id", x => x.id, "companies", "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex("idx_company_id", "company_descriptions", "company_id", unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex("idx_text", "company_descriptions", "text");
|
||||
}
|
||||
}
|
||||
}
|
||||
1915
Cicm.Database/Migrations/20190518150032_AddCompanyDescriptions.Designer.cs
generated
Normal file
1915
Cicm.Database/Migrations/20190518150032_AddCompanyDescriptions.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,34 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Cicm.Database.Migrations
|
||||
{
|
||||
public partial class AddCompanyDescriptions : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable("CompanyDescriptions",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>()
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CompanyId = table.Column<int>(),
|
||||
Text = table.Column<string>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CompanyDescriptions", x => x.Id);
|
||||
table.ForeignKey("FK_CompanyDescriptions_companies_CompanyId",
|
||||
x => x.CompanyId, "companies", "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex("IX_CompanyDescriptions_CompanyId", "CompanyDescriptions", "CompanyId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable("CompanyDescriptions");
|
||||
}
|
||||
}
|
||||
}
|
||||
1918
Cicm.Database/Migrations/20190518154700_AddCompanyDescriptionIndex.Designer.cs
generated
Normal file
1918
Cicm.Database/Migrations/20190518154700_AddCompanyDescriptionIndex.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Cicm.Database.Migrations
|
||||
{
|
||||
public partial class AddCompanyDescriptionIndex : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>("Text", "CompanyDescriptions", nullable: true,
|
||||
oldClrType: typeof(string), oldNullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex("IX_CompanyDescriptions_Text", "CompanyDescriptions", "Text")
|
||||
.Annotation("MySql:FullTextIndex", true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex("IX_CompanyDescriptions_Text", "CompanyDescriptions");
|
||||
|
||||
migrationBuilder.AlterColumn<string>("Text", "CompanyDescriptions", nullable: true,
|
||||
oldClrType: typeof(string), oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace Cicm.Database.Migrations
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "2.1.1-rtm-30846")
|
||||
modelBuilder.HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.Admin", b =>
|
||||
@@ -178,19 +178,19 @@ namespace Cicm.Database.Migrations
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.CompanyDescription", b =>
|
||||
{
|
||||
b.Property<int>("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)");
|
||||
b.Property<int>("Id").ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("CompanyId").HasColumnName("company_id").HasColumnType("int(11)");
|
||||
b.Property<int>("CompanyId");
|
||||
|
||||
b.Property<string>("Text").HasColumnName("text").HasColumnType("text");
|
||||
b.Property<string>("Text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CompanyId").IsUnique().HasName("idx_company_id");
|
||||
b.HasIndex("CompanyId");
|
||||
|
||||
b.HasIndex("Text").HasName("idx_text");
|
||||
b.HasIndex("Text").HasAnnotation("MySql:FullTextIndex", true);
|
||||
|
||||
b.ToTable("company_descriptions");
|
||||
b.ToTable("CompanyDescriptions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.CompanyLogo", b =>
|
||||
@@ -1074,9 +1074,8 @@ namespace Cicm.Database.Migrations
|
||||
modelBuilder.Entity("Cicm.Database.Models.CompanyDescription",
|
||||
b =>
|
||||
{
|
||||
b.HasOne("Cicm.Database.Models.Company", "Company").WithOne("Description")
|
||||
.HasForeignKey("Cicm.Database.Models.CompanyDescription", "Id")
|
||||
.HasConstraintName("fk_company_id").OnDelete(DeleteBehavior.Cascade);
|
||||
b.HasOne("Cicm.Database.Models.Company", "Company").WithMany("Descriptions")
|
||||
.HasForeignKey("CompanyId").OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.CompanyLogo",
|
||||
|
||||
@@ -68,15 +68,15 @@ namespace Cicm.Database.Models
|
||||
|
||||
public virtual Iso31661Numeric Country { get; set; }
|
||||
[DisplayName("Sold to")]
|
||||
public virtual Company SoldTo { get; set; }
|
||||
public virtual CompanyDescription Description { get; set; }
|
||||
public virtual ICollection<CompanyLogo> Logos { get; set; }
|
||||
public virtual ICollection<Gpu> Gpus { get; set; }
|
||||
public virtual ICollection<Company> InverseSoldToNavigation { get; set; }
|
||||
public virtual ICollection<MachineFamily> MachineFamilies { get; set; }
|
||||
public virtual ICollection<Machine> Machines { get; set; }
|
||||
public virtual ICollection<Processor> Processors { get; set; }
|
||||
public virtual ICollection<SoundSynth> SoundSynths { get; set; }
|
||||
public virtual Company SoldTo { get; set; }
|
||||
public virtual ICollection<CompanyDescription> Descriptions { get; set; }
|
||||
public virtual ICollection<CompanyLogo> Logos { get; set; }
|
||||
public virtual ICollection<Gpu> Gpus { get; set; }
|
||||
public virtual ICollection<Company> InverseSoldToNavigation { get; set; }
|
||||
public virtual ICollection<MachineFamily> MachineFamilies { get; set; }
|
||||
public virtual ICollection<Machine> Machines { get; set; }
|
||||
public virtual ICollection<Processor> Processors { get; set; }
|
||||
public virtual ICollection<SoundSynth> SoundSynths { get; set; }
|
||||
public virtual CompanyLogo LastLogo =>
|
||||
Logos?.OrderByDescending(l => l.Year).FirstOrDefault();
|
||||
|
||||
@@ -92,5 +92,8 @@ namespace Cicm.Database.Models
|
||||
? ""
|
||||
: "Unknown"
|
||||
: Sold.Value.ToShortDateString();
|
||||
|
||||
[NotMapped]
|
||||
public CompanyDescription Description => Descriptions.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
@@ -70,12 +70,11 @@ namespace Cicm.Database.Models
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
if(!optionsBuilder.IsConfigured)
|
||||
{
|
||||
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. See http://go.microsoft.com/fwlink/?LinkId=723263 for guidance on storing connection strings.
|
||||
optionsBuilder.UseMySql("server=localhost;port=3306;user=cicm;password=cicmpass;database=cicm");
|
||||
optionsBuilder.UseLazyLoadingProxies();
|
||||
}
|
||||
if(optionsBuilder.IsConfigured) return;
|
||||
|
||||
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. See http://go.microsoft.com/fwlink/?LinkId=723263 for guidance on storing connection strings.
|
||||
optionsBuilder.UseMySql("server=localhost;port=3306;user=cicm;password=cicmpass;database=cicm");
|
||||
optionsBuilder.UseLazyLoadingProxies();
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
@@ -238,23 +237,7 @@ namespace Cicm.Database.Models
|
||||
.HasConstraintName("fk_companies_sold_to");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<CompanyDescription>(entity =>
|
||||
{
|
||||
entity.ToTable("company_descriptions");
|
||||
|
||||
entity.HasIndex(e => e.CompanyId).HasName("idx_company_id");
|
||||
|
||||
entity.HasIndex(e => e.Text).HasName("idx_text");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)").ValueGeneratedOnAdd();
|
||||
|
||||
entity.Property(e => e.CompanyId).HasColumnName("company_id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Text).HasColumnName("text").HasColumnType("text");
|
||||
|
||||
entity.HasOne(d => d.Company).WithOne(p => p.Description).HasForeignKey<CompanyDescription>(d => d.Id)
|
||||
.HasConstraintName("fk_company_id");
|
||||
});
|
||||
modelBuilder.Entity<CompanyDescription>().HasIndex(e => e.Text).ForMySqlIsFullText();
|
||||
|
||||
modelBuilder.Entity<CompanyLogo>(entity =>
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/******************************************************************************
|
||||
/******************************************************************************
|
||||
// Canary Islands Computer Museum Website
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
@@ -50,7 +50,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// GET: Admin/CompanyDescriptions
|
||||
// GET: CompanyDescription
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
IIncludableQueryable<CompanyDescription, Company> cicmContext =
|
||||
@@ -58,26 +58,27 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
return View(await cicmContext.ToListAsync());
|
||||
}
|
||||
|
||||
// GET: Admin/CompanyDescriptions/Details/5
|
||||
// GET: CompanyDescription/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
CompanyDescription companyDescription =
|
||||
await _context.CompanyDescriptions.Include(c => c.Company).FirstOrDefaultAsync(m => m.Id == id);
|
||||
CompanyDescription companyDescription = await _context.CompanyDescriptions
|
||||
.Include(c => c.Company)
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if(companyDescription == null) return NotFound();
|
||||
|
||||
return View(companyDescription);
|
||||
}
|
||||
|
||||
// GET: Admin/CompanyDescriptions/Create
|
||||
// GET: CompanyDescription/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
ViewData["Id"] = new SelectList(_context.Companies, "Id", "Name");
|
||||
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name");
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: Admin/CompanyDescriptions/Create
|
||||
// POST: CompanyDescription/Create
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||
[HttpPost]
|
||||
@@ -91,11 +92,11 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
ViewData["Id"] = new SelectList(_context.Companies, "Id", "Name", companyDescription.Id);
|
||||
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", companyDescription.CompanyId);
|
||||
return View(companyDescription);
|
||||
}
|
||||
|
||||
// GET: Admin/CompanyDescriptions/Edit/5
|
||||
// GET: CompanyDescription/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
@@ -103,11 +104,11 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
CompanyDescription companyDescription = await _context.CompanyDescriptions.FindAsync(id);
|
||||
if(companyDescription == null) return NotFound();
|
||||
|
||||
ViewData["Id"] = new SelectList(_context.Companies, "Id", "Name", companyDescription.Id);
|
||||
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", companyDescription.CompanyId);
|
||||
return View(companyDescription);
|
||||
}
|
||||
|
||||
// POST: Admin/CompanyDescriptions/Edit/5
|
||||
// POST: CompanyDescription/Edit/5
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||
[HttpPost]
|
||||
@@ -133,23 +134,24 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
ViewData["Id"] = new SelectList(_context.Companies, "Id", "Name", companyDescription.Id);
|
||||
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", companyDescription.CompanyId);
|
||||
return View(companyDescription);
|
||||
}
|
||||
|
||||
// GET: Admin/CompanyDescriptions/Delete/5
|
||||
// GET: CompanyDescription/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
CompanyDescription companyDescription =
|
||||
await _context.CompanyDescriptions.Include(c => c.Company).FirstOrDefaultAsync(m => m.Id == id);
|
||||
CompanyDescription companyDescription = await _context.CompanyDescriptions
|
||||
.Include(c => c.Company)
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if(companyDescription == null) return NotFound();
|
||||
|
||||
return View(companyDescription);
|
||||
}
|
||||
|
||||
// POST: Admin/CompanyDescriptions/Delete/5
|
||||
// POST: CompanyDescription/Delete/5
|
||||
[HttpPost]
|
||||
[ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@{
|
||||
@{
|
||||
/******************************************************************************
|
||||
// Canary Islands Computer Museum Website
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -35,7 +35,7 @@
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
|
||||
<h2>Create</h2>
|
||||
<h1>Create</h1>
|
||||
|
||||
<h4>Company description</h4>
|
||||
<hr />
|
||||
@@ -49,11 +49,10 @@
|
||||
<label asp-for="CompanyId"
|
||||
class="control-label">
|
||||
</label>
|
||||
<input asp-for="CompanyId"
|
||||
class="form-control" />
|
||||
<span asp-validation-for="CompanyId"
|
||||
class="text-danger">
|
||||
</span>
|
||||
<select asp-for="CompanyId"
|
||||
class="form-control"
|
||||
asp-items="ViewBag.CompanyId">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Text"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@{
|
||||
@{
|
||||
/******************************************************************************
|
||||
// Canary Islands Computer Museum Website
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -8,7 +8,7 @@
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view delete
|
||||
// Admin view create
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
@@ -35,36 +35,36 @@
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
<h1>Delete</h1>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Company description</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.CompanyId)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.CompanyId)
|
||||
</dd>
|
||||
<dt>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Text)
|
||||
</dt>
|
||||
<dd>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Text)
|
||||
</dd>
|
||||
<dt>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Company)
|
||||
</dt>
|
||||
<dd>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Company.Name)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
<input type="hidden"
|
||||
asp-for="Id" />
|
||||
<input class="btn btn-danger"
|
||||
type="submit"
|
||||
value="Delete" />
|
||||
<a asp-action="Index"
|
||||
class="btn btn-secondary">
|
||||
Back to List
|
||||
</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,4 +1,4 @@
|
||||
@{
|
||||
@{
|
||||
/******************************************************************************
|
||||
// Canary Islands Computer Museum Website
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -8,7 +8,7 @@
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view details
|
||||
// Admin view create
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
@@ -35,33 +35,34 @@
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
<h1>Details</h1>
|
||||
|
||||
<div>
|
||||
<h4>Company description</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.CompanyId)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.CompanyId)
|
||||
</dd>
|
||||
<dt>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Text)
|
||||
</dt>
|
||||
<dd>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Text)
|
||||
</dd>
|
||||
<dt>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Company)
|
||||
</dt>
|
||||
<dd>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Company.Name)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
<a asp-action="Edit"
|
||||
asp-route-id="@Model.Id"
|
||||
class="btn btn-primary">
|
||||
Edit
|
||||
</a>
|
||||
<a asp-action="Index"
|
||||
class="btn btn-secondary">
|
||||
Back to List
|
||||
</a>
|
||||
</div>
|
||||
@@ -1,4 +1,4 @@
|
||||
@{
|
||||
@{
|
||||
/******************************************************************************
|
||||
// Canary Islands Computer Museum Website
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -8,7 +8,7 @@
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view edit
|
||||
// Admin view create
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
@@ -35,9 +35,9 @@
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
<h1>Edit</h1>
|
||||
|
||||
<h4>Company description</h4>
|
||||
<h4>CompanyDescription</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
@@ -51,8 +51,10 @@
|
||||
<label asp-for="CompanyId"
|
||||
class="control-label">
|
||||
</label>
|
||||
<input asp-for="CompanyId"
|
||||
class="form-control" />
|
||||
<select asp-for="CompanyId"
|
||||
class="form-control"
|
||||
asp-items="ViewBag.CompanyId">
|
||||
</select>
|
||||
<span asp-validation-for="CompanyId"
|
||||
class="text-danger">
|
||||
</span>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@{
|
||||
@{
|
||||
/******************************************************************************
|
||||
// Canary Islands Computer Museum Website
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -8,7 +8,7 @@
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view index
|
||||
// Admin view create
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
@@ -36,7 +36,7 @@
|
||||
ViewData["Title"] = "Company descriptions (Admin)";
|
||||
}
|
||||
|
||||
<h2>Company descriptions</h2>
|
||||
<h1>Company description</h1>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create"
|
||||
@@ -47,9 +47,6 @@
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CompanyId)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Text)
|
||||
</th>
|
||||
@@ -63,9 +60,6 @@
|
||||
@foreach(CompanyDescription item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CompanyId)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Text)
|
||||
</td>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<Version>3.0.99.398</Version>
|
||||
<Version>3.0.99.414</Version>
|
||||
<Company>Canary Islands Computer Museum</Company>
|
||||
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
|
||||
<Product>Canary Islands Computer Museum Website</Product>
|
||||
|
||||
Reference in New Issue
Block a user