From 8e006580fba84122760453322e8e2abcbcce6bce Mon Sep 17 00:00:00 2001 From: Alkin Ivan Date: Tue, 24 Dec 2024 01:52:24 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=B2?= =?UTF-8?q?=20=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectGasStation/FormGasStation.cs | 2 +- .../Forms/FormEmployees.Designer.cs | 1 + .../ProjectGasStation/Forms/FormProducts.Designer.cs | 1 + .../ProjectGasStation/Forms/FormPurchase.cs | 1 + .../Forms/FormPurchases.Designer.cs | 6 ++++++ .../ProjectGasStation/Forms/FormSale.cs | 12 ++++++------ .../ProjectGasStation/Forms/FormSales.Designer.cs | 1 + .../Forms/FormSuppliers.Designer.cs | 1 + .../ProjectGasStation/Forms/FormSuppliers.cs | 2 +- 9 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ProjectGasStation/ProjectGasStation/FormGasStation.cs b/ProjectGasStation/ProjectGasStation/FormGasStation.cs index 08b3495..7135178 100644 --- a/ProjectGasStation/ProjectGasStation/FormGasStation.cs +++ b/ProjectGasStation/ProjectGasStation/FormGasStation.cs @@ -64,7 +64,7 @@ public partial class FormGasStation : Form { try { - _container.Resolve().ShowDialog(); + _container.Resolve().ShowDialog(); } catch (Exception ex) { diff --git a/ProjectGasStation/ProjectGasStation/Forms/FormEmployees.Designer.cs b/ProjectGasStation/ProjectGasStation/Forms/FormEmployees.Designer.cs index a03ec8f..7e020a9 100644 --- a/ProjectGasStation/ProjectGasStation/Forms/FormEmployees.Designer.cs +++ b/ProjectGasStation/ProjectGasStation/Forms/FormEmployees.Designer.cs @@ -103,6 +103,7 @@ ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); panel1.ResumeLayout(false); ResumeLayout(false); + Load += FormEmployees_Load; } #endregion diff --git a/ProjectGasStation/ProjectGasStation/Forms/FormProducts.Designer.cs b/ProjectGasStation/ProjectGasStation/Forms/FormProducts.Designer.cs index 7938c4a..9c4d607 100644 --- a/ProjectGasStation/ProjectGasStation/Forms/FormProducts.Designer.cs +++ b/ProjectGasStation/ProjectGasStation/Forms/FormProducts.Designer.cs @@ -103,6 +103,7 @@ panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); ResumeLayout(false); + Load += FormProducts_Load; } #endregion diff --git a/ProjectGasStation/ProjectGasStation/Forms/FormPurchase.cs b/ProjectGasStation/ProjectGasStation/Forms/FormPurchase.cs index 1be10b9..b37101f 100644 --- a/ProjectGasStation/ProjectGasStation/Forms/FormPurchase.cs +++ b/ProjectGasStation/ProjectGasStation/Forms/FormPurchase.cs @@ -45,6 +45,7 @@ namespace ProjectGasStation.Forms public FormPurchase(IPurchaseRepository purchaseRepository, IProductRepository productRepository, ISupplierRepository supplierRepository) { InitializeComponent(); + _purchaseRepository = purchaseRepository ?? throw new ArgumentNullException(nameof(purchaseRepository)); comboBoxProduct.DataSource = productRepository.ReadProducts(); diff --git a/ProjectGasStation/ProjectGasStation/Forms/FormPurchases.Designer.cs b/ProjectGasStation/ProjectGasStation/Forms/FormPurchases.Designer.cs index a646abe..083b929 100644 --- a/ProjectGasStation/ProjectGasStation/Forms/FormPurchases.Designer.cs +++ b/ProjectGasStation/ProjectGasStation/Forms/FormPurchases.Designer.cs @@ -89,6 +89,12 @@ ((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit(); panel1.ResumeLayout(false); ResumeLayout(false); + Load += FormPurchases_Load; + } + + private void F(object sender, EventArgs e) + { + throw new NotImplementedException(); } #endregion diff --git a/ProjectGasStation/ProjectGasStation/Forms/FormSale.cs b/ProjectGasStation/ProjectGasStation/Forms/FormSale.cs index 102a13a..5ad36d2 100644 --- a/ProjectGasStation/ProjectGasStation/Forms/FormSale.cs +++ b/ProjectGasStation/ProjectGasStation/Forms/FormSale.cs @@ -21,13 +21,13 @@ public partial class FormSale : Form InitializeComponent(); _saleRepository = saleRepository ?? throw new ArgumentNullException(nameof(saleRepository)); - comboBoxEmployee.DataSource = employeeRepository.ReadEmployees(); - comboBoxEmployee.DisplayMember = "Name"; - comboBoxEmployee.ValueMember = "Id"; + //comboBoxEmployee.DataSource = employeeRepository.ReadEmployees(); + //comboBoxEmployee.DisplayMember = "Name"; + //comboBoxEmployee.ValueMember = "Id"; - ColumnProduct.DataSource = productRepository.ReadProducts(); - ColumnProduct.DisplayMember = "ServiceType"; - ColumnProduct.ValueMember = "Id"; + //ColumnProduct.DataSource = productRepository.ReadProducts(); + //ColumnProduct.DisplayMember = "ServiceType"; + //ColumnProduct.ValueMember = "Id"; } private void buttonAdd_Click(object sender, EventArgs e) diff --git a/ProjectGasStation/ProjectGasStation/Forms/FormSales.Designer.cs b/ProjectGasStation/ProjectGasStation/Forms/FormSales.Designer.cs index 19f603e..1f58170 100644 --- a/ProjectGasStation/ProjectGasStation/Forms/FormSales.Designer.cs +++ b/ProjectGasStation/ProjectGasStation/Forms/FormSales.Designer.cs @@ -77,6 +77,7 @@ panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); ResumeLayout(false); + Load += FormSales_Load; } #endregion diff --git a/ProjectGasStation/ProjectGasStation/Forms/FormSuppliers.Designer.cs b/ProjectGasStation/ProjectGasStation/Forms/FormSuppliers.Designer.cs index 0f0277f..4a146a5 100644 --- a/ProjectGasStation/ProjectGasStation/Forms/FormSuppliers.Designer.cs +++ b/ProjectGasStation/ProjectGasStation/Forms/FormSuppliers.Designer.cs @@ -103,6 +103,7 @@ panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); ResumeLayout(false); + Load += FormSuppliers_Load; } #endregion diff --git a/ProjectGasStation/ProjectGasStation/Forms/FormSuppliers.cs b/ProjectGasStation/ProjectGasStation/Forms/FormSuppliers.cs index f9c4d7f..d25b92f 100644 --- a/ProjectGasStation/ProjectGasStation/Forms/FormSuppliers.cs +++ b/ProjectGasStation/ProjectGasStation/Forms/FormSuppliers.cs @@ -24,7 +24,7 @@ namespace ProjectGasStation.Forms _supplierRepository = supplierRepository ?? throw new ArgumentNullException(nameof(supplierRepository)); } - private void FormCompanies_Load(object sender, EventArgs e) + private void FormSuppliers_Load(object sender, EventArgs e) { try {