слияние
This commit is contained in:
commit
7262553726
@ -6,7 +6,6 @@ public class Materials
|
||||
public int Id { get; set; }
|
||||
public DateTime DateMaterials { get; set; }
|
||||
public int Count { get; set; }
|
||||
|
||||
public TypeMaterials Material { get; set; }
|
||||
|
||||
public static Materials CreateEntity(int id, DateTime dateMaterials, int count, TypeMaterials typeMaterials)
|
||||
|
@ -16,7 +16,7 @@ public class PrintingHouses
|
||||
|
||||
public IEnumerable<PrintingHouseOrders> printingHouseOrder { get; set; } = [];
|
||||
|
||||
public static PrintingHouses CreateEntity(int id, string title, string phone, string address,int materialsId, IEnumerable<PrintingHouseOrders> printingHouseOrders)
|
||||
public static PrintingHouses CreateEntity(int id, string title, string phone, string address, int materialsId, IEnumerable<PrintingHouseOrders> printingHouseOrders)
|
||||
{
|
||||
|
||||
return new PrintingHouses
|
||||
@ -25,7 +25,7 @@ public class PrintingHouses
|
||||
Title = title,
|
||||
Phone = phone,
|
||||
Address = address,
|
||||
MaterialsId=materialsId,
|
||||
MaterialsId = materialsId,
|
||||
Date = DateTime.Now,
|
||||
printingHouseOrder = printingHouseOrders
|
||||
};
|
||||
|
44
Publication/Forms/FormCustomers.Designer.cs
generated
44
Publication/Forms/FormCustomers.Designer.cs
generated
@ -33,9 +33,9 @@
|
||||
buttonDelete = new Button();
|
||||
buttonEdit = new Button();
|
||||
buttonAdd = new Button();
|
||||
dataGridView1 = new DataGridView();
|
||||
dataGridView = new DataGridView();
|
||||
panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// panel1
|
||||
@ -82,38 +82,38 @@
|
||||
buttonAdd.UseVisualStyleBackColor = true;
|
||||
buttonAdd.Click += buttonAdd_Click;
|
||||
//
|
||||
// dataGridView1
|
||||
// dataGridView
|
||||
//
|
||||
dataGridView1.AllowUserToAddRows = false;
|
||||
dataGridView1.AllowUserToDeleteRows = false;
|
||||
dataGridView1.AllowUserToResizeColumns = false;
|
||||
dataGridView1.AllowUserToResizeRows = false;
|
||||
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView1.Dock = DockStyle.Fill;
|
||||
dataGridView1.Location = new Point(0, 0);
|
||||
dataGridView1.MultiSelect = false;
|
||||
dataGridView1.Name = "dataGridView1";
|
||||
dataGridView1.ReadOnly = true;
|
||||
dataGridView1.RowHeadersVisible = false;
|
||||
dataGridView1.RowHeadersWidth = 51;
|
||||
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView1.Size = new Size(603, 450);
|
||||
dataGridView1.TabIndex = 1;
|
||||
dataGridView.AllowUserToAddRows = false;
|
||||
dataGridView.AllowUserToDeleteRows = false;
|
||||
dataGridView.AllowUserToResizeColumns = false;
|
||||
dataGridView.AllowUserToResizeRows = false;
|
||||
dataGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView.Dock = DockStyle.Fill;
|
||||
dataGridView.Location = new Point(0, 0);
|
||||
dataGridView.MultiSelect = false;
|
||||
dataGridView.Name = "dataGridView";
|
||||
dataGridView.ReadOnly = true;
|
||||
dataGridView.RowHeadersVisible = false;
|
||||
dataGridView.RowHeadersWidth = 51;
|
||||
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView.Size = new Size(603, 450);
|
||||
dataGridView.TabIndex = 1;
|
||||
//
|
||||
// FormCustomers
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(800, 450);
|
||||
Controls.Add(dataGridView1);
|
||||
Controls.Add(dataGridView);
|
||||
Controls.Add(panel1);
|
||||
Name = "FormCustomers";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "Заказчики";
|
||||
Load += FormCustomers_Load;
|
||||
panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
@ -123,6 +123,6 @@
|
||||
private Button buttonDelete;
|
||||
private Button buttonEdit;
|
||||
private Button buttonAdd;
|
||||
private DataGridView dataGridView1;
|
||||
private DataGridView dataGridView;
|
||||
}
|
||||
}
|
@ -94,7 +94,7 @@ public partial class FormCustomers : Form
|
||||
private bool TryGetIdentifierFromSelectedRow(out int id)
|
||||
{
|
||||
id = 0;
|
||||
if (dataGridView1.SelectedRows.Count < 1)
|
||||
if (dataGridView.SelectedRows.Count < 1)
|
||||
{
|
||||
MessageBox.Show("Нет выбранной записи", "Ошибка",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
@ -102,9 +102,9 @@ public partial class FormCustomers : Form
|
||||
}
|
||||
|
||||
id =
|
||||
Convert.ToInt32(dataGridView1.SelectedRows[0].Cells["Id"].Value);
|
||||
Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void LoadList() => dataGridView1.DataSource = customerRepository.ReadCustomers();
|
||||
private void LoadList() => dataGridView.DataSource = customerRepository.ReadCustomers();
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
18
Publication/Forms/FormMaterial.Designer.cs
generated
18
Publication/Forms/FormMaterial.Designer.cs
generated
@ -31,7 +31,7 @@
|
||||
labelDateMaterials = new Label();
|
||||
labelCount = new Label();
|
||||
labelTypeMaterials = new Label();
|
||||
checkedListBox1 = new CheckedListBox();
|
||||
checkedListBox = new CheckedListBox();
|
||||
dateTimePickerDateMaterial = new DateTimePicker();
|
||||
numericUpDownCount = new NumericUpDown();
|
||||
buttonSave = new Button();
|
||||
@ -66,13 +66,13 @@
|
||||
labelTypeMaterials.TabIndex = 2;
|
||||
labelTypeMaterials.Text = "Тип материала";
|
||||
//
|
||||
// checkedListBox1
|
||||
// checkedListBox
|
||||
//
|
||||
checkedListBox1.FormattingEnabled = true;
|
||||
checkedListBox1.Location = new Point(168, 140);
|
||||
checkedListBox1.Name = "checkedListBox1";
|
||||
checkedListBox1.Size = new Size(164, 114);
|
||||
checkedListBox1.TabIndex = 3;
|
||||
checkedListBox.FormattingEnabled = true;
|
||||
checkedListBox.Location = new Point(168, 140);
|
||||
checkedListBox.Name = "checkedListBox";
|
||||
checkedListBox.Size = new Size(164, 114);
|
||||
checkedListBox.TabIndex = 3;
|
||||
//
|
||||
// dateTimePickerDateMaterial
|
||||
//
|
||||
@ -119,7 +119,7 @@
|
||||
Controls.Add(buttonSave);
|
||||
Controls.Add(numericUpDownCount);
|
||||
Controls.Add(dateTimePickerDateMaterial);
|
||||
Controls.Add(checkedListBox1);
|
||||
Controls.Add(checkedListBox);
|
||||
Controls.Add(labelTypeMaterials);
|
||||
Controls.Add(labelCount);
|
||||
Controls.Add(labelDateMaterials);
|
||||
@ -136,7 +136,7 @@
|
||||
private Label labelDateMaterials;
|
||||
private Label labelCount;
|
||||
private Label labelTypeMaterials;
|
||||
private CheckedListBox checkedListBox1;
|
||||
private CheckedListBox checkedListBox;
|
||||
private DateTimePicker dateTimePickerDateMaterial;
|
||||
private NumericUpDown numericUpDownCount;
|
||||
private Button buttonSave;
|
||||
|
@ -37,7 +37,7 @@ public partial class FormMaterial : Form
|
||||
if ((elem & material.Material) != 0)
|
||||
{
|
||||
|
||||
checkedListBox1.SetItemChecked(checkedListBox1.Items.IndexOf(elem), true);
|
||||
checkedListBox.SetItemChecked(checkedListBox.Items.IndexOf(elem), true);
|
||||
}
|
||||
}
|
||||
MessageBox.Show(material.DateMaterials.ToString());
|
||||
@ -59,7 +59,7 @@ MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
InitializeComponent();
|
||||
foreach (var item in Enum.GetValues(typeof(TypeMaterials)))
|
||||
{
|
||||
checkedListBox1.Items.Add(item);
|
||||
checkedListBox.Items.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
private Materials CreateMaterials(int id)
|
||||
{
|
||||
TypeMaterials typeMaterials = TypeMaterials.None;
|
||||
foreach (var elem in checkedListBox1.CheckedItems)
|
||||
foreach (var elem in checkedListBox.CheckedItems)
|
||||
{
|
||||
typeMaterials |= (TypeMaterials)elem;
|
||||
}
|
||||
|
44
Publication/Forms/FormMaterials.Designer.cs
generated
44
Publication/Forms/FormMaterials.Designer.cs
generated
@ -33,9 +33,9 @@
|
||||
buttonDelete = new Button();
|
||||
buttonEdit = new Button();
|
||||
buttonAdd = new Button();
|
||||
dataGridView1 = new DataGridView();
|
||||
dataGridView = new DataGridView();
|
||||
panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// panel1
|
||||
@ -82,38 +82,38 @@
|
||||
buttonAdd.UseVisualStyleBackColor = true;
|
||||
buttonAdd.Click += buttonAdd_Click;
|
||||
//
|
||||
// dataGridView1
|
||||
// dataGridView
|
||||
//
|
||||
dataGridView1.AllowUserToAddRows = false;
|
||||
dataGridView1.AllowUserToDeleteRows = false;
|
||||
dataGridView1.AllowUserToResizeColumns = false;
|
||||
dataGridView1.AllowUserToResizeRows = false;
|
||||
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView1.Dock = DockStyle.Fill;
|
||||
dataGridView1.Location = new Point(0, 0);
|
||||
dataGridView1.MultiSelect = false;
|
||||
dataGridView1.Name = "dataGridView1";
|
||||
dataGridView1.ReadOnly = true;
|
||||
dataGridView1.RowHeadersVisible = false;
|
||||
dataGridView1.RowHeadersWidth = 51;
|
||||
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView1.Size = new Size(603, 450);
|
||||
dataGridView1.TabIndex = 2;
|
||||
dataGridView.AllowUserToAddRows = false;
|
||||
dataGridView.AllowUserToDeleteRows = false;
|
||||
dataGridView.AllowUserToResizeColumns = false;
|
||||
dataGridView.AllowUserToResizeRows = false;
|
||||
dataGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView.Dock = DockStyle.Fill;
|
||||
dataGridView.Location = new Point(0, 0);
|
||||
dataGridView.MultiSelect = false;
|
||||
dataGridView.Name = "dataGridView";
|
||||
dataGridView.ReadOnly = true;
|
||||
dataGridView.RowHeadersVisible = false;
|
||||
dataGridView.RowHeadersWidth = 51;
|
||||
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView.Size = new Size(603, 450);
|
||||
dataGridView.TabIndex = 2;
|
||||
//
|
||||
// FormMaterials
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(800, 450);
|
||||
Controls.Add(dataGridView1);
|
||||
Controls.Add(dataGridView);
|
||||
Controls.Add(panel1);
|
||||
Name = "FormMaterials";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "Материалы";
|
||||
Load += FormMaterials_Load;
|
||||
panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
@ -123,6 +123,6 @@
|
||||
private Button buttonDelete;
|
||||
private Button buttonEdit;
|
||||
private Button buttonAdd;
|
||||
private DataGridView dataGridView1;
|
||||
private DataGridView dataGridView;
|
||||
}
|
||||
}
|
@ -40,7 +40,6 @@ public partial class FormMaterials : Form
|
||||
{
|
||||
if (!TryGetIdentifierFromSelectedRow(out var findId))
|
||||
{
|
||||
MessageBox.Show("Привет", "Привет");
|
||||
return;
|
||||
}
|
||||
try
|
||||
@ -93,18 +92,18 @@ public partial class FormMaterials : Form
|
||||
private bool TryGetIdentifierFromSelectedRow(out int id)
|
||||
{
|
||||
id = 0;
|
||||
if (dataGridView1.SelectedRows.Count < 1)
|
||||
if (dataGridView.SelectedRows.Count < 1)
|
||||
{
|
||||
MessageBox.Show("Нет выбранной записи", "Ошибка",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return false;
|
||||
}
|
||||
|
||||
id =Convert.ToInt32(dataGridView1.SelectedRows[0].Cells["Id"].Value);
|
||||
id =Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void LoadList() => dataGridView1.DataSource = materialRepository.ReadMaterials();
|
||||
private void LoadList() => dataGridView.DataSource = materialRepository.ReadMaterials();
|
||||
|
||||
|
||||
}
|
||||
|
@ -2360,7 +2360,7 @@
|
||||
<data name="buttonEdit.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAA+gAAAPoCAYAAABNo9TkAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAj
|
||||
kgAAI5IBPeKSzAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAALoxSURBVHhe7N13
|
||||
kwAAI5MB76VwKAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAALoxSURBVHhe7N13
|
||||
gBTl/cfxn70nsZvEksQkliTG3nvBXqLGEnvvvfeuKIgiKtWOoFQbiIqI2LGj9OOOdvTeQeT5fZ/ZnWNu
|
||||
73vH3s7u7Dwz7z9e2b3PbtgF7mZ4e2X/zxgDAAAAAA1a9uST64vdxRniHvHKr08++aWY5HniiTFiuPhx
|
||||
6RNPfCUGiPdE+6UtWlwrmvzSosXm2q8NIEMdAQAAAMC0bLnOspYtz5EY/1iYIIny5Z54ooYEeW0tWngk
|
||||
|
44
Publication/Forms/FormOrders.Designer.cs
generated
44
Publication/Forms/FormOrders.Designer.cs
generated
@ -31,9 +31,9 @@
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormOrders));
|
||||
panel1 = new Panel();
|
||||
buttonAdd = new Button();
|
||||
dataGridView1 = new DataGridView();
|
||||
dataGridView = new DataGridView();
|
||||
panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// panel1
|
||||
@ -56,38 +56,38 @@
|
||||
buttonAdd.UseVisualStyleBackColor = true;
|
||||
buttonAdd.Click += buttonAdd_Click;
|
||||
//
|
||||
// dataGridView1
|
||||
// dataGridView
|
||||
//
|
||||
dataGridView1.AllowUserToAddRows = false;
|
||||
dataGridView1.AllowUserToDeleteRows = false;
|
||||
dataGridView1.AllowUserToResizeColumns = false;
|
||||
dataGridView1.AllowUserToResizeRows = false;
|
||||
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView1.Dock = DockStyle.Fill;
|
||||
dataGridView1.Location = new Point(0, 0);
|
||||
dataGridView1.MultiSelect = false;
|
||||
dataGridView1.Name = "dataGridView1";
|
||||
dataGridView1.ReadOnly = true;
|
||||
dataGridView1.RowHeadersVisible = false;
|
||||
dataGridView1.RowHeadersWidth = 51;
|
||||
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView1.Size = new Size(603, 450);
|
||||
dataGridView1.TabIndex = 3;
|
||||
dataGridView.AllowUserToAddRows = false;
|
||||
dataGridView.AllowUserToDeleteRows = false;
|
||||
dataGridView.AllowUserToResizeColumns = false;
|
||||
dataGridView.AllowUserToResizeRows = false;
|
||||
dataGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView.Dock = DockStyle.Fill;
|
||||
dataGridView.Location = new Point(0, 0);
|
||||
dataGridView.MultiSelect = false;
|
||||
dataGridView.Name = "dataGridView";
|
||||
dataGridView.ReadOnly = true;
|
||||
dataGridView.RowHeadersVisible = false;
|
||||
dataGridView.RowHeadersWidth = 51;
|
||||
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView.Size = new Size(603, 450);
|
||||
dataGridView.TabIndex = 3;
|
||||
//
|
||||
// FormOrders
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(800, 450);
|
||||
Controls.Add(dataGridView1);
|
||||
Controls.Add(dataGridView);
|
||||
Controls.Add(panel1);
|
||||
Name = "FormOrders";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "Заказы";
|
||||
Load += FormOrders_Load;
|
||||
panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
@ -95,6 +95,6 @@
|
||||
|
||||
private Panel panel1;
|
||||
private Button buttonAdd;
|
||||
private DataGridView dataGridView1;
|
||||
private DataGridView dataGridView;
|
||||
}
|
||||
}
|
@ -48,5 +48,5 @@ public partial class FormOrders : Form
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
private void LoadList() => dataGridView1.DataSource = orderRepository.ReadOrders();
|
||||
private void LoadList() => dataGridView.DataSource = orderRepository.ReadOrders();
|
||||
}
|
||||
|
46
Publication/Forms/FormPrintingHouses.Designer.cs
generated
46
Publication/Forms/FormPrintingHouses.Designer.cs
generated
@ -32,9 +32,9 @@
|
||||
panel1 = new Panel();
|
||||
buttonDelete = new Button();
|
||||
buttonAdd = new Button();
|
||||
dataGridView1 = new DataGridView();
|
||||
dataGridView = new DataGridView();
|
||||
panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// panel1
|
||||
@ -69,38 +69,38 @@
|
||||
buttonAdd.UseVisualStyleBackColor = true;
|
||||
buttonAdd.Click += buttonAdd_Click;
|
||||
//
|
||||
// dataGridView1
|
||||
// dataGridView
|
||||
//
|
||||
dataGridView1.AllowUserToAddRows = false;
|
||||
dataGridView1.AllowUserToDeleteRows = false;
|
||||
dataGridView1.AllowUserToResizeColumns = false;
|
||||
dataGridView1.AllowUserToResizeRows = false;
|
||||
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView1.Dock = DockStyle.Fill;
|
||||
dataGridView1.Location = new Point(0, 0);
|
||||
dataGridView1.MultiSelect = false;
|
||||
dataGridView1.Name = "dataGridView1";
|
||||
dataGridView1.ReadOnly = true;
|
||||
dataGridView1.RowHeadersVisible = false;
|
||||
dataGridView1.RowHeadersWidth = 51;
|
||||
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView1.Size = new Size(856, 450);
|
||||
dataGridView1.TabIndex = 3;
|
||||
dataGridView.AllowUserToAddRows = false;
|
||||
dataGridView.AllowUserToDeleteRows = false;
|
||||
dataGridView.AllowUserToResizeColumns = false;
|
||||
dataGridView.AllowUserToResizeRows = false;
|
||||
dataGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView.Dock = DockStyle.Fill;
|
||||
dataGridView.Location = new Point(0, 0);
|
||||
dataGridView.MultiSelect = false;
|
||||
dataGridView.Name = "dataGridView";
|
||||
dataGridView.ReadOnly = true;
|
||||
dataGridView.RowHeadersVisible = false;
|
||||
dataGridView.RowHeadersWidth = 51;
|
||||
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView.Size = new Size(603, 450);
|
||||
dataGridView.TabIndex = 3;
|
||||
//
|
||||
// FormPrintingHouses
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1053, 450);
|
||||
Controls.Add(dataGridView1);
|
||||
ClientSize = new Size(800, 450);
|
||||
Controls.Add(dataGridView);
|
||||
Controls.Add(panel1);
|
||||
Name = "FormPrintingHouses";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "Печати";
|
||||
Load += FormPrintingHouses_Load;
|
||||
panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
@ -109,6 +109,6 @@
|
||||
private Panel panel1;
|
||||
private Button buttonDelete;
|
||||
private Button buttonAdd;
|
||||
private DataGridView dataGridView1;
|
||||
private DataGridView dataGridView;
|
||||
}
|
||||
}
|
@ -75,7 +75,7 @@ public partial class FormPrintingHouses : Form
|
||||
private bool TryGetIdentifierFromSelectedRow(out int id)
|
||||
{
|
||||
id = 0;
|
||||
if (dataGridView1.SelectedRows.Count < 1)
|
||||
if (dataGridView.SelectedRows.Count < 1)
|
||||
{
|
||||
MessageBox.Show("Нет выбранной записи", "Ошибка",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
@ -83,9 +83,9 @@ public partial class FormPrintingHouses : Form
|
||||
}
|
||||
|
||||
id =
|
||||
Convert.ToInt32(dataGridView1.SelectedRows[0].Cells["Id"].Value);
|
||||
Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void LoadList() => dataGridView1.DataSource = printingHouseRepository.ReadPrintingHouses();
|
||||
private void LoadList() => dataGridView.DataSource = printingHouseRepository.ReadPrintingHouses();
|
||||
}
|
||||
|
44
Publication/Forms/FormPublishingHouses.Designer.cs
generated
44
Publication/Forms/FormPublishingHouses.Designer.cs
generated
@ -33,9 +33,9 @@
|
||||
buttonDelete = new Button();
|
||||
buttonEdit = new Button();
|
||||
buttonAdd = new Button();
|
||||
dataGridView1 = new DataGridView();
|
||||
dataGridView = new DataGridView();
|
||||
panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// panel1
|
||||
@ -82,38 +82,38 @@
|
||||
buttonAdd.UseVisualStyleBackColor = true;
|
||||
buttonAdd.Click += buttonAdd_Click;
|
||||
//
|
||||
// dataGridView1
|
||||
// dataGridView
|
||||
//
|
||||
dataGridView1.AllowUserToAddRows = false;
|
||||
dataGridView1.AllowUserToDeleteRows = false;
|
||||
dataGridView1.AllowUserToResizeColumns = false;
|
||||
dataGridView1.AllowUserToResizeRows = false;
|
||||
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView1.Dock = DockStyle.Fill;
|
||||
dataGridView1.Location = new Point(0, 0);
|
||||
dataGridView1.MultiSelect = false;
|
||||
dataGridView1.Name = "dataGridView1";
|
||||
dataGridView1.ReadOnly = true;
|
||||
dataGridView1.RowHeadersVisible = false;
|
||||
dataGridView1.RowHeadersWidth = 51;
|
||||
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView1.Size = new Size(603, 450);
|
||||
dataGridView1.TabIndex = 3;
|
||||
dataGridView.AllowUserToAddRows = false;
|
||||
dataGridView.AllowUserToDeleteRows = false;
|
||||
dataGridView.AllowUserToResizeColumns = false;
|
||||
dataGridView.AllowUserToResizeRows = false;
|
||||
dataGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView.Dock = DockStyle.Fill;
|
||||
dataGridView.Location = new Point(0, 0);
|
||||
dataGridView.MultiSelect = false;
|
||||
dataGridView.Name = "dataGridView";
|
||||
dataGridView.ReadOnly = true;
|
||||
dataGridView.RowHeadersVisible = false;
|
||||
dataGridView.RowHeadersWidth = 51;
|
||||
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView.Size = new Size(603, 450);
|
||||
dataGridView.TabIndex = 3;
|
||||
//
|
||||
// FormPublishingHouses
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(800, 450);
|
||||
Controls.Add(dataGridView1);
|
||||
Controls.Add(dataGridView);
|
||||
Controls.Add(panel1);
|
||||
Name = "FormPublishingHouses";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "Издательства";
|
||||
Load += FormPublishingHouses_Load;
|
||||
panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
@ -123,6 +123,6 @@
|
||||
private Button buttonDelete;
|
||||
private Button buttonEdit;
|
||||
private Button buttonAdd;
|
||||
private DataGridView dataGridView1;
|
||||
private DataGridView dataGridView;
|
||||
}
|
||||
}
|
@ -95,7 +95,7 @@ public partial class FormPublishingHouses : Form
|
||||
private bool TryGetIdentifierFromSelectedRow(out int id)
|
||||
{
|
||||
id = 0;
|
||||
if (dataGridView1.SelectedRows.Count < 1)
|
||||
if (dataGridView.SelectedRows.Count < 1)
|
||||
{
|
||||
MessageBox.Show("Нет выбранной записи", "Ошибка",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
@ -103,9 +103,9 @@ public partial class FormPublishingHouses : Form
|
||||
}
|
||||
|
||||
id =
|
||||
Convert.ToInt32(dataGridView1.SelectedRows[0].Cells["Id"].Value);
|
||||
Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void LoadList() => dataGridView1.DataSource = publisingHouseRepository.ReadPublishingHouses();
|
||||
private void LoadList() => dataGridView.DataSource = publisingHouseRepository.ReadPublishingHouses();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user