Пибд-21 Абакаров А.А Лабораторная работа 4 #5

Closed
A-r-s-l-a-n wants to merge 2 commits from Laba4 into Laba3
5 changed files with 11 additions and 3 deletions
Showing only changes of commit 6fefe21ba4 - Show all commits

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