Upload and render company logo SVGs when creating new logo entry.

This commit is contained in:
2019-05-26 21:59:05 +01:00
parent f472e11d23
commit e1e14c3781
5 changed files with 300 additions and 66 deletions

View File

@@ -29,17 +29,28 @@
*******************************************************************************/
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.AspNetCore.Http;
namespace Cicm.Database.Models
{
public class CompanyLogo : BaseModel<int>
{
public int CompanyId { get; set; }
public int CompanyId { get; set; }
[Range(1000, 3000)]
public int? Year { get; set; }
public Guid Guid { get; set; }
public int? Year { get; set; }
public Guid Guid { get; set; }
public virtual Company Company { get; set; }
[NotMapped]
[Required(ErrorMessage = "SVG logo required")]
[DisplayName("Upload SVG logo:")]
public IFormFile SvgLogo { get; set; }
[NotMapped]
public string ErrorMessage { get; set; }
}
}