diff --git a/Confectionery/ConfectioneryView/FormShop.Designer.cs b/Confectionery/ConfectioneryView/FormShop.Designer.cs
index 57f5e82..35e4ece 100644
--- a/Confectionery/ConfectioneryView/FormShop.Designer.cs
+++ b/Confectionery/ConfectioneryView/FormShop.Designer.cs
@@ -29,6 +29,9 @@
private void InitializeComponent()
{
dataGridView = new DataGridView();
+ id = new DataGridViewTextBoxColumn();
+ PastryName = new DataGridViewTextBoxColumn();
+ Count = new DataGridViewTextBoxColumn();
labelName = new Label();
labelAddress = new Label();
labelOpen = new Label();
@@ -42,15 +45,43 @@
//
// dataGridView
//
+ dataGridView.AllowUserToAddRows = false;
+ dataGridView.AllowUserToDeleteRows = false;
+ dataGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
dataGridView.BackgroundColor = Color.AliceBlue;
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ dataGridView.Columns.AddRange(new DataGridViewColumn[] { id, PastryName, Count });
dataGridView.Location = new Point(12, 225);
dataGridView.Name = "dataGridView";
- dataGridView.RowHeadersWidth = 62;
+ dataGridView.ReadOnly = true;
+ dataGridView.RowHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
+ dataGridView.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.AutoSizeToDisplayedHeaders;
dataGridView.RowTemplate.Height = 33;
dataGridView.Size = new Size(765, 393);
dataGridView.TabIndex = 0;
//
+ // id
+ //
+ id.HeaderText = "id";
+ id.MinimumWidth = 8;
+ id.Name = "id";
+ id.ReadOnly = true;
+ id.Visible = false;
+ //
+ // PastryName
+ //
+ PastryName.HeaderText = "Кондитерское изделие";
+ PastryName.MinimumWidth = 8;
+ PastryName.Name = "PastryName";
+ PastryName.ReadOnly = true;
+ //
+ // Count
+ //
+ Count.HeaderText = "Количество";
+ Count.MinimumWidth = 8;
+ Count.Name = "Count";
+ Count.ReadOnly = true;
+ //
// labelName
//
labelName.AutoSize = true;
@@ -152,5 +183,8 @@
private DateTimePicker dateTimePickerOpen;
private Button buttonSave;
private Button buttonCancel;
+ private DataGridViewTextBoxColumn id;
+ private DataGridViewTextBoxColumn PastryName;
+ private DataGridViewTextBoxColumn Count;
}
}
\ No newline at end of file
diff --git a/Confectionery/ConfectioneryView/FormShop.cs b/Confectionery/ConfectioneryView/FormShop.cs
index 09be130..4f53f29 100644
--- a/Confectionery/ConfectioneryView/FormShop.cs
+++ b/Confectionery/ConfectioneryView/FormShop.cs
@@ -104,7 +104,7 @@ namespace ConfectioneryView
var operationResult = _id.HasValue ? _logic.Update(model) : _logic.Create(model);
if (!operationResult)
{
- throw new Exception("Ошибка при сохранении. Дополнительная информация в логах.");
+ throw new Exception("Ошибка при сохранении");
}
MessageBox.Show("Сохранение прошло успешно", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information);
DialogResult = DialogResult.OK;
diff --git a/Confectionery/ConfectioneryView/FormShop.resx b/Confectionery/ConfectioneryView/FormShop.resx
index f298a7b..d3dc922 100644
--- a/Confectionery/ConfectioneryView/FormShop.resx
+++ b/Confectionery/ConfectioneryView/FormShop.resx
@@ -57,4 +57,13 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ True
+
+
+ True
+
+
+ True
+
\ No newline at end of file
diff --git a/Confectionery/ConfectioneryView/nlog.config b/Confectionery/ConfectioneryView/nlog.config
new file mode 100644
index 0000000..85797a7
--- /dev/null
+++ b/Confectionery/ConfectioneryView/nlog.config
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file