using System; using System.Collections.Generic; using System.Linq; using System.Text;
namespace TrackerLibrary { /// /// Represent what the prize if for the given place. /// public class PrizeModel { /// /// The unique identifier for the prize /// public int Id { get; set; } /// /// The numeric identifier for the place(for the second place, etc.) /// public int PlaceNumber { get; set; } /// /// The friendly name for the place (second place, first runner up, etc.) ///
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TrackerLibrary
{
/// <summary>
/// Represent what the prize if for the given place.
/// </summary>
public class PrizeModel
{
/// <summary>
/// The unique identifier for the prize
/// </summary>
public int Id { get; set; }
/// <summary>
/// The numeric identifier for the place(for the second place, etc.)
/// </summary>
public int PlaceNumber { get; set; }
/// <summary>
/// The friendly name for the place (second place, first runner up, etc.)
/// </summary>
public string PlaceName { get; set; }
/// <summary>
/// The find amount this place earns or zero if it is not used.
/// </summary>
public decimal PrizeAmount { get; set; }
/// <summary>
/// The number that represent the percentage of theoverall take or
/// zero if it is not used. The percentage if a fraction of 1 (so O.S for
/// 50%)
/// </summary>
public double PrizePercentage { get; set; }
public PrizeModel()
{
}
public PrizeModel(string placeName, string placeNumber, string placeAmount, string placePercentage)
{
PlaceName = PlaceName;
int placeNumberValue = 0;
int.TryParse(placeNumber, out placeNumberValue);
placeNumber = placeNumberValue; //AQUI ESTA EL ERROR
decimal prizeAmountValue = 0;
decimal.TryParse(prizeAmount, out prizeAmountValue);
PrizeAmount = prizeAmountValue;
}
public string prizeAmount { get; set; }
}
}
}