1234567891011121314151617181920212223242526272829303132333435363738 |
- namespace WebApplication1.models
- {
- public class Product
- {
- public decimal MinCostForAgent { get; set; }
- public int ID { get; set; }
- public required string Title { get; set; }
- public string? Image { get; set; }
- public int ProductTypeID { get; set; }
- public string? ProductTypeTitle { get; set; }
- public required string ArticleNumber { get; set; }
- public double? MaterialCost { get; set; }
- public string? MaterialString { get; set; }
- public int? LastMonthSaleQuantity { get; set; }
- public string? Description { get; set; }
- public decimal? Price { get; set; }
- public string? Article { get; set; }
- public int? ProductionPersonCount { get; set; }
- public int ProductionWorkshopNumber { get; set; }
- public string? BackgroundColor
- {
- get
- {
- if (LastMonthSaleQuantity == null || LastMonthSaleQuantity == 0) return "#fff0f5"; // белый
- return "#ffafcc"; // розовый
- }
- }
- public Uri? ImageBitmap
- {
- get
- {
- var imageName = Environment.CurrentDirectory + (Image ?? "");
- return System.IO.File.Exists(imageName) ? new Uri(imageName) : null;
- }
- }
- }
- }
|