diff --git a/Publication/Entites/PrintingHouses.cs b/Publication/Entites/PrintingHouses.cs index 5731021..81bf026 100644 --- a/Publication/Entites/PrintingHouses.cs +++ b/Publication/Entites/PrintingHouses.cs @@ -9,9 +9,11 @@ public class PrintingHouses public int MaterialsId { get; set; } + public DateTime Date { get; set; } + public IEnumerable printingHouseOrder { get; set; } = []; - public static PrintingHouses CreateEntity(int id, string title, string phone, string address,int materialsId,IEnumerable printingHouseOrders) + public static PrintingHouses CreateEntity(int id, string title, string phone, string address, int materialsId, IEnumerable printingHouseOrders) { return new PrintingHouses @@ -20,7 +22,8 @@ public class PrintingHouses Title = title, Phone = phone, Address = address, - MaterialsId=materialsId, + MaterialsId = materialsId, + Date = DateTime.Now, printingHouseOrder = printingHouseOrders }; } diff --git a/Publication/Forms/FormMaterial.Designer.cs b/Publication/Forms/FormMaterial.Designer.cs index 9d04f34..1ccdcc8 100644 --- a/Publication/Forms/FormMaterial.Designer.cs +++ b/Publication/Forms/FormMaterial.Designer.cs @@ -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,13 +119,14 @@ Controls.Add(buttonSave); Controls.Add(numericUpDownCount); Controls.Add(dateTimePickerDateMaterial); - Controls.Add(checkedListBox1); + Controls.Add(checkedListBox); Controls.Add(labelTypeMaterials); Controls.Add(labelCount); Controls.Add(labelDateMaterials); Name = "FormMaterial"; StartPosition = FormStartPosition.CenterScreen; - Text = "FormMaterials"; + Text = "Материалы"; + Load += FormMaterials_Load; ((System.ComponentModel.ISupportInitialize)numericUpDownCount).EndInit(); ResumeLayout(false); PerformLayout(); @@ -136,7 +137,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; diff --git a/Publication/Forms/FormMaterial.cs b/Publication/Forms/FormMaterial.cs index fdf0531..17adc78 100644 --- a/Publication/Forms/FormMaterial.cs +++ b/Publication/Forms/FormMaterial.cs @@ -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; } diff --git a/Publication/Forms/FormPrintingHouse.Designer.cs b/Publication/Forms/FormPrintingHouse.Designer.cs index a62e4e7..94391ca 100644 --- a/Publication/Forms/FormPrintingHouse.Designer.cs +++ b/Publication/Forms/FormPrintingHouse.Designer.cs @@ -189,7 +189,7 @@ Controls.Add(labelTitle); Name = "FormPrintingHouse"; StartPosition = FormStartPosition.CenterScreen; - Text = "FormPrintingHousecs"; + Text = "Печать"; groupBoxGridView.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit(); ResumeLayout(false); diff --git a/Publication/Forms/FormPrintingHouses.Designer.cs b/Publication/Forms/FormPrintingHouses.Designer.cs index 2563676..889fd93 100644 --- a/Publication/Forms/FormPrintingHouses.Designer.cs +++ b/Publication/Forms/FormPrintingHouses.Designer.cs @@ -97,7 +97,7 @@ Controls.Add(panel1); Name = "FormPrintingHouses"; StartPosition = FormStartPosition.CenterScreen; - Text = "FormPrintingHouses"; + Text = "Печати"; Load += FormPrintingHouses_Load; panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit(); diff --git a/Publication/Forms/FormPublishingHouses.Designer.cs b/Publication/Forms/FormPublishingHouses.Designer.cs index 460a3ff..ad4594a 100644 --- a/Publication/Forms/FormPublishingHouses.Designer.cs +++ b/Publication/Forms/FormPublishingHouses.Designer.cs @@ -110,7 +110,7 @@ Controls.Add(panel1); Name = "FormPublishingHouses"; StartPosition = FormStartPosition.CenterScreen; - Text = "FormPublishingHouses"; + Text = "Издательства"; Load += FormPublishingHouses_Load; panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();