ПИбд-22 Боровков М В 6 лабораторная работа #7
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -57,6 +57,8 @@ namespace SushiBarDatabaseImplement.Models
|
||||
}
|
||||
Status = model.Status;
|
||||
DateImplement = model.DateImplement;
|
||||
ClientId = model.ClientId;
|
||||
ImplementerId = model.ImplementerId;
|
||||
}
|
||||
public OrderViewModel GetViewModel => new()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user