доделал

This commit is contained in:
Arslan 2024-12-25 16:47:08 +04:00
parent c0fb5a6878
commit 6fefe21ba4
5 changed files with 11 additions and 3 deletions

View File

@ -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("Сумма закупки")]

View File

@ -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;

View File

@ -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;
}

View File

@ -12,7 +12,6 @@ namespace ProjectRepairWork.Forms
public FormMaterialsReport(IUnityContainer container)
{
InitializeComponent();
InitializeComponent();
_container = container ?? throw new ArgumentNullException(nameof(container));
}

View File

@ -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()}";