From 6fefe21ba4e87e17b93d35e8aacaa9b7c228bd75 Mon Sep 17 00:00:00 2001
From: Arslan <arslanabakarov79@gmail.com>
Date: Wed, 25 Dec 2024 16:47:08 +0400
Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ProjectRepairWork/Entities/MaterialProcurement.cs          | 2 ++
 .../Forms/FormMaterialProcurement.Designer.cs              | 1 +
 ProjectRepairWork/Forms/FormMaterialProcurements.cs        | 7 ++++++-
 ProjectRepairWork/Forms/FormMaterialsReport.cs             | 1 -
 .../Implementation/MaterialProcurementRepository.cs        | 3 ++-
 5 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/ProjectRepairWork/Entities/MaterialProcurement.cs b/ProjectRepairWork/Entities/MaterialProcurement.cs
index c9c97f1..7747e56 100644
--- a/ProjectRepairWork/Entities/MaterialProcurement.cs
+++ b/ProjectRepairWork/Entities/MaterialProcurement.cs
@@ -12,6 +12,8 @@ public class MaterialProcurement
     public int Id { get; private set; }
     [Browsable(false)]
     public int MaterialsId { get; private set; }
+    [DisplayName("Материалы")]
+    public string MaterailName { get; private set; } = string.Empty;
     [DisplayName("Дата закупки")]
     public DateTime ProcurmentDate { get; private set; }
     [DisplayName("Сумма закупки")]
diff --git a/ProjectRepairWork/Forms/FormMaterialProcurement.Designer.cs b/ProjectRepairWork/Forms/FormMaterialProcurement.Designer.cs
index 3dbaf71..63016df 100644
--- a/ProjectRepairWork/Forms/FormMaterialProcurement.Designer.cs
+++ b/ProjectRepairWork/Forms/FormMaterialProcurement.Designer.cs
@@ -57,6 +57,7 @@
             // numericUpDownMaterialRrocurement
             // 
             numericUpDownMaterialRrocurement.Location = new Point(153, 161);
+            numericUpDownMaterialRrocurement.Maximum = new decimal(new int[] { 100000, 0, 0, 0 });
             numericUpDownMaterialRrocurement.Name = "numericUpDownMaterialRrocurement";
             numericUpDownMaterialRrocurement.Size = new Size(150, 27);
             numericUpDownMaterialRrocurement.TabIndex = 2;
diff --git a/ProjectRepairWork/Forms/FormMaterialProcurements.cs b/ProjectRepairWork/Forms/FormMaterialProcurements.cs
index ff54796..515088b 100644
--- a/ProjectRepairWork/Forms/FormMaterialProcurements.cs
+++ b/ProjectRepairWork/Forms/FormMaterialProcurements.cs
@@ -25,7 +25,12 @@ namespace ProjectRepairWork.Forms
         }
 
 
-        private void LoadList() => dataGridView.DataSource = _materialProcurementRepository.ReadMaterialProcurement();
+        private void LoadList()
+        {
+            dataGridView.DataSource = _materialProcurementRepository.ReadMaterialProcurement();
+            dataGridView.Columns["Id"].Visible = false;
+        }
+
 
 
 
diff --git a/ProjectRepairWork/Forms/FormMaterialsReport.cs b/ProjectRepairWork/Forms/FormMaterialsReport.cs
index a658812..94bf929 100644
--- a/ProjectRepairWork/Forms/FormMaterialsReport.cs
+++ b/ProjectRepairWork/Forms/FormMaterialsReport.cs
@@ -12,7 +12,6 @@ namespace ProjectRepairWork.Forms
 
         public FormMaterialsReport(IUnityContainer container)
         {
-            InitializeComponent();
             InitializeComponent();
             _container = container ?? throw new ArgumentNullException(nameof(container));
         }
diff --git a/ProjectRepairWork/Repositories/Implementation/MaterialProcurementRepository.cs b/ProjectRepairWork/Repositories/Implementation/MaterialProcurementRepository.cs
index 36ecce0..5354786 100644
--- a/ProjectRepairWork/Repositories/Implementation/MaterialProcurementRepository.cs
+++ b/ProjectRepairWork/Repositories/Implementation/MaterialProcurementRepository.cs
@@ -91,7 +91,8 @@ public class MaterialProcurementRepository : IMaterialProcurementRepository
             var querySelect = $@"
             SELECT 
                 mp.*,
-                bm.MaterialsType as MaterialsName
+                bm.MaterialsType as MaterailName
+
             FROM MaterialProcurement mp
             LEFT JOIN BuildingMaterials bm on bm.Id = mp.MaterialsId 
             {builder.Build()}";