правочка
This commit is contained in:
parent
9bf1d4ed0e
commit
2e9e3f5567
@ -12,6 +12,7 @@ namespace CarRepairShopContracts.BindingModels
|
|||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
public int RepairId { get; set; }
|
public int RepairId { get; set; }
|
||||||
|
|
||||||
public int Count { get; set; }
|
public int Count { get; set; }
|
||||||
public double Sum { get; set; }
|
public double Sum { get; set; }
|
||||||
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
|
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
|
||||||
|
@ -77,9 +77,15 @@ namespace CarRepairShopView
|
|||||||
_logger.LogInformation("Заказ №{id}. Меняется статус на 'В работе'", id);
|
_logger.LogInformation("Заказ №{id}. Меняется статус на 'В работе'", id);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var operationResult = _orderLogic.TakeOrderInWork(new OrderBindingModel {
|
var operationResult = _orderLogic.TakeOrderInWork(new OrderBindingModel
|
||||||
|
{
|
||||||
Id = id,
|
Id = id,
|
||||||
|
RepairId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["RepairId"].Value),
|
||||||
|
RepairName = dataGridView.SelectedRows[0].Cells["RepairName"].Value.ToString(),
|
||||||
Status = Enum.Parse<OrderStatus>(dataGridView.SelectedRows[0].Cells["Status"].Value.ToString()),
|
Status = Enum.Parse<OrderStatus>(dataGridView.SelectedRows[0].Cells["Status"].Value.ToString()),
|
||||||
|
Count = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Count"].Value),
|
||||||
|
Sum = double.Parse(dataGridView.SelectedRows[0].Cells["Sum"].Value.ToString()),
|
||||||
|
DateCreate = DateTime.Parse(dataGridView.SelectedRows[0].Cells["DateCreate"].Value.ToString()),
|
||||||
});
|
});
|
||||||
if (!operationResult)
|
if (!operationResult)
|
||||||
{
|
{
|
||||||
@ -103,9 +109,15 @@ namespace CarRepairShopView
|
|||||||
_logger.LogInformation("Заказ №{id}. Меняется статус на 'Готов'", id);
|
_logger.LogInformation("Заказ №{id}. Меняется статус на 'Готов'", id);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var operationResult = _orderLogic.FinishOrder(new OrderBindingModel {
|
var operationResult = _orderLogic.FinishOrder(new OrderBindingModel
|
||||||
|
{
|
||||||
Id = id,
|
Id = id,
|
||||||
|
RepairId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["RepairId"].Value),
|
||||||
|
RepairName = dataGridView.SelectedRows[0].Cells["RepairName"].Value.ToString(),
|
||||||
Status = Enum.Parse<OrderStatus>(dataGridView.SelectedRows[0].Cells["Status"].Value.ToString()),
|
Status = Enum.Parse<OrderStatus>(dataGridView.SelectedRows[0].Cells["Status"].Value.ToString()),
|
||||||
|
Count = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Count"].Value),
|
||||||
|
Sum = double.Parse(dataGridView.SelectedRows[0].Cells["Sum"].Value.ToString()),
|
||||||
|
DateCreate = DateTime.Parse(dataGridView.SelectedRows[0].Cells["DateCreate"].Value.ToString()),
|
||||||
});
|
});
|
||||||
if (!operationResult)
|
if (!operationResult)
|
||||||
{
|
{
|
||||||
@ -129,9 +141,15 @@ namespace CarRepairShopView
|
|||||||
_logger.LogInformation("Заказ №{id}. Меняется статус на 'Выдан'", id);
|
_logger.LogInformation("Заказ №{id}. Меняется статус на 'Выдан'", id);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var operationResult = _orderLogic.DeliveryOrder(new OrderBindingModel {
|
var operationResult = _orderLogic.DeliveryOrder(new OrderBindingModel
|
||||||
|
{
|
||||||
Id = id,
|
Id = id,
|
||||||
|
RepairId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["RepairId"].Value),
|
||||||
|
RepairName = dataGridView.SelectedRows[0].Cells["RepairName"].Value.ToString(),
|
||||||
Status = Enum.Parse<OrderStatus>(dataGridView.SelectedRows[0].Cells["Status"].Value.ToString()),
|
Status = Enum.Parse<OrderStatus>(dataGridView.SelectedRows[0].Cells["Status"].Value.ToString()),
|
||||||
|
Count = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Count"].Value),
|
||||||
|
Sum = double.Parse(dataGridView.SelectedRows[0].Cells["Sum"].Value.ToString()),
|
||||||
|
DateCreate = DateTime.Parse(dataGridView.SelectedRows[0].Cells["DateCreate"].Value.ToString()),
|
||||||
});
|
});
|
||||||
if (!operationResult)
|
if (!operationResult)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user