Eliseev E.E. LabWork08_Hard #18

Closed
ElEgEv wants to merge 12 commits from LabWork08_Hard into LabWork07_Hard
5 changed files with 15 additions and 55 deletions
Showing only changes of commit 5fd72c9524 - Show all commits

View File

@ -1,4 +1,5 @@
using BlacksmithWorkshopContracts.BindingModels;
using BlacksmithWorkshopBusinessLogic.BusinessLogic;
using BlacksmithWorkshopContracts.BindingModels;
using BlacksmithWorkshopContracts.BusinessLogicsContracts;
using BlacksmithWorkshopContracts.DI;
using Microsoft.Extensions.Logging;
@ -35,19 +36,11 @@ namespace BlacksmithWorkshop
private void LoadData()
{
try
{
var list = _logic.ReadList(null);
try
{
dataGridView.FillandConfigGrid(_logic.ReadList(null));
//растягиваем колонку Название на всю ширину, колонку Id скрываем
if (list != null)
{
dataGridView.DataSource = list;
dataGridView.Columns["Id"].Visible = false;
dataGridView.Columns["ImplementerFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
}
_logger.LogInformation("Загрузка исполнителей");
_logger.LogInformation("Загрузка исполнителей");
}
catch (Exception ex)
{

View File

@ -38,17 +38,9 @@ namespace BlacksmithWorkshop
try
{
var list = _messageLogic.ReadList(null);
dataGridView.FillandConfigGrid(_messageLogic.ReadList(null));
if (list != null)
{
dataGridView.DataSource = list;
dataGridView.Columns["MessageId"].Visible = false;
dataGridView.Columns["ClientId"].Visible = false;
dataGridView.Columns["Body"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
}
_logger.LogInformation("Успешная загрузка писем");
_logger.LogInformation("Успешная загрузка писем");
}
catch (Exception ex)
{

View File

@ -50,18 +50,7 @@ namespace BlacksmithWorkshop
try
{
var list = _orderLogic.ReadList(null);
if (list != null)
{
dataGridView.DataSource = list;
dataGridView.Columns["ManufactureId"].Visible = false;
dataGridView.Columns["ImplementerId"].Visible = false;
dataGridView.Columns["ClientId"].Visible = false;
dataGridView.Columns["ManufactureName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
dataGridView.Columns["ClientFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
dataGridView.Columns["ImplementerFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
}
dataGridView.FillandConfigGrid(_orderLogic.ReadList(null));
_logger.LogInformation("Загрузка заказов");
}

View File

@ -1,4 +1,5 @@
using BlacksmithWorkshopContracts.BindingModels;
using BlacksmithWorkshopBusinessLogic.BusinessLogic;
using BlacksmithWorkshopContracts.BindingModels;
using BlacksmithWorkshopContracts.BusinessLogicsContracts;
using BlacksmithWorkshopContracts.DI;
using Microsoft.Extensions.Logging;
@ -38,15 +39,7 @@ namespace BlacksmithWorkshop
{
try
{
var list = _logic.ReadList(null);
if (list != null)
{
dataGridView.DataSource = list;
dataGridView.Columns["Id"].Visible = false;
dataGridView.Columns["ManufactureWorkPieces"].Visible = false;
dataGridView.Columns["ManufactureName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
}
dataGridView.FillandConfigGrid(_logic.ReadList(null));
_logger.LogInformation("Загрузка изделий");
}

View File

@ -1,4 +1,5 @@
using BlacksmithWorkshopContracts.BindingModels;
using BlacksmithWorkshopBusinessLogic.BusinessLogic;
using BlacksmithWorkshopContracts.BindingModels;
using BlacksmithWorkshopContracts.BusinessLogicsContracts;
using BlacksmithWorkshopContracts.DI;
using Microsoft.Extensions.Logging;
@ -36,15 +37,7 @@ namespace BlacksmithWorkshop
{
try
{
var list = _logic.ReadList(null);
//растягиваем колонку Название на всю ширину, колонку Id скрываем
if(list != null)
{
dataGridView.DataSource = list;
dataGridView.Columns["Id"].Visible = false;
dataGridView.Columns["WorkPieceName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
}
dataGridView.FillandConfigGrid(_logic.ReadList(null));
_logger.LogInformation("Загрузка заготовок");
}