Compare commits
2 Commits
188d246b30
...
e1920f0f22
Author | SHA1 | Date | |
---|---|---|---|
|
e1920f0f22 | ||
|
3e5221a9d1 |
@ -142,10 +142,10 @@ namespace PlumbingRepairBusinessLogic.BusinessLogics
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
_orderStorage.Update(model);
|
|
||||||
model.Status = newStatus;
|
model.Status = newStatus;
|
||||||
if (model.Status == OrderStatus.Выдан)
|
if (model.Status == OrderStatus.Выдан)
|
||||||
model.DateImplement = DateTime.Now;
|
model.DateImplement = DateTime.Now;
|
||||||
|
_orderStorage.Update(model);
|
||||||
var orderView = _orderStorage.GetElement(new() { Id = model.Id });
|
var orderView = _orderStorage.GetElement(new() { Id = model.Id });
|
||||||
var clientView = _clientStorage.GetElement(new() { Id = orderView!.ClientId });
|
var clientView = _clientStorage.GetElement(new() { Id = orderView!.ClientId });
|
||||||
|
|
||||||
|
@ -12,11 +12,11 @@
|
|||||||
public GridViewAutoSize GridViewAutoSize { get; private set; }
|
public GridViewAutoSize GridViewAutoSize { get; private set; }
|
||||||
|
|
||||||
public bool IsUseAutoSize { 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 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;
|
Title = title;
|
||||||
Visible = visible;
|
Visible = visible;
|
||||||
|
@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace PlumbingRepairContracts.BindingModels
|
namespace PlumbingRepairContracts.BindingModels
|
||||||
{
|
{
|
||||||
public class ShopBindingModel
|
public class ShopBindingModel : IShopModel
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ namespace PlumbingRepairContracts.ViewModels
|
|||||||
public int? ClientId { get; set; }
|
public int? ClientId { get; set; }
|
||||||
[Column(title: "Отправитель", width: 150)]
|
[Column(title: "Отправитель", width: 150)]
|
||||||
public string SenderName { get; set; } = string.Empty;
|
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; }
|
public DateTime DateDelivery { get; set; }
|
||||||
[Column(title: "Заголовок", width: 150)]
|
[Column(title: "Заголовок", width: 150)]
|
||||||
public string Subject { get; set; } = string.Empty;
|
public string Subject { get; set; } = string.Empty;
|
||||||
|
@ -36,10 +36,10 @@ namespace PlumbingRepairContracts.ViewModels
|
|||||||
[Column(title: "Статус", width: 150)]
|
[Column(title: "Статус", width: 150)]
|
||||||
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
|
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;
|
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; }
|
public DateTime? DateImplement { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -4,7 +4,7 @@ using System.ComponentModel;
|
|||||||
|
|
||||||
namespace PlumbingRepairContracts.ViewModels
|
namespace PlumbingRepairContracts.ViewModels
|
||||||
{
|
{
|
||||||
public class ShopViewModel
|
public class ShopViewModel : IShopModel
|
||||||
{
|
{
|
||||||
[Column(visible: false)]
|
[Column(visible: false)]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
@ -16,7 +16,7 @@ namespace PlumbingRepairContracts.ViewModels
|
|||||||
public string Address { get; set; } = string.Empty;
|
public string Address { get; set; } = string.Empty;
|
||||||
[Column(title: "Максимальное количество работ", width: 150)]
|
[Column(title: "Максимальное количество работ", width: 150)]
|
||||||
public int maxCountWorks { get; set; }
|
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; }
|
public DateTime DateOpening { get; set; }
|
||||||
[Column(visible: false)]
|
[Column(visible: false)]
|
||||||
public Dictionary<int, (IWorkModel, int)> ShopWorks { get; set; } = new();
|
public Dictionary<int, (IWorkModel, int)> ShopWorks { get; set; } = new();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
namespace PlumbingRepairDataModels.Models
|
namespace PlumbingRepairDataModels.Models
|
||||||
{
|
{
|
||||||
public class IShopModel
|
public interface IShopModel: IId
|
||||||
{
|
{
|
||||||
string ShopName { get; }
|
string ShopName { get; }
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ using System.Runtime.Serialization;
|
|||||||
namespace PlumbingRepairDatabaseImplement.Models
|
namespace PlumbingRepairDatabaseImplement.Models
|
||||||
{
|
{
|
||||||
[DataContract]
|
[DataContract]
|
||||||
public class Shop
|
public class Shop : IShopModel
|
||||||
{
|
{
|
||||||
[DataMember]
|
[DataMember]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
@ -39,9 +39,9 @@ namespace PlumbingRepairView
|
|||||||
{
|
{
|
||||||
column.Width = columnAttr.Width;
|
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))
|
if (columnAttr.FormattedNumber && column.ValueType == typeof(double))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user