Scaffold CRUD pages for machine photos.

This commit is contained in:
2019-05-27 03:46:21 +01:00
parent 804a2c5286
commit cee69b1c52
8 changed files with 1551 additions and 1 deletions

View File

@@ -0,0 +1,134 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using Cicm.Database.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
[Authorize]
public class MachinePhotosController : Controller
{
readonly cicmContext _context;
public MachinePhotosController(cicmContext context)
{
_context = context;
}
// GET: MachinePhotos
public async Task<IActionResult> Index()
{
return View(await _context.MachinePhotos.Include(m => m.Machine).Include(m => m.Machine.Company)
.Include(m => m.User).ToListAsync());
}
// GET: MachinePhotos/Details/5
public async Task<IActionResult> Details(Guid? id)
{
if(id == null) return NotFound();
MachinePhoto machinePhoto = await _context.MachinePhotos.FirstOrDefaultAsync(m => m.Id == id);
if(machinePhoto == null) return NotFound();
return View(machinePhoto);
}
// GET: MachinePhotos/Create
public IActionResult Create() => View();
// POST: MachinePhotos/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]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create(
[Bind(
"Author,CameraManufacturer,CameraModel,ColorSpace,Comments,Contrast,CreationDate,DigitalZoomRatio,ExifVersion,Exposure,ExposureMethod,ExposureProgram,Flash,Focal,FocalLength,FocalLengthEquivalent,HorizontalResolution,IsoRating,Lens,License,LightSource,MeteringMode,Orientation,PixelComposition,Saturation,SceneCaptureType,SceneControl,SensingMethod,Sharpness,SoftwareUsed,SubjectDistanceRange,UploadDate,VerticalResolution,WhiteBalance,Id")]
MachinePhoto machinePhoto)
{
if(ModelState.IsValid)
{
machinePhoto.Id = Guid.NewGuid();
_context.Add(machinePhoto);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
return View(machinePhoto);
}
// GET: MachinePhotos/Edit/5
public async Task<IActionResult> Edit(Guid? id)
{
if(id == null) return NotFound();
MachinePhoto machinePhoto = await _context.MachinePhotos.FindAsync(id);
if(machinePhoto == null) return NotFound();
return View(machinePhoto);
}
// POST: MachinePhotos/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]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(Guid id, [Bind(
"Author,CameraManufacturer,CameraModel,ColorSpace,Comments,Contrast,CreationDate,DigitalZoomRatio,ExifVersion,Exposure,ExposureMethod,ExposureProgram,Flash,Focal,FocalLength,FocalLengthEquivalent,HorizontalResolution,IsoRating,Lens,License,LightSource,MeteringMode,Orientation,PixelComposition,Saturation,SceneCaptureType,SceneControl,SensingMethod,Sharpness,SoftwareUsed,SubjectDistanceRange,UploadDate,VerticalResolution,WhiteBalance,Id")]
MachinePhoto machinePhoto)
{
if(id != machinePhoto.Id) return NotFound();
if(ModelState.IsValid)
{
try
{
_context.Update(machinePhoto);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!MachinePhotoExists(machinePhoto.Id)) return NotFound();
throw;
}
return RedirectToAction(nameof(Index));
}
return View(machinePhoto);
}
// GET: MachinePhotos/Delete/5
public async Task<IActionResult> Delete(Guid? id)
{
if(id == null) return NotFound();
MachinePhoto machinePhoto = await _context.MachinePhotos.FirstOrDefaultAsync(m => m.Id == id);
if(machinePhoto == null) return NotFound();
return View(machinePhoto);
}
// POST: MachinePhotos/Delete/5
[HttpPost]
[ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(Guid id)
{
MachinePhoto machinePhoto = await _context.MachinePhotos.FindAsync(id);
_context.MachinePhotos.Remove(machinePhoto);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
bool MachinePhotoExists(Guid id)
{
return _context.MachinePhotos.Any(e => e.Id == id);
}
}
}

View File

