Правки

This commit is contained in:
Владислав Захаров 2023-04-11 14:56:39 +04:00
parent 21f2c16149
commit 6545265dae
5 changed files with 10 additions and 0 deletions

View File

@ -12,6 +12,8 @@ namespace MotorPlantContracts.BindingModels
{
public int Id { get; set; }
public string ProductName { get; set; }
public int ProductId { get; set; }
public int Count { get; set; }

View File

@ -39,6 +39,7 @@ namespace MotorPlantFileImplement.Models
{
Id = model.Id,
ProductId = model.ProductId,
ProductName = model.ProductName,
Count = model.Count,
Sum = model.Sum,
Status = model.Status,
@ -78,6 +79,7 @@ namespace MotorPlantFileImplement.Models
return;
}
ProductId = model.ProductId;
ProductName = model.ProductName;
Count = model.Count;
Sum = model.Sum;
Status = model.Status;

View File

@ -38,6 +38,7 @@ namespace MotorPlantListImplement.Models
{
Id = model.Id,
ProductId = model.ProductId,
ProductName = model.ProductName,
Count = model.Count,
Sum = model.Sum,
Status = model.Status,
@ -53,6 +54,7 @@ namespace MotorPlantListImplement.Models
return;
}
ProductId = model.ProductId;
ProductName = model.ProductName;
Count = model.Count;
Sum = model.Sum;
Status = model.Status;

View File

@ -113,6 +113,7 @@ namespace MotorPlantView
var operationResult = _logicO.CreateOrder(new OrderBindingModel
{
ProductId = Convert.ToInt32(comboBoxProduct.SelectedValue),
ProductName = comboBoxProduct.Text,
Count = Convert.ToInt32(textBoxCount.Text),
Sum = Convert.ToDouble(textBoxSum.Text)
});

View File

@ -98,6 +98,7 @@ namespace MotorPlantView
{
Id = id,
ProductId = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["ProductId"].Value),
ProductName = DataGridView.SelectedRows[0].Cells["ProductName"].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()),
@ -132,6 +133,7 @@ namespace MotorPlantView
{
Id = id,
ProductId = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["ProductId"].Value),
ProductName = DataGridView.SelectedRows[0].Cells["ProductName"].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()),
@ -166,6 +168,7 @@ namespace MotorPlantView
{
Id = id,
ProductId = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["ProductId"].Value),
ProductName = DataGridView.SelectedRows[0].Cells["ProductName"].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()),