не понятно как добавить мануфактуру
This commit is contained in:
parent
dee1447d89
commit
8baae1a495
32
Laba3/ManufacturerForm.Designer.cs
generated
32
Laba3/ManufacturerForm.Designer.cs
generated
@ -28,12 +28,36 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.components = new System.ComponentModel.Container();
|
dataGridView = new DataGridView();
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
SuspendLayout();
|
||||||
this.Text = "ManufacturerForm";
|
//
|
||||||
|
// dataGridView
|
||||||
|
//
|
||||||
|
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
dataGridView.Location = new Point(12, 12);
|
||||||
|
dataGridView.Name = "dataGridView";
|
||||||
|
dataGridView.RowHeadersWidth = 51;
|
||||||
|
dataGridView.Size = new Size(776, 426);
|
||||||
|
dataGridView.TabIndex = 0;
|
||||||
|
dataGridView.CellValueChanged += dataGridView_CellValueChanged;
|
||||||
|
dataGridView.UserAddedRow += dataGridView_UserAddedRow;
|
||||||
|
dataGridView.UserDeletingRow += dataGridView_UserDeletingRow;
|
||||||
|
//
|
||||||
|
// ManufacturerForm
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||||
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
|
ClientSize = new Size(800, 450);
|
||||||
|
Controls.Add(dataGridView);
|
||||||
|
Name = "ManufacturerForm";
|
||||||
|
Text = "ManufacturerForm";
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
private DataGridView dataGridView;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -31,6 +31,7 @@ namespace Laba3
|
|||||||
_isNewProduct = product == null;
|
_isNewProduct = product == null;
|
||||||
txtName.MinLength = MINL;
|
txtName.MinLength = MINL;
|
||||||
txtName.MaxLength = MAXL;
|
txtName.MaxLength = MAXL;
|
||||||
|
//TODO dtpDeliveryDate.DateF
|
||||||
|
|
||||||
if (!_isNewProduct)
|
if (!_isNewProduct)
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
using Data.Repositories;
|
||||||
|
using Data;
|
||||||
|
|
||||||
namespace Laba3
|
namespace Laba3
|
||||||
{
|
{
|
||||||
internal static class Program
|
internal static class Program
|
||||||
@ -10,8 +13,13 @@ namespace Laba3
|
|||||||
{
|
{
|
||||||
// To customize application configuration such as set high DPI settings or default font,
|
// To customize application configuration such as set high DPI settings or default font,
|
||||||
// see https://aka.ms/applicationconfiguration.
|
// see https://aka.ms/applicationconfiguration.
|
||||||
ApplicationConfiguration.Initialize();
|
// Ñîçäàíèå ýêçåìïëÿðîâ ðåïîçèòîðèåâ
|
||||||
Application.Run(new MainForm());
|
var dbContext = new ApplicationDbContext();
|
||||||
|
var productRepository = new ProductRepository(dbContext);
|
||||||
|
var manufacturerRepository = new ManufacturerRepository(dbContext);
|
||||||
|
|
||||||
|
// Ïåðåäà÷à ðåïîçèòîðèåâ â êîíñòðóêòîð MainForm
|
||||||
|
Application.Run(new MainForm(productRepository, manufacturerRepository));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user