123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using MySqlConnector;
- using Dapper;
- using mysql_connector2.res;
- using System.Windows;
- namespace mysql_connector2.res
- {
- public class Product
- {
- public decimal MinCostForAgent { get; set; }
- public int ID { get; set; }
- public required string Title { get; set; }
- public int ProductTypeID { get; set; }
- public required string ProductTypeTitle { get; set; }
- public string Description { get; set; }
- public decimal Price { get; set; }
- public string Article { get; set; }
- public int ProductionPersonCount { get; set; }
- public Visibility DeleteProductVisibly { get; set; } = Visibility.Collapsed;
- public int ProductionWorkshopNumber { get; set; }
- public double? MaterialCost { get; set; }
- public string? MaterialString { get; set; }
- public required string ArticleNumber { get; set; }
- public int? LastMonthSaleQuantity { get; set; }
- public string BackgroundColor
- {
- get
- {
- if (LastMonthSaleQuantity == null || LastMonthSaleQuantity == 0) return "#ff97bb"; // белый
- return "#fff"; // розовый
- }
- }
- public string? Image { get; set; }
- public Uri? ImageBitmap
- {
- get
- {
- var imageName = Environment.CurrentDirectory + (Image ?? "");
- return System.IO.File.Exists(imageName) ? new Uri(imageName) : null;
- }
- }
- }
- }
|