для пул реквеста 5 лаба
This commit is contained in:
parent
bf68282103
commit
1d31ba7513
1
SushiBar/FormClients.Designer.cs
generated
1
SushiBar/FormClients.Designer.cs
generated
@ -43,6 +43,7 @@
|
||||
dataGridView.Name = "dataGridView";
|
||||
dataGridView.RowHeadersVisible = false;
|
||||
dataGridView.RowHeadersWidth = 51;
|
||||
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView.Size = new Size(615, 450);
|
||||
dataGridView.TabIndex = 0;
|
||||
//
|
||||
|
4
SushiBar/FormMain.Designer.cs
generated
4
SushiBar/FormMain.Designer.cs
generated
@ -117,7 +117,8 @@
|
||||
//
|
||||
dataGridView.BackgroundColor = Color.White;
|
||||
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView.Location = new Point(0, 27);
|
||||
dataGridView.Dock = DockStyle.Left;
|
||||
dataGridView.Location = new Point(0, 28);
|
||||
dataGridView.Name = "dataGridView";
|
||||
dataGridView.RowHeadersVisible = false;
|
||||
dataGridView.RowHeadersWidth = 51;
|
||||
@ -173,6 +174,7 @@
|
||||
buttonRefreshOrders.TabIndex = 6;
|
||||
buttonRefreshOrders.Text = "Обновить заказы";
|
||||
buttonRefreshOrders.UseVisualStyleBackColor = true;
|
||||
buttonRefreshOrders.Click += ButtonRef_Click;
|
||||
//
|
||||
// FormMain
|
||||
//
|
||||
|
2
SushiBar/FormReportOrders.Designer.cs
generated
2
SushiBar/FormReportOrders.Designer.cs
generated
@ -111,7 +111,7 @@
|
||||
ClientSize = new Size(1321, 450);
|
||||
Controls.Add(panel);
|
||||
Name = "FormReportOrders";
|
||||
Text = "FormReportOrders";
|
||||
Text = "Отчет по заказам";
|
||||
panel.ResumeLayout(false);
|
||||
panel.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
|
@ -16,8 +16,7 @@ namespace SushiBarBusinessLogic.OfficePackage.Implements
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
private static JustificationValues
|
||||
GetJustificationValues(WordJustificationType type)
|
||||
private static JustificationValues GetJustificationValues(WordJustificationType type)
|
||||
{
|
||||
return type switch
|
||||
{
|
||||
|
@ -37,11 +37,14 @@ namespace SushiBarDatabaseImplement.Implements
|
||||
public ClientViewModel? Delete(ClientBindingModel model)
|
||||
{
|
||||
using var context = new SushiBarDatabase();
|
||||
var client = context.Clients.FirstOrDefault(x => x.Id == model.Id);
|
||||
if (client == null) { return null; }
|
||||
context.Clients.Remove(client);
|
||||
context.SaveChanges();
|
||||
return client.GetViewModel;
|
||||
var element = context.Clients.FirstOrDefault(rec => rec.Id == model.Id);
|
||||
if (element != null)
|
||||
{
|
||||
context.Clients.Remove(element);
|
||||
context.SaveChanges();
|
||||
return element.GetViewModel;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ClientViewModel? GetElement(ClientSearchModel model)
|
||||
|
Loading…
Reference in New Issue
Block a user