ПИбд-22 Боровков М В 6 лабораторная работа #7
@ -44,6 +44,7 @@
|
|||||||
dataGridView.Name = "dataGridView";
|
dataGridView.Name = "dataGridView";
|
||||||
dataGridView.RowHeadersWidth = 51;
|
dataGridView.RowHeadersWidth = 51;
|
||||||
dataGridView.RowTemplate.Height = 29;
|
dataGridView.RowTemplate.Height = 29;
|
||||||
|
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
dataGridView.Size = new Size(565, 426);
|
dataGridView.Size = new Size(565, 426);
|
||||||
dataGridView.TabIndex = 0;
|
dataGridView.TabIndex = 0;
|
||||||
//
|
//
|
||||||
@ -91,7 +92,7 @@
|
|||||||
RefreshButton.UseVisualStyleBackColor = true;
|
RefreshButton.UseVisualStyleBackColor = true;
|
||||||
RefreshButton.Click += RefreshButton_Click;
|
RefreshButton.Click += RefreshButton_Click;
|
||||||
//
|
//
|
||||||
// ImplementersForm
|
// FormImplementers
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
@ -101,7 +102,7 @@
|
|||||||
Controls.Add(ChangeButton);
|
Controls.Add(ChangeButton);
|
||||||
Controls.Add(CreateButton);
|
Controls.Add(CreateButton);
|
||||||
Controls.Add(dataGridView);
|
Controls.Add(dataGridView);
|
||||||
Name = "ImplementersForm";
|
Name = "FormImplementers";
|
||||||
Text = "Исполнители";
|
Text = "Исполнители";
|
||||||
WindowState = FormWindowState.Maximized;
|
WindowState = FormWindowState.Maximized;
|
||||||
Load += ImplementersForm_Load;
|
Load += ImplementersForm_Load;
|
||||||
|
@ -84,6 +84,12 @@ namespace SushiBarBusinessLogic.BusinessLogics
|
|||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(element));
|
throw new ArgumentNullException(nameof(element));
|
||||||
}
|
}
|
||||||
|
_logger.LogDebug($"{model.Id}\n{orderStatus} {element.Status}\n{model.ImplementerId}_{element.ImplementerId}");
|
||||||
|
|
||||||
|
if (element.ImplementerId != null && model.ImplementerId != null && model.ImplementerId != element.ImplementerId)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException(nameof(model.ImplementerId));
|
||||||
|
}
|
||||||
|
|
||||||
model.SushiId = element.SushiId;
|
model.SushiId = element.SushiId;
|
||||||
model.DateCreate = element.DateCreate;
|
model.DateCreate = element.DateCreate;
|
||||||
@ -91,6 +97,8 @@ namespace SushiBarBusinessLogic.BusinessLogics
|
|||||||
model.Status = element.Status;
|
model.Status = element.Status;
|
||||||
model.Count = element.Count;
|
model.Count = element.Count;
|
||||||
model.Sum = element.Sum;
|
model.Sum = element.Sum;
|
||||||
|
model.ClientId = element.ClientId;
|
||||||
|
model.ImplementerId = element.ImplementerId.HasValue ? element.ImplementerId : model.ImplementerId;
|
||||||
|
|
||||||
if (model.Status != orderStatus - 1)
|
if (model.Status != orderStatus - 1)
|
||||||
{
|
{
|
||||||
|
@ -57,6 +57,8 @@ namespace SushiBarDatabaseImplement.Models
|
|||||||
}
|
}
|
||||||
Status = model.Status;
|
Status = model.Status;
|
||||||
DateImplement = model.DateImplement;
|
DateImplement = model.DateImplement;
|
||||||
|
ClientId = model.ClientId;
|
||||||
|
ImplementerId = model.ImplementerId;
|
||||||
}
|
}
|
||||||
public OrderViewModel GetViewModel => new()
|
public OrderViewModel GetViewModel => new()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user