коммит
This commit is contained in:
parent
3e5221a9d1
commit
e1920f0f22
@ -142,10 +142,10 @@ namespace PlumbingRepairBusinessLogic.BusinessLogics
|
||||
}
|
||||
|
||||
}
|
||||
_orderStorage.Update(model);
|
||||
model.Status = newStatus;
|
||||
if (model.Status == OrderStatus.Выдан)
|
||||
model.DateImplement = DateTime.Now;
|
||||
_orderStorage.Update(model);
|
||||
var orderView = _orderStorage.GetElement(new() { Id = model.Id });
|
||||
var clientView = _clientStorage.GetElement(new() { Id = orderView!.ClientId });
|
||||
|
||||
|
@ -12,11 +12,11 @@
|
||||
public GridViewAutoSize GridViewAutoSize { get; private set; }
|
||||
|
||||
public bool IsUseAutoSize { get; private set; }
|
||||
public bool FormattedDate { get; private set; }
|
||||
public string FormattedDate { get; private set; }
|
||||
public bool FormattedNumber { get; private set; }
|
||||
|
||||
|
||||
public ColumnAttribute(string title = "", bool visible = true, int width = 0, GridViewAutoSize gridViewAutoSize = GridViewAutoSize.None, bool isUseAutoSize = false, bool formatDate = false, bool formattedNumber = false)
|
||||
public ColumnAttribute(string title = "", bool visible = true, int width = 0, GridViewAutoSize gridViewAutoSize = GridViewAutoSize.None, bool isUseAutoSize = false, string formatDate = "", bool formattedNumber = false)
|
||||
{
|
||||
Title = title;
|
||||
Visible = visible;
|
||||
|
@ -12,7 +12,7 @@ namespace PlumbingRepairContracts.ViewModels
|
||||
public int? ClientId { get; set; }
|
||||
[Column(title: "Отправитель", width: 150)]
|
||||
public string SenderName { get; set; } = string.Empty;
|
||||
[Column(title: "Дата отправления", width: 150, formatDate: true)]
|
||||
[Column(title: "Дата отправления", width: 150, formatDate: "dd MMMM YY, HH:mm:ss")]
|
||||
public DateTime DateDelivery { get; set; }
|
||||
[Column(title: "Заголовок", width: 150)]
|
||||
public string Subject { get; set; } = string.Empty;
|
||||
|
@ -36,10 +36,10 @@ namespace PlumbingRepairContracts.ViewModels
|
||||
[Column(title: "Статус", width: 150)]
|
||||
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
|
||||
|
||||
[Column(title: "Дата создания", width: 200, formatDate: true)]
|
||||
[Column(title: "Дата создания", width: 200, formatDate: "dd MMMM YY, HH:mm:ss")]
|
||||
public DateTime DateCreate { get; set; } = DateTime.Now;
|
||||
|
||||
[Column(title: "Дата выполнения", width: 200, formatDate: true)]
|
||||
[Column(title: "Дата выполнения", width: 200, formatDate: "dd MMMM YY, HH:mm:ss")]
|
||||
public DateTime? DateImplement { get; set; }
|
||||
}
|
||||
}
|
@ -16,7 +16,7 @@ namespace PlumbingRepairContracts.ViewModels
|
||||
public string Address { get; set; } = string.Empty;
|
||||
[Column(title: "Максимальное количество работ", width: 150)]
|
||||
public int maxCountWorks { get; set; }
|
||||
[Column(title: "Дата открытия", width: 150, formatDate: true)]
|
||||
[Column(title: "Дата открытия", width: 150, formatDate: "dd MMMM YY, HH:mm:ss")]
|
||||
public DateTime DateOpening { get; set; }
|
||||
[Column(visible: false)]
|
||||
public Dictionary<int, (IWorkModel, int)> ShopWorks { get; set; } = new();
|
||||
|
@ -39,9 +39,9 @@ namespace PlumbingRepairView
|
||||
{
|
||||
column.Width = columnAttr.Width;
|
||||
}
|
||||
if (columnAttr.FormattedDate && (column.ValueType == typeof(DateTime) || column.ValueType == typeof(DateTime?)))
|
||||
if (!columnAttr.FormattedDate.Equals(""))
|
||||
{
|
||||
column.DefaultCellStyle.Format = "dd MMMM yy, HH:mm:ss";
|
||||
column.DefaultCellStyle.Format = columnAttr.FormattedDate;
|
||||
}
|
||||
if (columnAttr.FormattedNumber && column.ValueType == typeof(double))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user