Правки в формах

This commit is contained in:
Alkin Ivan 2024-12-24 01:52:24 +04:00
parent 6faeed59e8
commit 8e006580fb
9 changed files with 19 additions and 8 deletions

View File

@ -64,7 +64,7 @@ public partial class FormGasStation : Form
{ {
try try
{ {
_container.Resolve<FormEmployees>().ShowDialog(); _container.Resolve<FormSales>().ShowDialog();
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -103,6 +103,7 @@
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
panel1.ResumeLayout(false); panel1.ResumeLayout(false);
ResumeLayout(false); ResumeLayout(false);
Load += FormEmployees_Load;
} }
#endregion #endregion

View File

@ -103,6 +103,7 @@
panel1.ResumeLayout(false); panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false); ResumeLayout(false);
Load += FormProducts_Load;
} }
#endregion #endregion

View File

@ -45,6 +45,7 @@ namespace ProjectGasStation.Forms
public FormPurchase(IPurchaseRepository purchaseRepository, IProductRepository productRepository, ISupplierRepository supplierRepository) public FormPurchase(IPurchaseRepository purchaseRepository, IProductRepository productRepository, ISupplierRepository supplierRepository)
{ {
InitializeComponent(); InitializeComponent();
_purchaseRepository = purchaseRepository ?? throw new ArgumentNullException(nameof(purchaseRepository)); _purchaseRepository = purchaseRepository ?? throw new ArgumentNullException(nameof(purchaseRepository));
comboBoxProduct.DataSource = productRepository.ReadProducts(); comboBoxProduct.DataSource = productRepository.ReadProducts();

View File

@ -89,6 +89,12 @@
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
panel1.ResumeLayout(false); panel1.ResumeLayout(false);
ResumeLayout(false); ResumeLayout(false);
Load += FormPurchases_Load;
}
private void F(object sender, EventArgs e)
{
throw new NotImplementedException();
} }
#endregion #endregion

View File

@ -21,13 +21,13 @@ public partial class FormSale : Form
InitializeComponent(); InitializeComponent();
_saleRepository = saleRepository ?? throw new ArgumentNullException(nameof(saleRepository)); _saleRepository = saleRepository ?? throw new ArgumentNullException(nameof(saleRepository));
comboBoxEmployee.DataSource = employeeRepository.ReadEmployees(); //comboBoxEmployee.DataSource = employeeRepository.ReadEmployees();
comboBoxEmployee.DisplayMember = "Name"; //comboBoxEmployee.DisplayMember = "Name";
comboBoxEmployee.ValueMember = "Id"; //comboBoxEmployee.ValueMember = "Id";
ColumnProduct.DataSource = productRepository.ReadProducts(); //ColumnProduct.DataSource = productRepository.ReadProducts();
ColumnProduct.DisplayMember = "ServiceType"; //ColumnProduct.DisplayMember = "ServiceType";
ColumnProduct.ValueMember = "Id"; //ColumnProduct.ValueMember = "Id";
} }
private void buttonAdd_Click(object sender, EventArgs e) private void buttonAdd_Click(object sender, EventArgs e)

View File

@ -77,6 +77,7 @@
panel1.ResumeLayout(false); panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false); ResumeLayout(false);
Load += FormSales_Load;
} }
#endregion #endregion

View File

@ -103,6 +103,7 @@
panel1.ResumeLayout(false); panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false); ResumeLayout(false);
Load += FormSuppliers_Load;
} }
#endregion #endregion

View File

@ -24,7 +24,7 @@ namespace ProjectGasStation.Forms
_supplierRepository = supplierRepository ?? throw new ArgumentNullException(nameof(supplierRepository)); _supplierRepository = supplierRepository ?? throw new ArgumentNullException(nameof(supplierRepository));
} }
private void FormCompanies_Load(object sender, EventArgs e) private void FormSuppliers_Load(object sender, EventArgs e)
{ {
try try
{ {