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