MVC-kopplingen till tournament tracker är klar

This commit is contained in:
2020-05-14 21:16:25 +02:00
parent dc4162db95
commit bd0c6f0a7c
16 changed files with 1206 additions and 931 deletions

View File

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using TrackerLibrary.Models;
namespace MVCUI.Models
{
public class TournamentMVCCreateModel
{
[Display(Name = "Tournament Name")]
[StringLength(100, MinimumLength = 2)]
[Required]
public string TournamentName { get; set; }
/// <summary>
/// The amount of money each team needs to put up to enter
/// </summary>
[Display(Name = "Entry Fee")]
[DataType(DataType.Currency)]
[Required]
public decimal EntryFee { get; set; }
/// <summary>
/// The set of teams that have entered
/// </summary>
[Display(Name = "Entered Teams")]
public List<SelectListItem> EnteredTeams { get; set; } = new List<SelectListItem>();
/// <summary>
/// The list of prizes for various places
/// </summary>
public List<string> SelectedEnteredTeams { get; set; } = new List<string>();
[Display(Name = "Prizes")]
public List<SelectListItem> Prizes { get; set; } = new List<SelectListItem>();
public List<string> SelectedPrizes { get; set; } = new List<string>();
}
}