ПИбд-22 Боровков М В 6 лабораторная работа #7

Closed
bekodeg wants to merge 14 commits from labWork6 into labWork5
3 changed files with 13 additions and 2 deletions
Showing only changes of commit 4848aa8f6b - Show all commits

View File

@ -44,6 +44,7 @@
dataGridView.Name = "dataGridView";
dataGridView.RowHeadersWidth = 51;
dataGridView.RowTemplate.Height = 29;
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dataGridView.Size = new Size(565, 426);
dataGridView.TabIndex = 0;
//
@ -91,7 +92,7 @@
RefreshButton.UseVisualStyleBackColor = true;
RefreshButton.Click += RefreshButton_Click;
//
// ImplementersForm
// FormImplementers
//
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
@ -101,7 +102,7 @@
Controls.Add(ChangeButton);
Controls.Add(CreateButton);
Controls.Add(dataGridView);
Name = "ImplementersForm";
Name = "FormImplementers";
Text = "Исполнители";
WindowState = FormWindowState.Maximized;
Load += ImplementersForm_Load;

View File

@ -84,6 +84,12 @@ namespace SushiBarBusinessLogic.BusinessLogics
{
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.DateCreate = element.DateCreate;
@ -91,6 +97,8 @@ namespace SushiBarBusinessLogic.BusinessLogics
model.Status = element.Status;
model.Count = element.Count;
model.Sum = element.Sum;
model.ClientId = element.ClientId;
model.ImplementerId = element.ImplementerId.HasValue ? element.ImplementerId : model.ImplementerId;
if (model.Status != orderStatus - 1)
{

View File

@ -57,6 +57,8 @@ namespace SushiBarDatabaseImplement.Models
}
Status = model.Status;
DateImplement = model.DateImplement;
ClientId = model.ClientId;
ImplementerId = model.ImplementerId;
}
public OrderViewModel GetViewModel => new()
{