@@ -47,6 +47,7 @@
<a asp-controller="InstructionSetExtensionsByProcessor">Instruction set extensions by processor</a><br />
<a asp-controller="MachineFamilies">Machine families</a><br />
<a asp-controller="Machines">Machines</a><br />
<a asp-controller="MachinePhotos">Machine photos</a><br />
<a asp-controller="MemoryByMachines">Memory by machines</a><br />
<a asp-controller="News">News</a><br />
<a asp-controller="ProcessorsByMachines">Processors by machines</a><br />

View File

@@ -0,0 +1,358 @@
@model Cicm.Database.Models.MachinePhoto
@{
ViewData["Title"] = "Create";
}
<h1>Create</h1>
<h4>MachinePhoto</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly"
class="text-danger">
</div>
<div class="form-group">
<label asp-for="Author"
class="control-label">
</label>
<input asp-for="Author"
class="form-control" />
<span asp-validation-for="Author"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="CameraManufacturer"
class="control-label">
</label>
<input asp-for="CameraManufacturer"
class="form-control" />
<span asp-validation-for="CameraManufacturer"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="CameraModel"
class="control-label">
</label>
<input asp-for="CameraModel"
class="form-control" />
<span asp-validation-for="CameraModel"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="ColorSpace"
class="control-label">
</label>
<input asp-for="ColorSpace"
class="form-control" />
<span asp-validation-for="ColorSpace"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Comments"
class="control-label">
</label>
<input asp-for="Comments"
class="form-control" />
<span asp-validation-for="Comments"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Contrast"
class="control-label">
</label>
<input asp-for="Contrast"
class="form-control" />
<span asp-validation-for="Contrast"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="CreationDate"
class="control-label">
</label>
<input asp-for="CreationDate"
class="form-control" />
<span asp-validation-for="CreationDate"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="DigitalZoomRatio"
class="control-label">
</label>
<input asp-for="DigitalZoomRatio"
class="form-control" />
<span asp-validation-for="DigitalZoomRatio"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="ExifVersion"
class="control-label">
</label>
<input asp-for="ExifVersion"
class="form-control" />
<span asp-validation-for="ExifVersion"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Exposure"
class="control-label">
</label>
<input asp-for="Exposure"
class="form-control" />
<span asp-validation-for="Exposure"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="ExposureMethod"
class="control-label">
</label>
<input asp-for="ExposureMethod"
class="form-control" />
<span asp-validation-for="ExposureMethod"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="ExposureProgram"
class="control-label">
</label>
<input asp-for="ExposureProgram"
class="form-control" />
<span asp-validation-for="ExposureProgram"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Flash"
class="control-label">
</label>
<input asp-for="Flash"
class="form-control" />
<span asp-validation-for="Flash"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Focal"
class="control-label">
</label>
<input asp-for="Focal"
class="form-control" />
<span asp-validation-for="Focal"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="FocalLength"
class="control-label">
</label>
<input asp-for="FocalLength"
class="form-control" />
<span asp-validation-for="FocalLength"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="FocalLengthEquivalent"
class="control-label">
</label>
<input asp-for="FocalLengthEquivalent"
class="form-control" />
<span asp-validation-for="FocalLengthEquivalent"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="HorizontalResolution"
class="control-label">
</label>
<input asp-for="HorizontalResolution"
class="form-control" />
<span asp-validation-for="HorizontalResolution"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="IsoRating"
class="control-label">
</label>
<input asp-for="IsoRating"
class="form-control" />
<span asp-validation-for="IsoRating"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Lens"
class="control-label">
</label>
<input asp-for="Lens"
class="form-control" />
<span asp-validation-for="Lens"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="License"
class="control-label">
</label>
<input asp-for="License"
class="form-control" />
<span asp-validation-for="License"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="LightSource"
class="control-label">
</label>
<input asp-for="LightSource"
class="form-control" />
<span asp-validation-for="LightSource"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="MeteringMode"
class="control-label">
</label>
<input asp-for="MeteringMode"
class="form-control" />
<span asp-validation-for="MeteringMode"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Orientation"
class="control-label">
</label>
<input asp-for="Orientation"
class="form-control" />
<span asp-validation-for="Orientation"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="PixelComposition"
class="control-label">
</label>
<input asp-for="PixelComposition"
class="form-control" />
<span asp-validation-for="PixelComposition"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Saturation"
class="control-label">
</label>
<input asp-for="Saturation"
class="form-control" />
<span asp-validation-for="Saturation"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="SceneCaptureType"
class="control-label">
</label>
<input asp-for="SceneCaptureType"
class="form-control" />
<span asp-validation-for="SceneCaptureType"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="SceneControl"
class="control-label">
</label>
<input asp-for="SceneControl"
class="form-control" />
<span asp-validation-for="SceneControl"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="SensingMethod"
class="control-label">
</label>
<input asp-for="SensingMethod"
class="form-control" />
<span asp-validation-for="SensingMethod"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Sharpness"
class="control-label">
</label>
<input asp-for="Sharpness"
class="form-control" />
<span asp-validation-for="Sharpness"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="SoftwareUsed"
class="control-label">
</label>
<input asp-for="SoftwareUsed"
class="form-control" />
<span asp-validation-for="SoftwareUsed"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="SubjectDistanceRange"
class="control-label">
</label>
<input asp-for="SubjectDistanceRange"
class="form-control" />
<span asp-validation-for="SubjectDistanceRange"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="VerticalResolution"
class="control-label">
</label>
<input asp-for="VerticalResolution"
class="form-control" />
<span asp-validation-for="VerticalResolution"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="WhiteBalance"
class="control-label">
</label>
<input asp-for="WhiteBalance"
class="form-control" />
<span asp-validation-for="WhiteBalance"
class="text-danger">
</span>
</div>
<div class="form-group">
<input class="btn btn-primary"
type="submit"
value="Create" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,228 @@
@model Cicm.Database.Models.MachinePhoto
@{
ViewData["Title"] = "Delete";
}
<h1>Delete</h1>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>MachinePhoto</h4>
<hr />
<dl class="row">
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Author)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Author)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.CameraManufacturer)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.CameraManufacturer)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.CameraModel)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.CameraModel)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.ColorSpace)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.ColorSpace)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Comments)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Comments)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Contrast)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Contrast)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.CreationDate)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.CreationDate)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.DigitalZoomRatio)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.DigitalZoomRatio)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.ExifVersion)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.ExifVersion)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Exposure)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Exposure)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.ExposureMethod)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.ExposureMethod)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.ExposureProgram)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.ExposureProgram)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Flash)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Flash)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Focal)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Focal)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.FocalLength)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.FocalLength)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.FocalLengthEquivalent)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.FocalLengthEquivalent)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.HorizontalResolution)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.HorizontalResolution)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.IsoRating)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.IsoRating)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Lens)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Lens)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.License)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.License)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.LightSource)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.LightSource)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.MeteringMode)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.MeteringMode)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Orientation)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Orientation)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.PixelComposition)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.PixelComposition)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Saturation)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Saturation)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.SceneCaptureType)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.SceneCaptureType)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.SceneControl)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.SceneControl)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.SensingMethod)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.SensingMethod)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Sharpness)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Sharpness)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.SoftwareUsed)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.SoftwareUsed)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.SubjectDistanceRange)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.SubjectDistanceRange)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.UploadDate)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.UploadDate)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.VerticalResolution)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.VerticalResolution)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.WhiteBalance)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.WhiteBalance)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden"
asp-for="Id" />
<input class="btn btn-danger"
type="submit"
value="Delete" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@@ -0,0 +1,225 @@
@model Cicm.Database.Models.MachinePhoto
@{
ViewData["Title"] = "Details";
}
<h1>Details</h1>
<div>
<h4>MachinePhoto</h4>
<hr />
<dl class="row">
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Author)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Author)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.CameraManufacturer)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.CameraManufacturer)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.CameraModel)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.CameraModel)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.ColorSpace)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.ColorSpace)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Comments)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Comments)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Contrast)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Contrast)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.CreationDate)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.CreationDate)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.DigitalZoomRatio)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.DigitalZoomRatio)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.ExifVersion)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.ExifVersion)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Exposure)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Exposure)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.ExposureMethod)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.ExposureMethod)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.ExposureProgram)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.ExposureProgram)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Flash)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Flash)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Focal)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Focal)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.FocalLength)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.FocalLength)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.FocalLengthEquivalent)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.FocalLengthEquivalent)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.HorizontalResolution)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.HorizontalResolution)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.IsoRating)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.IsoRating)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Lens)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Lens)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.License)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.License)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.LightSource)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.LightSource)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.MeteringMode)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.MeteringMode)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Orientation)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Orientation)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.PixelComposition)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.PixelComposition)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Saturation)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Saturation)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.SceneCaptureType)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.SceneCaptureType)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.SceneControl)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.SceneControl)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.SensingMethod)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.SensingMethod)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Sharpness)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Sharpness)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.SoftwareUsed)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.SoftwareUsed)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.SubjectDistanceRange)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.SubjectDistanceRange)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.UploadDate)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.UploadDate)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.VerticalResolution)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.VerticalResolution)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.WhiteBalance)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.WhiteBalance)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit"
asp-route-id="@Model.Id">
Edit
</a> |
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,360 @@
@model Cicm.Database.Models.MachinePhoto
@{
ViewData["Title"] = "Edit";
}
<h1>Edit</h1>
<h4>MachinePhoto</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly"
class="text-danger">
</div>
<div class="form-group">
<label asp-for="Author"
class="control-label">
</label>
<input asp-for="Author"
class="form-control" />
<span asp-validation-for="Author"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="CameraManufacturer"
class="control-label">
</label>
<input asp-for="CameraManufacturer"
class="form-control" />
<span asp-validation-for="CameraManufacturer"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="CameraModel"
class="control-label">
</label>
<input asp-for="CameraModel"
class="form-control" />
<span asp-validation-for="CameraModel"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="ColorSpace"
class="control-label">
</label>
<input asp-for="ColorSpace"
class="form-control" />
<span asp-validation-for="ColorSpace"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Comments"
class="control-label">
</label>
<input asp-for="Comments"
class="form-control" />
<span asp-validation-for="Comments"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Contrast"
class="control-label">
</label>
<input asp-for="Contrast"
class="form-control" />
<span asp-validation-for="Contrast"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="CreationDate"
class="control-label">
</label>
<input asp-for="CreationDate"
class="form-control" />
<span asp-validation-for="CreationDate"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="DigitalZoomRatio"
class="control-label">
</label>
<input asp-for="DigitalZoomRatio"
class="form-control" />
<span asp-validation-for="DigitalZoomRatio"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="ExifVersion"
class="control-label">
</label>
<input asp-for="ExifVersion"
class="form-control" />
<span asp-validation-for="ExifVersion"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Exposure"
class="control-label">
</label>
<input asp-for="Exposure"
class="form-control" />
<span asp-validation-for="Exposure"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="ExposureMethod"
class="control-label">
</label>
<input asp-for="ExposureMethod"
class="form-control" />
<span asp-validation-for="ExposureMethod"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="ExposureProgram"
class="control-label">
</label>
<input asp-for="ExposureProgram"
class="form-control" />
<span asp-validation-for="ExposureProgram"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Flash"
class="control-label">
</label>
<input asp-for="Flash"
class="form-control" />
<span asp-validation-for="Flash"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Focal"
class="control-label">
</label>
<input asp-for="Focal"
class="form-control" />
<span asp-validation-for="Focal"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="FocalLength"
class="control-label">
</label>
<input asp-for="FocalLength"
class="form-control" />
<span asp-validation-for="FocalLength"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="FocalLengthEquivalent"
class="control-label">
</label>
<input asp-for="FocalLengthEquivalent"
class="form-control" />
<span asp-validation-for="FocalLengthEquivalent"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="HorizontalResolution"
class="control-label">
</label>
<input asp-for="HorizontalResolution"
class="form-control" />
<span asp-validation-for="HorizontalResolution"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="IsoRating"
class="control-label">
</label>
<input asp-for="IsoRating"
class="form-control" />
<span asp-validation-for="IsoRating"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Lens"
class="control-label">
</label>
<input asp-for="Lens"
class="form-control" />
<span asp-validation-for="Lens"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="License"
class="control-label">
</label>
<input asp-for="License"
class="form-control" />
<span asp-validation-for="License"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="LightSource"
class="control-label">
</label>
<input asp-for="LightSource"
class="form-control" />
<span asp-validation-for="LightSource"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="MeteringMode"
class="control-label">
</label>
<input asp-for="MeteringMode"
class="form-control" />
<span asp-validation-for="MeteringMode"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Orientation"
class="control-label">
</label>
<input asp-for="Orientation"
class="form-control" />
<span asp-validation-for="Orientation"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="PixelComposition"
class="control-label">
</label>
<input asp-for="PixelComposition"
class="form-control" />
<span asp-validation-for="PixelComposition"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Saturation"
class="control-label">
</label>
<input asp-for="Saturation"
class="form-control" />
<span asp-validation-for="Saturation"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="SceneCaptureType"
class="control-label">
</label>
<input asp-for="SceneCaptureType"
class="form-control" />
<span asp-validation-for="SceneCaptureType"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="SceneControl"
class="control-label">
</label>
<input asp-for="SceneControl"
class="form-control" />
<span asp-validation-for="SceneControl"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="SensingMethod"
class="control-label">
</label>
<input asp-for="SensingMethod"
class="form-control" />
<span asp-validation-for="SensingMethod"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Sharpness"
class="control-label">
</label>
<input asp-for="Sharpness"
class="form-control" />
<span asp-validation-for="Sharpness"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="SoftwareUsed"
class="control-label">
</label>
<input asp-for="SoftwareUsed"
class="form-control" />
<span asp-validation-for="SoftwareUsed"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="SubjectDistanceRange"
class="control-label">
</label>
<input asp-for="SubjectDistanceRange"
class="form-control" />
<span asp-validation-for="SubjectDistanceRange"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="VerticalResolution"
class="control-label">
</label>
<input asp-for="VerticalResolution"
class="form-control" />
<span asp-validation-for="VerticalResolution"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="WhiteBalance"
class="control-label">
</label>
<input asp-for="WhiteBalance"
class="form-control" />
<span asp-validation-for="WhiteBalance"
class="text-danger">
</span>
</div>
<input type="hidden"
asp-for="Id" />
<div class="form-group">
<input class="btn btn-primary"
type="submit"
value="Save" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,244 @@
@using Cicm.Database.Models
@model IEnumerable<Cicm.Database.Models.MachinePhoto>
@{
ViewData["Title"] = "Index";
}
<h1>Index</h1>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Author)
</th>
<th>
@Html.DisplayNameFor(model => model.CameraManufacturer)
</th>
<th>
@Html.DisplayNameFor(model => model.CameraModel)
</th>
<th>
@Html.DisplayNameFor(model => model.ColorSpace)
</th>
<th>
@Html.DisplayNameFor(model => model.Comments)
</th>
<th>
@Html.DisplayNameFor(model => model.Contrast)
</th>
<th>
@Html.DisplayNameFor(model => model.CreationDate)
</th>
<th>
@Html.DisplayNameFor(model => model.DigitalZoomRatio)
</th>
<th>
@Html.DisplayNameFor(model => model.ExifVersion)
</th>
<th>
@Html.DisplayNameFor(model => model.Exposure)
</th>
<th>
@Html.DisplayNameFor(model => model.ExposureMethod)
</th>
<th>
@Html.DisplayNameFor(model => model.ExposureProgram)
</th>
<th>
@Html.DisplayNameFor(model => model.Flash)
</th>
<th>
@Html.DisplayNameFor(model => model.Focal)
</th>
<th>
@Html.DisplayNameFor(model => model.FocalLength)
</th>
<th>
@Html.DisplayNameFor(model => model.FocalLengthEquivalent)
</th>
<th>
@Html.DisplayNameFor(model => model.HorizontalResolution)
</th>
<th>
@Html.DisplayNameFor(model => model.IsoRating)
</th>
<th>
@Html.DisplayNameFor(model => model.Lens)
</th>
<th>
@Html.DisplayNameFor(model => model.License)
</th>
<th>
@Html.DisplayNameFor(model => model.LightSource)
</th>
<th>
@Html.DisplayNameFor(model => model.MeteringMode)
</th>
<th>
@Html.DisplayNameFor(model => model.Orientation)
</th>
<th>
@Html.DisplayNameFor(model => model.PixelComposition)
</th>
<th>
@Html.DisplayNameFor(model => model.Saturation)
</th>
<th>
@Html.DisplayNameFor(model => model.SceneCaptureType)
</th>
<th>
@Html.DisplayNameFor(model => model.SceneControl)
</th>
<th>
@Html.DisplayNameFor(model => model.SensingMethod)
</th>
<th>
@Html.DisplayNameFor(model => model.Sharpness)
</th>
<th>
@Html.DisplayNameFor(model => model.SoftwareUsed)
</th>
<th>
@Html.DisplayNameFor(model => model.SubjectDistanceRange)
</th>
<th>
@Html.DisplayNameFor(model => model.UploadDate)
</th>
<th>
@Html.DisplayNameFor(model => model.VerticalResolution)
</th>
<th>
@Html.DisplayNameFor(model => model.WhiteBalance)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach(MachinePhoto item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Author)
</td>
<td>
@Html.DisplayFor(modelItem => item.CameraManufacturer)
</td>
<td>
@Html.DisplayFor(modelItem => item.CameraModel)
</td>
<td>
@Html.DisplayFor(modelItem => item.ColorSpace)
</td>
<td>
@Html.DisplayFor(modelItem => item.Comments)
</td>
<td>
@Html.DisplayFor(modelItem => item.Contrast)
</td>
<td>
@Html.DisplayFor(modelItem => item.CreationDate)
</td>
<td>
@Html.DisplayFor(modelItem => item.DigitalZoomRatio)
</td>
<td>
@Html.DisplayFor(modelItem => item.ExifVersion)
</td>
<td>
@Html.DisplayFor(modelItem => item.Exposure)
</td>
<td>
@Html.DisplayFor(modelItem => item.ExposureMethod)
</td>
<td>
@Html.DisplayFor(modelItem => item.ExposureProgram)
</td>
<td>
@Html.DisplayFor(modelItem => item.Flash)
</td>
<td>
@Html.DisplayFor(modelItem => item.Focal)
</td>
<td>
@Html.DisplayFor(modelItem => item.FocalLength)
</td>
<td>
@Html.DisplayFor(modelItem => item.FocalLengthEquivalent)
</td>
<td>
@Html.DisplayFor(modelItem => item.HorizontalResolution)
</td>
<td>
@Html.DisplayFor(modelItem => item.IsoRating)
</td>
<td>
@Html.DisplayFor(modelItem => item.Lens)
</td>
<td>
@Html.DisplayFor(modelItem => item.License)
</td>
<td>
@Html.DisplayFor(modelItem => item.LightSource)
</td>
<td>
@Html.DisplayFor(modelItem => item.MeteringMode)
</td>
<td>
@Html.DisplayFor(modelItem => item.Orientation)
</td>
<td>
@Html.DisplayFor(modelItem => item.PixelComposition)
</td>
<td>
@Html.DisplayFor(modelItem => item.Saturation)
</td>
<td>
@Html.DisplayFor(modelItem => item.SceneCaptureType)
</td>
<td>
@Html.DisplayFor(modelItem => item.SceneControl)
</td>
<td>
@Html.DisplayFor(modelItem => item.SensingMethod)
</td>
<td>
@Html.DisplayFor(modelItem => item.Sharpness)
</td>
<td>
@Html.DisplayFor(modelItem => item.SoftwareUsed)
</td>
<td>
@Html.DisplayFor(modelItem => item.SubjectDistanceRange)
</td>
<td>
@Html.DisplayFor(modelItem => item.UploadDate)
</td>
<td>
@Html.DisplayFor(modelItem => item.VerticalResolution)
</td>
<td>
@Html.DisplayFor(modelItem => item.WhiteBalance)
</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>
}
</tbody>
</table>

View File

@@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<Version>3.0.99.578</Version>
<Version>3.0.99.582</Version>
<Company>Canary Islands Computer Museum</Company>
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
<Product>Canary Islands Computer Museum Website</Product>