Исправление
This commit is contained in:
parent
566ab1a0ff
commit
e2746c2043
@ -8,14 +8,13 @@ namespace FurnitureAssemblyContracts.Attributes
|
||||
{
|
||||
public ColumnAttribute(string title = "", bool visible = true, int width
|
||||
= 0, GridViewAutoSize gridViewAutoSize = GridViewAutoSize.None, bool
|
||||
isUseAutoSize = false, bool isFormatable = false, string? formatter = null)
|
||||
isUseAutoSize = false, string formatter = "")
|
||||
{
|
||||
Title = title;
|
||||
Visible = visible;
|
||||
Width = width;
|
||||
GridViewAutoSize = gridViewAutoSize;
|
||||
IsUseAutoSize = isUseAutoSize;
|
||||
IsFormatable = isFormatable;
|
||||
IsUseAutoSize = isUseAutoSize;
|
||||
Formatter = formatter;
|
||||
|
||||
}
|
||||
@ -24,7 +23,7 @@ namespace FurnitureAssemblyContracts.Attributes
|
||||
public int Width { get; private set; }
|
||||
public GridViewAutoSize GridViewAutoSize { get; private set; }
|
||||
public bool IsUseAutoSize { get; private set; }
|
||||
public bool IsFormatable { get; private set; }
|
||||
public string? Formatter { get; private set; }
|
||||
public bool IsFormatable => !string.IsNullOrEmpty(Formatter) ;
|
||||
public string Formatter { get; private set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ namespace FurnitureAssemblyContracts.ViewModels
|
||||
public int Id { get; set; }
|
||||
[Column(title: "Название компонента", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
||||
public string ComponentName { get; set; } = string.Empty;
|
||||
[Column(title: "Цена", width: 70, isFormatable: true, formatter: "0.00##")]
|
||||
[Column(title: "Цена", width: 70, formatter: "0.00##")]
|
||||
public double Cost { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ namespace FurnitureAssemblyContracts.ViewModels
|
||||
public int Id { get; set; }
|
||||
[Column(title: "Название изделия", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
||||
public string FurnitureName { get; set; } = string.Empty;
|
||||
[Column(title: "Цена", width: 70, isFormatable: true, formatter: "0.00##")]
|
||||
[Column(title: "Цена", width: 70, formatter: "0.00##")]
|
||||
public double Price { get; set; }
|
||||
[Column(visible: false)]
|
||||
public Dictionary<int, (IComponentModel, int)> FurnitureComponents{ get; set; } = new();
|
||||
|
@ -12,7 +12,7 @@ namespace FurnitureAssemblyContracts.ViewModels
|
||||
public int? ClientId { get; set; }
|
||||
[Column(title: "Отправитель", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
||||
public string SenderName { get; set; } = string.Empty;
|
||||
[Column(title: "Дата письма", width: 100, isFormatable: true, formatter: "dd/MM/yyyy")]
|
||||
[Column(title: "Дата письма", width: 100, formatter: "dd/MM/yyyy")]
|
||||
public DateTime DateDelivery { get; set; }
|
||||
[Column(title: "Заголовок", width: 170)]
|
||||
public string Subject { get; set; } = string.Empty;
|
||||
|
@ -23,13 +23,13 @@ namespace FurnitureAssemblyContracts.ViewModels
|
||||
public string FurnitureName { get; set; } = string.Empty;
|
||||
[Column(title: "Количество", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
||||
public int Count { get; set; }
|
||||
[Column(title: "Сумма", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true, isFormatable: true, formatter: "0.00##")]
|
||||
[Column(title: "Сумма", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true, formatter: "0.00##")]
|
||||
public double Sum { get; set; }
|
||||
[Column(title: "Статус", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
||||
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
|
||||
[Column(title: "Дата создания", width: 100, isFormatable: true, formatter: "dd/MM/yyyy")]
|
||||
[Column(title: "Дата создания", width: 100, formatter: "dd/MM/yyyy")]
|
||||
public DateTime DateCreate { get; set; } = DateTime.Now;
|
||||
[Column(title: "Дата выполнения", width: 100, isFormatable: true, formatter: "dd/MM/yyyy")]
|
||||
[Column(title: "Дата выполнения", width: 100, formatter: "dd/MM/yyyy")]
|
||||
public DateTime? DateImplement { get; set; }
|
||||
[Column(visible: false)]
|
||||
public int? ImplementerId { get; set; }
|
||||
|
@ -13,7 +13,7 @@ namespace FurnitureAssemblyContracts.ViewModels
|
||||
public string ShopName { get; set; } = string.Empty;
|
||||
[Column(title: "Адрес магазина", isUseAutoSize: true, gridViewAutoSize: GridViewAutoSize.Fill)]
|
||||
public string Address { get; set; } = string.Empty;
|
||||
[Column(title: "Дата открытия", width: 100, isFormatable: true, formatter: "dd/MM/yyyy")]
|
||||
[Column(title: "Дата открытия", width: 100, formatter: "dd/MM/yyyy")]
|
||||
public DateTime DateOpening { get; set; }
|
||||
[JsonIgnore]
|
||||
public Dictionary<int, (IFurnitureModel, int)> Furnitures { get; set; } = new();
|
||||
|
Loading…
Reference in New Issue
Block a user